Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah. Lots of hand waving in the piece because it was a choice between something I could write in a morning for a general audience or, frankly, not bothering to write anything at all.

A bakery formula is an acyclic directed graph running from top level “product” nodes (a loaf of bread, say) through one or more intermediate formulae until you reach basic ingredients. For a given set of orders, you need to work out how much of which ingredient to mix at each step in the process. If I were only working in, say six loaf batches, it’d probably be easier to use a ready reckoner approach, but it’s a tiny bakery and I’d rather not deal with the wastage so I only bake what’s ordered.

After about the third time I fucked up the pencil and paper calculations, I decided to automate (then at least the bad calculations were repeatable, and only needed fixing once).



> A bakery formula is an acyclic directed graph

I'm so glad to see other people think of recipes this way. I have so much trouble keeping track of what's going on in a complicated recipe because of the linear way it's written. I have good results rewriting them as a DAG on an index card (or the back of the recipe card) and just following that instead of the recipe.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: