Baking is an ancient science, based on the principle of alchemical transformation: the combination of disparate elements, that, in the presence of heat, becomes a new substance. Masters of the art can describe these substances in terms of their component molecules down to the percentage point. A recipe for a baked good is a chemical formula arrived at after centuries of trial and error. Which is why it becomes necessary to ask the question: why are you fucking around with it?

We’ve all seen gruesome baking disasters. Some of us may have even been personally responsible. It usually takes place on a special occasion — a holiday like Thanksgiving, needless to say, is a big one, but it could also be a birthday, or even a lowly potluck. Some poor schmuck, who probably should have learned their lesson last year but marched right back into the kitchen anyway, has taken it upon themselves to bake something, and it didn’t work. A cake that fell flat. A pie that didn’t set. A loaf of bread that didn’t rise. Cookies like hockey pucks or tennis balls. Brownies like gravel in the mud after the rain.

I once made what I thought was the most innocuous possible modification to a recipe: using a different shaped pan. Shortly thereafter, the oven floor was covered in cake batter, the kitchen was full of smoke, and the fire alarm was blaring. I'm not saying this will happen to you. But it happened to me. Surely this isn't an experience you want to share with your extended family at Thanksgiving dinner, even if you have been tempted at times to burn the house down.

It is possible that some of these disasters have been the result of unavoidable accidents, or faulty equipment. Not all ovens reach the temperature they claim to, for example. In rare cases, these outcomes may be due to handling errors that can only be solved with practice. But the usual explanation is much more simple, and it is your fault: you are not following the recipe.

“But I hate following recipes!” This is the refrain of a person who believes their rugged independent spirit can only be expressed through failing to produce satisfactory baked goods. This attitude is misplaced. Here is the fact of the matter: if you hate the following the recipe, you can’t bake. You will not be able to do it.

It is not the sole province of culinary school graduates or wise old villagers to know how to bake.

Next time you bake something and it doesn’t work, ask yourself the simple question, “Did I follow the recipe?” Maybe you were thinking, well, I only have two eggs left and I want to save one for breakfast tomorrow, so I’ll just use one. What difference can it make? Or you thought, a whole stick of butter? That seems like a lot, and I’m considering going vegan anyway, so I’ll use half. Or, you’re on a vague health kick, so instead of white flour, you used some shit from the Old Testament like sorghum or amaranth or whatever. These are modifications that will cause your baking to fail.

Stories of these disasters abound in comments sections of online recipes, or in the novellas that precede posts on recipe blogs. You will often see desperation, indignation, or even rage over a recipe that did not work, in cases in which the accuser openly admits to having not followed the recipe. Someone replaced a cup of sugar with a pinch of stevia, or swapped in protein powder instead of all-purpose flour. I shudder to think of the results.

The thing is, there is usually no trick to baking. It is not the sole province of culinary school graduates or wise old villagers to know how to bake. Remember Auguste Gusteau’s maxim from Ratatouille, the second best cooking movie after Big Night and the second most communist children’s movie after The Lego Movie: “Anyone can cook.” It is all there in the recipe and if you follow it you will most likely end up with something that tastes good. This is not an elitist principle, it’s an egalitarian one. Following the recipe allows you to do things at home that Big Pastry doesn’t want you to know you can do.

There are limited kinds of alterations you can make if you know what you’re doing, like using a different kind of spice or a different flavor extract. But the basic elements — flour, fat, water, and sugar — are carefully calibrated. This is a way that baking differs from ordinary cooking, in which there is room for observation and response. You can control what is going on in a pan on a stove in a way you cannot behind a closed oven door. There are some rules, sure. For example, you should not, as my roommate regularly attempts to do, fry things in hot sauce. But if you like garlic and want to add an extra clove, or if you think parsnips would go better than carrots, or you want your meat seared darker or your sauce reduced thicker, you can do that. You cannot do this to a cake or a pie or a loaf of bread.

Bread is the trickiest proposition, and I am assuming that anyone who is foolish enough to improvise with baked goods without being a professional pastry chef has not even tried it. So we’re concerned primarily with chemically leavened baked goods, which get their structure from a chemical reaction between acid and alkali components. You know the old science project of making a papier-mâché volcano erupt by putting baking soda and vinegar in it? Baking powder, a combination of baking soda and an acid salt, is a dry, spring-loaded version of this. When made wet and heated, it releases gases that inflate the dough or batter, giving it lightness and texture. When you use baking soda separately, it’s because there is something else acidic in the batter or dough, like buttermilk, lemon juice, or molasses from brown sugar.

Every ingredient has specific effects. Flour adds not just starch, but protein, chiefly the much-maligned gluten. There is no substitute for the structural integrity of gluten, which creates strands that make for a toothsome crumb. If you want to use a gluten-free flour, that changes everything and should not be done without the supervision of a recipe designed to be gluten-free.

Fat, usually in the form of butter or oil, creates tenderness by reducing the length — “shortening” — strands of gluten. Sugar doesn’t just sweeten. As food scientist Harold McGee describes, “In addition to being sweet, sugar is ‘hygroscopic’: it absorbs moisture, hangs onto it, easily dissolves in it.” I’m not sure that’s a real word, but what we need to know is that less sugar can make something gummy or dense, or keep it from setting. Eggs overlap all of the above, but can also add emulsification, the way they bring oil and vinegar together in mayonnaise. To create a baked good that holds its shape, tastes good, and is digestible, all of these elements need to be in harmony and not in conflict.

Consider an article at the Atlantic called “How to Improvise in the Kitchen.” The author — a former professional cook — lauds a reader of one of her cookbooks for making an alteration to one of her recipes, for a chocolate cake. Instead of regular salt, the reader used herb-infused salt. This is a change — swapping one kind of salt for another kind of salt — that will work, and is ultimately less impressive than it’s made out to be. But she compares it to an alteration she herself made to a recipe:

When I scrutinized the Charcuterie recipe, I realized it was essentially a brownie recipe with a little more liquid. So, I shifted the balance of flour and sugar to bring it back into brownie-dom, only I used Valhrona 70 percent cacao chocolate and baked the batter (actually, I slightly underbaked it) in a round pan, so I could slice the cake into wedges.

Do you know how to do this? I don’t. I would not know the proper ratios of flour and sugar to create “brownie-dom,” nor would I know precisely how much to underbake, since a cake’s texture continues to develop after its removal from the oven, or how the temperature might have to change to accommodate a different shape. There is just too much going on here.

A similar article at Epicurious notes the frequent deviations from recipes confessed to in its comments. Although it is strangely permissive of this objectionable practice, it does mention how dangerous the whole thing is:

Make one small change, and the whole recipe could fail. You might want a less sweet cake, but use less sugar and the texture of the cake will be different. You might want to add nuts, but those nuts could add extra oil, meaning the batter will bake differently. Or you might want to increase the lemon flavor, but the acid might react with the eggs, turning the cake gooier (or drier).

Remember, this is science. Your kitchen may not be a laboratory in Los Alamos, so the stakes are not terribly high. But if it was, and you were Robert Oppenheimer, and you decided to change a whole cup to a half cup because you felt like it, you and the population of New Mexico might not have liked the result.

On a much smaller scale, the same thing is taking place in your oven. This is why you have to follow the recipe. It is not the time for intuition. It is no place for whimsy. No one wants to be responsible for a mushroom cloud or a sunken cake. There is a way to avoid this, and you already know what it is.