Thursday, 14 May 2020

How to Debug a Cake

So, I've been baking cakes for a long time. I got the recipe from my mum, who has also been baking cakes for a long time.

This recipe is basically flower, eggs, butter, bakingpowder, and lots of sugar. You know, the old fashioned way.

Well, a couple of years ago, suddenly my cakes started failing mysteriously.

So I started trying to fix this, by changing stuff randomly. I started downloading recipes from the Internet, to see if they worked better. I bought a cake-flour package from the supermarket, perhaps that worked. I even changed ovens.

None of these things worked.

So, I sat down, and thought about it. And then I realised, I didn't try and find the problem as I would have if I looked at the problem as a bloody Software Designer (which is what I am).

Well, debugging a cake turns out to be hard. System.out.println or logging or breakpoints are quite impossible.

As they say, you have to find the problem during actual production.

Some conclusions

If you did not make any changes to your recipe, and suddenly your cakes start to fail, either one of your ingredients has changed or your process/tools for making the cake. This is an obvious conclusion.

I was going to assume that my tools and process were more or less the same.


The only thing that really works, is to change one ingredient at a time.


In other words:

“How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth? ”- Sherlock Holmes, The Sign of the Four (1890)

It also helps to understand the process. What kind of ingredients in a cake are essential and what kind of role do they play?

Addendum

Well, after a lot of experimenting, and, quite frankly, a lot of dismal ruined cakes, I found the cause to be the butter.

The butter I used, Blue Band, must have changed at the time. So I did a little digging.

I noticed that there are no longer any dairy products in this butter.

And when I use butter made from dairy products, the cakes turn out fine.

Also, when I started checking the supermarket, I did notice that Blue Band also (at around the same time) came out with a new product called "Butter for cookies and cake". I checked, and it did indeed contain dairy products.

Am I just being paranoid in thinking this is not a coincidence?

No comments:

Post a Comment