Menu Sidebar

law of demeter

Making a Mockery of TDD

I made this gnomic remark on Twitter the other day: To be a successful mockist, you must dislike mocks. A lot of people re-tweeted it, so I guess I’m not completely alone in thinking this way. I should back up a bit. A “mock object”, or “mock”, is a specific kind of test double. It […]

Demeter: It’s not just a good idea. It’s the law.

Is #try really so bad? In response to my recent post about #try being a code smell, a lot of people made the reasonable objection that the example I used—of using #try on a a Hash—was a pathological case. A much more typical usage of #try looks like this:

user may or may not […]

Virtuous Code

"The three virtues of a programmer: laziness, impatience, and hubris" — Larry Wall

Books and Screencasts

RubyTapas Screencasts

RubyTapas Screencasts

Small plates of gourmet Ruby code.

Confident Ruby

Confident Ruby cover

32 Patterns for joyful coding.

The Making of

Confident Ruby cover

Watch me build an app in Sinatra and Rails

Objects on Rails

Objects on Rails

A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.

Exceptional Ruby

Exceptional Ruby

The definitive guide to exceptions and failure handling in Ruby.