Today I'll just lay out the problem I'm trying to solve, and tomorrow we'll walk through the code to solve our problem.
On a summer weekend, I can't help but listen to the call of the grill. We're in the northern hemisphere here, my apologies to those currently in winter that might feel left out.
One of the things I'm always striving to improve is the rhythm at which I get things off the grill, so there's a good flow of food that minimizes waits but doesn't outpace the diners and lets any item grow cold or dry out.
A first step is figuring out in what order to place things on the grill and prepare other items. Here is a short list of what I had to prepare recently.
Here is a list of "what things need to be ready before I can start with something".
Now, imagine that this is a graph, where each item is a node, and each dependency is an arc. There is an algorithm that enumerates the nodes in order such that all dependencies appear before their dependant node - a topological sort. We'll look at the code for that tomorrow then.
Enjoy!