Programming esprit d’escalier

by

Mixing Metaphors

Last night I was struck by a bolt of esprit d’escalier.*

Anecdotal Evidence

I was refactoring our part-of-speech tutorial to the new tagging interface introduced for CRFs. I’d spent over an hour stuck on a bug for unknown token evaluations, which had evocatively repeatable bug patterns. Finally, I had the sense to give up, get on the subway, and go home. As soon as I was sitting on my sofa watching Defying Gravity, it occurred to me what the problem was. I was updating the known token set for the initial segment of the test set and then recalculating test set scores. D’oh!

Down the Garden Path

The problem is that your brain gets into a rut. To borrow a metaphor from psycholinguistics, you wander down a programming garden path.

The Zen of Being Your Own Rubber Ducky

Way back in high school (post-internt, pre-web), Douglas Hofstadter’s book Gödel, Escher, Bach introduced me to the joy of the kōan. I liked the one about running around the house without thinking about white elephants. That is exactly how it feels when you’re down the garden path, trying to escape the labyrinth to reach enlightenment.

I contend that if you were good enough at zen meditation, you could be your own rubber ducky.


* The Wikipedia translates the expression “esprit d’escalier” as “staircase wit” and defines it succintly as “thinking of a clever comeback when it is too late”. I love the Wikipedia; they even point to an esprit d’escalier-themed Seinfeld episode, “The Comeback”.

Hunt and Thomas introduced the term “rubber ducky” in their book The Pragmatic Programmer. It’s about how useful it is to explain your problem out loud, even if only to a rubber ducky. The best rubber ducky is another programmer who actually understands what you’re talking about at some level. Mitzi and I have found each other more useful than our cats as rubber duckies.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s