A programmer’s guide to recipe writing

A computer program is nothing more than a list of instructions that the computer follows, a “recipe” if you will. The thing is, computers are stupid. They follow instructions to the letter, like good little robots, with no understanding of what you (the programmer) is trying to achieve.

Computer programmers like myself are therefore experts at writing instructions that are easily understandable, unambiguous, and hard to screw up. Which is why I fucking hate cookbooks.

Let’s take a look at some recipe excerpts. First up, “free” beer:

Sparge with 15,5 L of 78 °C water.
Collect 22,7 L of wort.
Remember to add Northern Brewer hops at the beginning
of sparge a.k.a. First Wort Hops/FWH.

Ok so first I sparge, then I collect wort, then I… “remember” to have done something at the start of the sparging process. Fuck! Don’t provide instructions out of order. The people following your recipe are not as good as modern CPUs. You’ll see this a lot in recipes where they will say “put it into an oven preheated to 180 degrees”. People read recipes top to bottom, they shouldn’t have to pour over the whole thing to find the instruction they should be doing first (pre-heating the oven) at the end of the recipe.

Next up, vegan pancakes:

  1. Mix the dry ingredients together in a medium bowl. Add the fruit and toss to coat the fruit with the dry mix.
  2. Combine the wet ingredients in a measuring cup.

Step 1 includes multiple instructions! I know when I am cooking, I can’t handle MIMD. Either break it down into multiple steps like so:

  1. Mix the dry ingredients together in a medium bowl.
  2. Add the fruit and toss to coat the fruit with the dry mix.
  3. Combine the wet ingredients in a measuring cup.

Or do it all 1 sentence per instructions like this:

Mix the dry ingredients together in a medium bowl. Add the fruit and toss to coat the fruit with the dry mix. Combine the wet ingredients in a measuring cup.

Next we have Stef’s Lemon rosemary olive oil cake:

Make a well, and pour in:
2/3 cup extra virgin olive oil (for the flavour)
2 tbsp arrowroot or cornstarch mixed with 2 tbsp water to dissolve (this is a good binding agent)
1 tbsp baking powder mixed with 1/2 cup of soy (or other preferred) milk to dissolve and get a bit frothy (raising agent)
Juice and grated zest of 1 lemon with 1/2 cup of preferred milk and sit for a sec til it curdles (another raising agent)

Oh, Stef, I expected more from you. It’s so ambiguous! Do I mix the ingredients separate container and then add them to the well? Do I mix them after I put them in the well? And what is “making a well anyway”?

I could go on with a few more examples, but I’ll leave it there. No wait, I hate it when they put instructions in the ingredients section, e.g. “Ingredients: 1 tomato, blanched peeled, and lightly fried”. Ok I’m done.


4 thoughts on “A programmer’s guide to recipe writing

  1. You read it all, then do it. It’s in order, and it’s brief, and written how I actually made it. It’s not that hard.

    You mix it how you like, it doesn’t really matter, but for the record you make a well (a hole in the ground for putting liquid in) and add each thing in the list, which in the case of the baking powder/soy is already mixed, however which way you like to mix things. You don’t need/want mix the baking powder and soy at the beginning, just when you’re ready to add it to the well, one step at a time.

    Now leave me alone.

    And don’t look in olden days’ cookbooks. You wouldn’t like them.

  2. Agree and I’m as far removed from a programmer as Gaga is to shyness.

    I remember reading something like, ‘one cup of parboiled artichokes, skin peeled, diced into chunks and marinated in lime juice, sea salt and olive oil.’ That was just one ingredient!

  3. As a recipe writer, it’s a juggling act: put too many directions into one step and you risk annoying people that can’t handle MIMD*. Put every single direction in a different step and some people may think the recipe is more complicated than it is… a recipe with 42 steps can’t be easy, right? 😉

    “Mix the dry ingredients in a bowl” and “add the fruit to this same bowl” belong in the same step, in my mind. Taking another vessel and adding something different to it belongs in another step. But then, I’m a cook and definitely not a programmer.

    Thanks for stopping by my blog. 🙂

    * Started reading the Wiki page on MIMD, but my eyes glazed over halfway through the first paragraph. Oh sure, I *could* have taken the time to learn what this means: “In an MIMD distributed memory machine with a hypercube system interconnection network containing four processors, a processor and a memory module are placed at each vertex of a square”; but frankly, I’d rather be cooking.

  4. I must admit, I thought you made that free beer recipe up!

    I think you’re missing the crucial difference between computers cooking number and people cooking food: cooking is an organic process, and as such, requires an organic processor. Someone who can acquire and utilise information in a variety of different ways.
    Plus who can practise cooking.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s