top of page

# Computer Coding: A Coding of Butter on a Muffin of Math

First thing in the morning: cue sunrise. Cue alarm. Cue reaching over and hitting the snooze button on your cell phone. Cue alarm re-ringing. Cue turning off the alarm and climbing out of bed, only to realize you hit snooze one-too-many times and you don’t have time for breakfast.

Ugh.

What if there was an easier way? What if you could program a robot to make your breakfast for you? Introducing the Morning Muffin Breakfast Butterer.

Edible Algorithms

We’ll casually gloss over the engineering involved in building your Breakfast Butterer so that we can focus on the math involved in coding it. But by the way, robotics engineering is also heavily dependent on mathematics. We’ll allow you a few minutes to construct the robotic arms that will open your muffin container and pull one out, put it on a plate, give it a nice slice, and butter both sides. (Bonus points if it can pop it in the microwave for a morning warmup.)

What’s the first thing your Butterer has to do? Decide when to pick a muffin, of course. You’ll probably have to program the Butterer to wake up and start working once you’ve turned off the alarm on your phone. This will require an algorithm with a series of if-then conditions and corresponding actions, much like what’s inside the most complicated cell in your favourite Excel spreadsheet.

Maybe you’ve left a stack of plates next to the machine, and it will have to sense the top plate and pick it up. To prevent broken dishes and squished muffins, you might want to program some sensitivity into the machine so that it can calculate the appropriate amount of force to use to lift the plate and place the muffin on it. You’ll also want it to gently hold the muffin while it calculates its exact centre and delivers a perfect slice.

Once it’s halved, you may want to program the Butterer to choose the amount of butter proportionately to the size of the muffin. This will require some ratio calculations and perhaps precision weighing. And for the most important part, your machine will need the geometric capabilities to understand the shape of your muffin halves and cover them appropriately.

And finally, when this is all completed, it wouldn’t be a bad thing for your Breakfast Butterer to give a little chime. Order up!

This is of course a relatively silly example, but that doesn’t make it a simple one. The most seemingly insignificant dictates of programming are layered with complex algorithms and formulas, calculations and conditions.

From Cyberspace to Space

And we can take a much more remarkable example. NASA’s Artemis 1 has just launched its first mannequins towards the moon, a step towards putting human boots back in the moon dust. It’s no secret that space exploration is dependent on a mountain of fine-tuned mathematics and analysis and modern space science cannot function without critical artificial intelligence infrastructure. All of that AI must be perfectly programmed through computer science and coding.

AI is responsible for crunching massive amounts of data analysis into meaningful results, giving scientists critical parameters for mission safety or key insights into what might be worth exploring. The effects of gravity and temperature changes during a mission, the weight of a rocket or a space station, precise navigational parameters for a given objective, all must be worked out and translated into computer language. Computer programs also govern active missions themselves, contrasting real-time feedback with established parameters and making adjustments or issuing warnings on the fly. The AI needs to know what to look for, how to present its findings meaningfully to human observers, and what action should be taken in a given scenario. All of these complex instructions must be coded into the software, drawing from geometry, calculus, physics, algebra, engineering, modelling, and many more mathematical fields in order to ensure human safety, capital stewardship, and maximum learning output.

Coding and Math: An Inseparable Duo

Regardless of whether code is being used for launching lunar missions, buttering bread, or steering self-driving cars, the language of artificial intelligence is dependent on precisely curated algorithms, variables, and outcomes which are often fine-tuned according to rigorous mathematical calculations. Like math, coding runs on a consistent set of rules that produce outcomes based on invariable logic. Small changes in formulas can result in drastically different outcomes because, like math, there is no room in coding for vague or subjective interpretation. To avoid skewing results, all interruptive variables must be accounted for.

It is for this reason that studies in mathematics and computer science are often closely related in universities, often sharing the same faculties or even being combined into synergistic degrees. Collaborative expertise in mathematics and coding is in high demand in a plethora of fields such as robotics, business or medical analysis, economics, software engineering, and yes, aerospace science.

And it makes sense: computers are designed to compute, and human beings behind the scenes have to design the levels for the computers to do their computing on. Computers don’t replace human expertise but amplify it. To wield artificial intelligence to its utmost, human beings have to develop and input the skeletal mathematics the computer program must execute.

Think back to your breakfast. This “skeleton” of foundational math is essentially the muffin underneath your butter in the morning. Computer coding packages the muffin in a way that’s palatable, or digestible, to the computer by translating it into a language the computer can understand. The muffin is the important part. Unless you prefer just having butter for breakfast, if you want to be a computer coder, you’ll have to brush up on your baking skills and learn to make mathematical muffins really well.