Wash-First Cooking

Earlier today I stumbled across a TDD/test-first analogy that's worth sharing.

My dishwasher broke a while ago,  and for various reasons, we've been slow in replacing it. This means that my sink often has a few glasses and plates, waiting to hand-washed. Of course, that's gross and makes things look dirty, especially in a kitchen as small as mine. For a while I tried to always wash my dishes immediately after using them, but that proved beyond my discipline. I tried fighting instincts, but after I'm finished preparing and then consuming a meal, I just want to relax -- not spend 15 minutes scrubbing pots and pans. There's not much incentive to wash dishes right then.

But that means that the mess grows and after a few meals, I have to spend an hour or so washing dishes. Washing dishes isn't so awful by itself, but it has a way of permeating the rest of the your activities in the kitchen. For example, I cook a healthy meal at home much less often if there are any dishes waiting to be cleaned. Instead, I'll just have a bowl of canned soup, some crappy microwave dinner, or takeout. Altogether I was pretty unhappy with the situation and looking to expedite the process of getting a dishwasher installed.

So, I  developed a new tactic. When I decide to cook  a meal, I will force myself to wash an amount of dishes equivalent to the amount I'm about to use, i.e., if I'm eating a bowl of cereal, I'll at least wash a bowl/plate/glass and a utensil beforehand. It's been working fairly well.

In general, with wash-first I'm finding:

  1. The dishes actually get washed. Putting the incentive after the effort works much better.
  2. I often wash dishes immediately after using them, because I'm already in that washing mindset.
  3. As I plan out a meal, I try to minize the number of dishes I'll dirty; I keep washability in mind.
  4. I end up spending less time cleaning overall.
  5. I'm cooking more at home.
  6. My kitchen is cleaner.

So, let's tie this back into software. This past Thursday I went to the Meet and Code dinner in Richmond (now Richmond Software Craftsmanship Group). It was a very fun meeting with lots of good discussion about the challenges of the testing legacy code and just software development in general. With that experience lingering in my mind, I woke up this morning in the mood for pancakes. Oh, but that would dirty so many dishes! I set about washing a pan and so on, and I started ruminating that this wash-first methodology was working fairly well. I suddenly realized that I was applying TDD strategies to dishwashing!

In general, with test-first I've found:

  1. Tests actually get written. 
  2. My code is designed with testability in mind and thus more testable.
  3. I end up spending less time writing tests overall.
  4. I write more tests. 
  5. My code is cleaner.  
I'm not sure if this is a cool cross-domain application of development thought processes or just an amazingly geeky idea -- like my friend using Scrum to plan her wedding (ahem). Regardless, I found it as a nice affirmation that the logic behind TDD is founded in basic human psychology.

Comments

January 31. 2009 12:27

Ha ha, that is awesome. Definitely an interesting idea, I might have to try it!

Justin Etheredge

March 31. 2009 04:25

Normally I wouldn’t comment on posts but I felt that I had to as your writing style is really good. You have broken down a difficult area so that it easy to understand. I think that you would enjoy reading what another good blogger has to say on the subject.

Dirty messages

June 21. 2009 20:53

It's difficult to get used without your dishwasher, I should know because my dishwasher also broke without a warning. If you are an organized person into washing your dishes on a regular basis then braking up with your dishwasher is not that painful. It wasn't the case for me, in a month I got a new appliances, so now things are back to normal.

Maytag parts

June 30. 2009 03:25

Here's an idea. I ran into the same problem and when this happened to me, I threw away all of my forks spoons and knives except for four of each of them. Then I threw away all of my plates until I only had 4 of them. And so on and so fourth. The thing is I ran out of dishes and then I had to clean them. Well, then I just realized I didn't want to cook anymore so then I developed a microwave dinner habbit. Cool huh? lol

copper sinks

February 14. 2010 19:40

payday loans

If you want to achieve excellence, you can get there today. As of this second, quit doing less-than-excellent work.

payday loans

March 10. 2010 02:08

colon cleanse

He who angers you conquers you.

colon cleanse

Add comment




biuquote
  • Comment
  • Preview
Loading