The other day, I thought to myself: why don’t I try baking something sweet with nutritional yeast? So I started looking for recipes that I thought could use a bit more umami cheesy flavor in them, and thinking about sweet baked goods which would do well with cheese added.
Then I realized, this is exactly the thought process that I use to figure out how to solve difficult Foundations of Math (the first math class here that requires proving things) problems. And this is exactly how I work out complicated algorithms to solve CompSci homework problems, too. I ended up deciding to make jam bars with nutritional yeast, feeling perhaps a little too cocky after reading a recipe for cheddar cheese jam bars (basically it was a pie-esque crust, with jam smeared on top, then baked).
I want to quantify this thought process, because it’s thinking about thinking which is meta which is apparently “cool” right now, and because it’s crazy cool that Coding and Math and Cooking can all be approached in the same sort of general way. I’ve decided this is going to be a three step process (update: it’s a five step process actually). The steps are: start, try some things, evaluate whether things work, try some things with extra creativity™, and finally talk peoples’ ears off.
[A brief explanation of proofs: they’re a thing in higher math classes, where you have to prove a lot of things that you know intuitively (and some that aren’t intuitive at all). They’re usually phrased as if then statements. The if portion is called the hypothesis, and the then is called the conclusion. The statement is true if the conclusion is always true when the hypothesis is true. It’s kind of a painful process, and while the writing itself has to be concrete sequential, the process to find the logical steps is – at least for me – pretty abstract random.]
Step 1. Figure out where to start.
Cooking: this involves thinking of the original idea (I like peanut butter, I like blackberries, why not put them together? [<– look! I just linked one of my own articles! This makes BnB like a real blog now, right?])
Coding: this usually involves expressing what I’m trying to do in plain English (For example, “I want to write an algorithm which, when given a list of the GDP (in US$) value of every country, will return a corresponding list of values that have been scaled to the range [0, 1]”)
Math: the first step of writing a proof, or at least of writing the proofs we’ve been doing so far in FoM, is creating an arbitrary element (though I suppose a more general form of this would be to assume the hypothesis, which in a lot of our cases have been that [read: x is a real number]).
Step 2. Try the easy stuff first.
Cooking: Make whatever it is!
Coding: convert the plain-English understanding of the program into actual code.
Math: I usually take the hypothesis, and do some algebra on it for a while (5 or 10 minutes). The end goal is to reach the conclusion doing only algebra (thus establishing a direct proof).
Step 3 (optionally the last step). See if it worked. Evaluate and decide whether creativity™ is necessary.
Cooking: Decide whether or not it was satisfyingly good. If not, proceed on.
In the case of the nutritional yeast experiment, I ended up making half the crust yeasty and half of the crust plain, and some friends and I did a blind taste test (read: I forgot which side was which). Everyone agreed both sides were good; there was some disagreement on which was better…not quite the reaction I had hoped for, though definitely better than I feared. I’m taking the nutritional yeast baking onto step 4.
Coding: Test it. If it doesn’t work, proceed on to step 4. In the case of GDP scaling, I ran the algorithm on a couple more manageable lists to make sure that it was working correctly (like, the numbers[10, 11, 12, …, 20], which scaled to [0, .1, .2, …, 1]).
Math: Evaluate whether or not you’ve reached your conclusion. In the cases where I can’t do it via simple algebra I’ll go on to step 4.
Step 4. Try, try again. This step involves applying creativity™ to the problem.
Cooking: Some things, I think, can’t be salvaged. But in most cases, I’ll just think about whatever recipe I’m working on, and google about the recipe I’m working on, and imagine different tastes and how they would combine, and eventually end up somewhere new and delicious.
In the case of the nutritional yeast sweet baked goods, I’m in the think more about it phase. In the interim, we’re using the nutritional yeast crust recipe tomorrow night to make what will be the absolute most delicious shepard’s pie of all time.
Coding: I’ve only reached this point – where my code isn’t working but my algorithm still strikes me as correct – a handful of times. And every time, I’ve had the same solution: write a GUI (graphic user interface) for it so I can visualize it fail.
In Intro to CompSci 2, we had an assignment to write code that could solve a maze. I thought it out, thought I had the write algorithm, and wrote it. It didn’t work. Tried throwing it all away and writing it again, still didn’t work. So I made a GUI to let me see what was going on in my algorithm and voila! I don’t recall quite where my mistakes where, but I found and corrected them. It was extraordinarily satisfying. I’ve also been known to code GUI programs to help me with my math homework.
Math: When proving things, hitting this step means that the way to go about writing the proof isn’t immediately obvious to me. And that means it’s time to look at it from a new angle: my goto is usually proof by contradiction, but sometimes I’ll go with induction and other times I’ll try restating the sentence and substituting in definitions to help see it through a new light. Another strategy that I use (especially on the problems of the week, or in figuring out whether the statement I’m trying to prove is actually true or not) is to intuit different sets that could aid in my thinking (powers of two, primes, squares, etc) and think about the statement in light of those different sets. I often refer to this step as “dicking around with problem”.
Step 5. Cry because I’m inadequate (that’s a joke! This step is actually called talk it out).
I’m not now and never will be the end all be all of cooking, coding, or mathing. If I feel like trying different and creative things just isn’t working (or in the middle of trying different creative things) I’ll talk to people about it – mention the recipe idea, algorithm, or proof problem to a friend, professor, or person next to me in line somewhere (except not actually the last one).
And so there you have it: the intersection (heh, this is funny because that’s a math term) of Coding, Math, and Cooking. Who knew? I sure didn’t; when Molly and I started this blog we did so because both of us liked computer science and both of us liked cooking and we thought, why not make a blog about both? I noticed, when I was writing a recent PolySci paper, that I was sort of approaching the thing like a math proof where I had to show that all of these facts demonstrated that my analysis was accurate.
I can’t decide whether I like that I kind of recycle the same thought process in all of my activities. On one hand, it’s cool that I’m the same me no matter which academic building I’m inside of. On the other hand, if I engaged in totally different methods of thinking in different subjects/aspects of life I would (perhaps?) be able to force myself to cross-apply thought processes and have cool things happen.