I love solving problems. I also love efficiency. Put these together and you have an algorithm. Put me in the kitchen and you have an algorithm to soften butter.
I can’t remember when it began, but before I got married, I rarely (if ever) had the need to soften butter. However, that all changed the day I married an avid baker, after which time I have the pleasure of serving as sous chef quite often.
Not only am I an engineer by profession, but I am an engineer at heart and have a deep desire to understand how things work and why they work the way they do. I am always looking for ways to improve and streamline processes, which is great for my work as a software engineer, but not the best as a sous chef, whose chief objective is to execute what the lovely master chef has requested.
I have to make such a focused effort not to ask so many questions while measuring out one cup of flour, or fetching the olive oil from the pantry, and sometimes I am more successful than others. However, sometimes the nerdy sous chef has an idea that help and this was one of them…
The Problem
In a perfect world, you have your act together and you plan your kitchen activities well in advance, and pull out your butter two hours before you need it softened. However, in the craziness of life, and due to spontaneous “I’m making a cake tonight”, it happens that your butter is hard and you need it soft FAST. There are a number of approaches to expedited butter-softening, such as water baths, cutting the butter (one could call it butting) into small blocks, pounding the butter, but those are more advanced techniques. We typically turn to the microwave.
The Algorithm
One key element of successful microwave butter-softening is rotating the butter for equal coverage and to avoid melting. This is simple in theory but the turntable plates make it difficult to know which way to flip the stick of butter when you open the microwave door. To avoid confusion, just follow the simple algorithm below. All rotations are around the long butter stick axis.
- Heat for 4 seconds
- Rotate butter 180°
- Heat for 4 seconds
- Rotate butter 90° in any direction
- Heat for 4 seconds
- Rotate butter 180°
- Heat for 4 seconds
Voila! Your butter should be ready to go. Notice that rotating the butter like this ensures that you will never microwave on the same side twice, and you don’t have to keep track of which side is which. Adjust the 4 second time if your microwave heats a little hotter/cooler.
The Code
Of course, there has to be code associated with this 🙂 This assumes right-handed coordinate system with positive X pointing along long butter axis and positive Z pointing up. Using quaternions to avoid buttery gimbal lock of course:
And here is the output:
Let me know how your butter-softening goes and hopefully this helps!