-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Looks very clean and nice!
- Looks very clean and nice!
- It was already part of AlterEgo, it just needed to be pulled out into its own gem. Next release of AlterEgo will depend on FailFast as well as the forthcoming HookR library which I wrote over the...
- I assume AlterEgo 1.0.1 will be refactored to use this, eh? :-)
- It's an approach I've considered, and I may move towards it, although I'm pretty sure I want to stay compatible with explicit state classes. One of the items on the TODO list, however,...
- 5 days ago
- 5 comments
- Active 2 days ago
- More
- 3 days ago
- 2 comments
- Active 3 days ago
- More
- 3 months ago
- 1 comment
- Active 1 week ago
- More
- 3 months ago
- 9 comments
- Active 3 weeks ago
- More
- 1 month ago
- 12 comments
- Active 1 month ago
- More
- 3 months ago
- 3 comments
- Active 1 month ago
- More
- 3 months ago
- 3 comments
- Active 1 month ago
- More
- 1 month ago
- 4 comments
- Active 1 month ago
- More
- 1 month ago
- 7 comments
- Active 1 month ago
- More
- 3 months ago
- 7 comments
- Active 2 months ago
- More
- 3 months ago
- 4 comments
- Active 3 months ago
- More
- 3 months ago
- 4 comments
- Active 6 months ago
- More
- 3 months ago
- 2 comments
- Active 6 months ago
- More
- 3 months ago
- 4 comments
- Active 6 months ago
- More
- 3 months ago
- 1 comment
- Active 6 months ago
- More
- 3 months ago
- 6 comments
- Active 7 months ago
- More
- 3 months ago
- 15 comments
- Active 7 months ago
- More
- 3 months ago
- 8 comments
- Active 8 months ago
- More
- 3 months ago
- 2 comments
- Active 8 months ago
- More
- 3 months ago
- 1 comment
- Active 8 months ago
- More
- 3 months ago
- 1 comment
- Active 1 year ago
- More
[ANN] alter-ego 1.0.0 Released started by avdi
Today I’m happy to announce the release of AlterEgo, a state-pattern library for Ruby. AlterEgo was born about a year ago, when I found a need to formalize state-based behavior in Ruby objects. I surveyed the existing libraries at the time (a set which, IIRC, consisted of
[ANN] fail-fast 1.0.0 Released started by avdi
Number two out of three in my weekend releasing spree, I’m happy to announce the availability of FailFast v.1.0.0.
Description
FailFast is a collection of assertion methods intended for lightweight contract checking.
Installing
sudo gem install f
Description
FailFast is a collection of assertion methods intended for lightweight contract checking.
Installing
sudo gem install f
Class.new and .inherited() started by avdi
In Ruby, the typical way to define a class is using the class keyword:
class Foo
# ...
end
The class keyword, however, is effectively just syntax sugar for the Class constructor:
Foo = Class.new
# ...
end
Using Class.new is occasio
class Foo
# ...
end
The class keyword, however, is effectively just syntax sugar for the Class constructor:
Foo = Class.new
# ...
end
Using Class.new is occasio
The Trifecta of FAIL; or, how to patch Rails 2.0 for Ruby 1.8.7 started by avdi
It’s an oft-stated fact that most disasters result not from a single point of failure but from a combination of failures reinforcing each other. I wouldn’t term the problem I ran into last Friday a disaster, but it certainly cost me several hours of time trying to find
Death to Nil started by avdi
A common idiom in ruby is to call a method only if its receiver is not nil:
thing.foo if thing
or:
thing && thing.foo
Various libraries exist for making this a little more convenient. You can use andand, or if you are using Facets you c
thing.foo if thing
or:
thing && thing.foo
Various libraries exist for making this a little more convenient. You can use andand, or if you are using Facets you c
Epic Fail, or, why the users hate us. started by avdi
[I’m reposting this from my personal journal as it has development applicability – in so much as it is a tale about how NOT to design software.]
So I’ve been trying to wire money to Kenya. No, I haven’t been contacted by the wife of a
So I’ve been trying to wire money to Kenya. No, I haven’t been contacted by the wife of a
Sustainable Development in Ruby, Part 2: Method Injection started by avdi
Sometimes you have a need for an object method which the class author did not foresee. For instance, in our previous installment, we used the following code to accumulate packets until an ending packet was found:
class BufferedConnection < FMTP::Connection
def re
class BufferedConnection < FMTP::Connection
def re
Testing Private Methods started by avdi
Periodically the question of how to test private methods comes up at work or online. My answer is: don’t. It may seem trite, but there is some reasoning behind it.
Private methods are, by definition, implementation details. If you are approaching your tests from a b
Private methods are, by definition, implementation details. If you are approaching your tests from a b
You keep using that word “distributed”… started by avdi
People keep telling me that GitHub is the “killer app” of git. Perhaps they meant “productivity killer”?
I submit to you that if your distributed version control workflow has a single point of failure that can bring your work to
I submit to you that if your distributed version control workflow has a single point of failure that can bring your work to
Corporate Leave Policies? started by avdi
Quick question: if your company has a defined leave policy (i.e. you’re not a freelancer), what is it? How much paid time off/vacation do you get a year? And if you happen to know, how much paid paternity/maternity leave are you eligible for?
Thanks!
Thanks!
Phenomenal Cosmic Power started by avdi
Jeff Atwood thinks monkeypatching should frighten you:But if wielding that power doesn’t scare and humble you a little, too, then maybe you should leave the monkeypatching to the really smart monkeys.
Reg Braithwaite thinks it should exhilarate you:And ultimately, that is
Reg Braithwaite thinks it should exhilarate you:And ultimately, that is
You should be on ruby-talk started by avdi
Working as I do in the Rails world these days, I’m periodically reminded of the difference between me and most Rails programmers. That is, the fact that I came to Rails via Ruby, rather than vice-versa. Usually this happens when someone at work or in the blog world expresses d
The Lotus Desk started by avdi
2008-5-23 Avdi – Lotus desk
Originally uploaded by taboulichic
I’ve been increasingly dissatisfied with office chairs both at the office and at home lately. I just can’t seem to find a configuration that gives me the back support
Originally uploaded by taboulichic
I’ve been increasingly dissatisfied with office chairs both at the office and at home lately. I just can’t seem to find a configuration that gives me the back support
On Beauty in Code started by avdi
I was thinking about the topic of beautiful code this morning. There’s a lot of disagreement about what constitutes beauty in code. I’ve watched Marcel Molina Jr. talk about Plato and Pythagoras. O’Reilly has published a whole book on the subject. On the othe
Rock’em Sock’em Ockham started by avdi
Inspired by this talk by Jim Weirich:
Image by scottfeldstein, some rights reserved.
(For the shaving nerds, this poster features the Merkur Hefty Classic, a razor I recently acquired and am so far pretty happy with.)
Image by scottfeldstein, some rights reserved.
(For the shaving nerds, this poster features the Merkur Hefty Classic, a razor I recently acquired and am so far pretty happy with.)
Why Your Social Website Should Support OpenID started by avdi
On Twitter I bitched about GitHub not supporting OpenID, and both Chris Wanstrath and Giles Bowkett chided me for not making an better argument for it than “it makes my life easier”. Â The benefits of OpenID seem self-evident to me; but if I have to spell it out,
Monkeypatching is Destroying Ruby started by avdi
(The title of this post is intended to be deliberately provocative, as well as being a nod to Steven Colbert’s “The People Destroying America” segments. It’s provocative because I want to get people talking about this issue. I don̵
Announcing Ninja-Patching! started by avdi
Sure, monkey patching is great and all. That period of disbelief, followed by increasing exasperation as the victim maintenance programmer discovers that an object is behaving differently than it’s source code says it should, is satisfying. But sooner or later he or she wises
Sustainable Development in Ruby, Part 1: Good Old-Fashioned Inheritance started by avdi
The first technique we’ll look at in this series is something so basic it may not even seem worth spelling out. But sometimes old-school techniques are overlooked in the excitement of a young language.
Let’s use as our example a hypothetical communications protocol
Let’s use as our example a hypothetical communications protocol
Doctor, it hurts when you say that started by avdi
In your response, for instance, you say “I prefer thinking before writing code.” Well, so do I, but the fact of the matter is some people don’t and some people make mistakes based on inexperience or ignorance even when they do prefer to think b
12Next