About
Hi! I'm Avdi Grimm, and this is my software development blog. More...
Books and Screencasts
Objects on Rails
A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.
-
Subscribe
-
Recent Posts
Archives
Categories
Meta
Monthly Archives: October 2008
Writing Self-Confident Code
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 … Continue reading
Complex Hash Expectations in RSpec
When spec-ing something that calls method which takes a set of nested hashes (as many Rails methods do), it may be tempting to use #hash_including: to test for only the values you care about. However #hash_including won’t work the way … Continue reading
Testing Private Methods
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 … Continue reading
Languages I Want to Learn
I’ve fallen off the wagon of late in learning “a language a year” (as The Pragmatic Programmer advises). I have a long list of languages to learn, but I thought I’d try and narrow it down to a top five. … Continue reading
If anyone’s looking for me, I’ll be DCamping
I hope to see some of you at Ruby DCamp this weekend!
You keep using that word “distributed”…
People keep telling me that GitHub is the “killer app” of git. Perhaps they meant “productivity killer”? !http://virtuouscode.com/wp-content/uploads/2008/10/github-is-down.png! I submit to you that if your distributed version control workflow has a single point of failure that can bring your work … Continue reading




