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

Posted in Uncategorized | Tagged , , , , , | 17 Comments

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

Posted in Ruby, Uncategorized | Tagged , , , | 6 Comments

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

Posted in Uncategorized | Tagged , , , , | 8 Comments

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

Posted in Uncategorized | Tagged , , , , , , | 5 Comments

If anyone’s looking for me, I’ll be DCamping

I hope to see some of you at Ruby DCamp this weekend!

Posted in Conferences | Tagged , , | 1 Comment

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

Posted in Uncategorized | Tagged | 9 Comments