Tuesday, 1 December 2009

Cooking and software testing

In this blog post I will explore the similarities between cooking and testing software.

Speaking as one, who considers my cooking a success, when people do not rise from the table to spit out the food in the garbage-bin during dinner, I some time ago decided to do something about it.

I know a little about cooking now, thanks to two thing: inspiration (hugely by a popular, danish television show using abusive amounts of butter, cream and other good stuff) and - rehearsing. Yes, if you try things just for trying them, you eventually get better at them. Something lots of people forget in the daily treadmill.

If I try to sum my experience up, there's a beginning where the result is not digestible, perhaps dis-appetizing or simply ruined. Then we start to pay attention to the recipe and consequently get a better result - a result close to what was 'predicted' or perhaps 'expected'. We begin to trust our skills. Learning more recipes means that we gain the insight needed to try adding garments, combining dishes or ingredients. We also learn that a lot of dishes are almost identical up until a certain point. There are 'standard ways', but if you really want to make good food, there's always some hints and tricks.
For instance: Sauce BĂ©arnaise can be made as something you buy and just heat. A beginners choice. Then you can get it in various half-made versions (just add milk - just add milk AND butter). You can get the essence and start it from the beginning. But to actually start it from the VERY beginning: you can make your own essence (which, btw, takes around 10 minutes and is really worth it...)

The point is, that the more you do yourself, the more control you've got over the result - and the more fun you have too.

Contrasting to software testing: new testers has to start somewhere. A wise place to start would be to test something. If that's too difficult: test something as someone tells you to. Perhaps get a book on testing. We all started there somehow. We all wondered what this testing really was about. And we all made enormous mistakes (overlooking obvious bugs, not reporting bugs for various reasons, didn't document what we did, forgot to test in this way and that, missed testing because we spend all the time preparing our test, etc etc). But without mistakes: no learning.

As experience grows, we start combining tests, add new ways of testing, starting to think differently. All up to the point where we become 'chiefs of testing', finally. And at last we will avoid having people throw up on our test reports... ;-) (okay, might have skipped that analogy).

We keep cookbooks with recipes. We also keep test cases and scenario descriptions and so on. In cooking we sometimes find that two books have different recipes for the same dish. I think we need to acknowledge that more in testing: any book is not necessarily right. That means, that any book (=any standard, =any method, =any technique) isn't always right - other ways may lead to better results. But it takes a 'chief' to see it. Newbies will just look through the books to find the one recipe variation that doesn't look too hard.

So if you know of such a tester - perhaps yourself ? - then it might help to spit out the latest test he/she made, and suggest a new 'cookbook' - one that contains new and untried 'dishes' - and add that you're hungry still ;-)

Thanks for reading this far. Please give a 'michelin star'-comment if you like ;-)

1 comment:

  1. Hi, Carsten...

    I like the comparisons. A few recommendations for you:

    1) On Food and Cooking: The Science and Lore of the Kitchen, by Harold McGee, is BRILLIANT. I

    2) The magazine "Cooks Illustrated" (which owes a good deal of inspiration to McGee, apparently) is a very testerly magazine.

    3) I've written a couple of Better Software columns that relate testing to cooking: Do You Want Fries with that Test? and Food for Thought.

    Bon appetit!

    ---Michael B.