Life Imitates Code. Essays by Ka Wai CheungEssays by Ka Wai Cheung from around the web.

Coding ● February 2010

Treat time as an ingredient

Software developers can take a lesson from cooking—specifically on how we treat time.

In the software world, the more time we have to do something, the better we usually feel. The less time, the worse. We treat time like a currency. Extra time is a luxury.

A cooking recipe works much differently. There’s just enough time to do everything. Not a minute more, not a minute less. Too much time isn’t a luxury. A turkey cooks for X amount of time per pound. If we had an extra day, we wouldn’t use it to cook the turkey longer. Nor would we use it to prep our other ingredients longer. There’s no reason. It doesn’t make sense.

In the cooking world, time is an ingredient—as much as the ones we actually cook with. A cake might take 30 minutes to bake, not because we only have 30 minutes, but because it’s at its best after 30 minutes. Baking it for 60 minutes is as worthwhile as not baking it at all.

When we build software, shouldn’t we think about time in the same way?

If we’re given too little time to do something, we hack and take shortcuts. We build software that breaks down because we haven’t put in the thought required to do that much amount of work in that little amount of time. Instead, we ought to pare down what we’re building so that the ingredient of time is in the right proportions with our other ingredients—code, testing, and refinement.

The more time we have to do something, the more we noodle and tweak. The more we want to add features. We fill the unused space with however much more software we can build. It sours the thing we really wanted to build in the beginning. In much the same way as our scorched cake, the end product is as good to use as one built not having had any time at all.

When we develop software, we ought to stop thinking about time as a currency. More time doesn’t make a better product; only the right amount of time does.

Originally published Feb 17, 2010 at We Are Mammoth. Go to the next essay in Coding, “How about a refactorthon?”.