Julien Richard-Foy’s blog

A bad API design: Sauter’s oven

Last weekend I was at my parents home for the Christmas dinner and I made a strudel for dessert. I cooked it in my mother’s oven, one from the Sauterbrand, which has a so bad API that I can’t resist to write about it.

The purpose of an oven is obviously to bake food, and usually a same oven can be used to bake pastries, pizzas, stews, gratins as well as meringues or toasts. But each kind of food doesn’t need the same kind of heat. E.g. for pizzas I need a high heat from both the top and the bottom, for gratins I only need a grill and when I make a fudge chocolate cake I want a medium heat from the bottom (otherwise the top of the cake is dry while the bottom is still not cooked).

All these baking functions are exposed by the oven through its user interface. Well, how does my mother’s oven API look like?

Oven of the Sauter brand

We don’t need to go into the details, the widget in which we are interested is the top right button. It gives us choices among “Meat, Fish, Tart”, “Multiple bakes”, “Roasted piece”, “Cake, Brioche”, “Pizza”, etc. At first that might seem relevant: when I want to bake a dessert I just need to select the “Cake” mode, and so on for the other kind of foods I want to bake. But in practice this model is inappropriate: some desserts need high heat (shortbreads), while others need low heat (meringues). So what temperature should I expect when I select this mode?

Worse, for some desserts I need heat from both the top and the bottom (crumbles) but for others I only want heat from the bottom (the previously mentioned fudge chocolate cake). If there is another button on the oven which allows to change the temperature, there is no way to tweak the heat position but trying another “mode” with this top right button.

Even worse, for a given dessert I may use different heat position and temperature according to the nature (thin or thick, stainless steel or terracotta, etc.) of the baking pan I’m using to cook it.

Last but not least, what value should I select if I want to bake a dish which is not represented in the small available set of values?

At the end I may use another function than “Cake” to bake a cake, just to have the appropriate heat position, and I may not even be able to find the good one…

Actually, when I select a function with the button I have to guess how, internally (in terms of temperature and heat position), this baking mode will be handled. That is a bad API design: I should not have to make this computation effort by myself: each function of an API should have an obvious meaning.

The real problem here is that the concepts exposed by the API are not the good ones. It’s probably clear from the beginning, but I don’t reason in terms of kind of food to use my oven, I reason in terms of temperature and heat position. Hopefully there exist brands that provide such an API, see for example this one:

Oven of the Brandt brand

Here the top left button allows to set the heat position. The API is far simpler by the way…

What can you learn from that?

Sauter reduced their API to a small set of specific use cases. They do not provide more general functions that would however allow to use the oven in more situations and would even provide more control to the user.

In summary:

  1. If users need to think about what’s going on internally to decide whether to call one of your API function or another, you might not have captured the right concepts ;
  2. If your API reduces the power of control of the product, you might not have captured the right concepts ;
  3. Don’t buy Sauter’s ovens (prefer Brandt’s ones) ;
  4. Eat strudels. Here’s my recipe of the apple and walnut strudel: Mix 150 g of flour with 30 g of butter, beat a small egg with 50 g of sugar, and pour it on the flour. Mix them all to obtain a smooth dough. Let aside. Peel three or four apples, slice them (1cm) and sauté them on medium heat until golden in a pan with some butter, sugar and a vanilla bean. You can use cinnamon, but I prefer vanilla. Open a handful of walnuts and coarsely chop them. Sauté them with a spoon of honey (chestnut honey worked fine for me) on medium heat. Deglaze with cognac and flambé. Finely roll your dough (3mm x 30cm x 25 cm), put it in a baking sheet. Dispose a layer of apples in the middle, then a layer of caramelized walnuts and another layer of apples. Fold the top of the dough on the filling, then fold the sides and, last, fold the bottom so that the filling is well wrapped. Bake at 180°C for about half an hour.
blog comments powered by Disqus