Live data from Hacker News

Thinking about recipe formats more than anyone should

rknight.me

31–40 of 140 posts

Re: Thinking about recipe formats more than anyone should

#31
I’ve recently been caught up on noodling on the combinatorics of cooking food. I wonder if a structured recipe format would be helpful to explore the ‘solution space’ of any given dish.

For example, think of all the decisions required to specify a curry dish:

How do you cut/mash your garlic and ginger and onions? (If you even add all of those ingredients)

Do you use whole or ground spices? What about for each spice? Cardamom pods or ground cardamom?

Do you toast each spice?

How long do you cook your onions?

And so on. Eventually you get to an absolutely gigantic amount of options that all generate a somewhat similar dish, but with key sensory differences. They may all be ‘chicken tikka masala’ but I’d argue you’d have a very different eating experience across that decision spectrum.

I think this may also play (specifically for Indians) into the idea that moms is best. It’s probably because mom’s is universally unique and you crave that nostalgia.

Re: Thinking about recipe formats more than anyone should

#32

I find "higher level" format issues to be of greater concern. These are issues like: is the recipe structured in a way that makes the prep/process flow clear, makes it obvious when a certain ingredient needs to be prepped but divided into multiple parts for use in different stages, or when different stages lead to products that are combined and subsequent poisons in the workflow? A recent example: I really like the H…

Presentation and structuring is really, really important. The best I've found so far is a multicolumn format: https://i.imgur.com/w0UrJt5.png Column 1 is the quantity. This doesn't really belong in the first column but it matches traditional ways of writing things and doesn't cause any actual trouble to do it that way, so whatever, we can do it that way. Column 2 is the ingredient. And column 3 is the cooking instruc…

Take a look at my website, https://letscooktime.com/ and let me know what you think of the way I render recipes. There is an internal representation like this: 1. A recipe is composed of multiple components 1. A component is composed of ingredient requirements and steps 1. An ingredient requirement is a tuple of an ingredient and a quantity

I found good success using this model for recipes, specially complex baking recipes like breads with multiple repeat ingredients.

Re: Thinking about recipe formats more than anyone should

#33
post #30
post #25

Earlier quoted context omitted.

What if the same ingredient is used twice in a recipe, for example for cooking and finishing?

I think of them as 2 different nodes, 2 instances of the same type of ingredient. Practically I just have it listed twice if it's important like butter. https://cookbook.cstebbins.com/recipe/the-best-swedish-meatb... otherwise if it's a staple like salt I just say something like "stir in and season with additional salt and pepper to taste" like in https://cookbook.cstebbins.com/recipe/sloppy-sophisto-joes

> I think of them as 2 different nodes, 2 instances of the same type of ingredient.

But this is inconvenient during the shopping step of the process. There you want all uses of an ingredient (possibly across multiple recipes) collapsed into 1 node.

Re: Thinking about recipe formats more than anyone should

#34
post #20

IMHO for mostly text data where you need a bit of custom formatting(e.g. cooking recipes) I would probably choose to go with AsciiDoc and then just adapt a rendering engine to make it look pretty. This way you get all the tooling and learnings that AsciiDoc has accumulated over the years and avoid having to spend time on a DSL and edge case detection that inventing a new standard will require.

Also the people writing recipes (my parents for example) are _most definitely_ not going to learn a DSL, they just want a text box where they can type whatever they want. If you care about having structured data, other humans with more structured proclivities need to do that for you.

Re: Thinking about recipe formats more than anyone should

#35
I've also spend a bit of time thinking about recipe formats because I wanted to write down some recipes for my website. Ended up making a custom yaml-based format after looking at the available options and after a while scrapped that again to make a new toml-based format to make it a bit easier to write.

The format is pretty well demonstrated at https://git.sr.ht/~martijnbraam/fathub-data/tree/master/item... which renders to https://fathub.org/en/recipe/indonesian/main/mie-goreng.html

Some notable features is a mini DSL to refer to ingredients in the instruction text and also have parse-able times and temperatures so on the frontend it's easy to switch units with javascript. This is combined with a simple database of ingredient IDs which contains (translated) names and for some of them the density so you can swap the recipe between volume and weight measurements.

Re: Thinking about recipe formats more than anyone should

#36

The replies to this post are, unfortunately, very indicative of the negative side of the "(pseudo-)engineering mindset", which is rather close to the model-constructing mindset inherited from economics (reductionism, hiding any variety incurred by real world complexity, etc). I don't see very many people here who seem to really have done a lot of cooking, consider it a serious hobby or profession, etc. None of these…

I'd love your opinion on my cooking site https://letscooktime.com/

Though I'm a software engineer, my main user is my mother-in-law who was a nurse all her life and now likes to bake. Check out for example, this multi-component recipe for Brazilian empadas: https://letscooktime.com/Recipes/Details?id=bc786a2f-50ec-4f...

Re: Thinking about recipe formats more than anyone should

#37
post #33
post #30

Earlier quoted context omitted.

I think of them as 2 different nodes, 2 instances of the same type of ingredient. Practically I just have it listed twice if it's important like butter. https://cookbook.cstebbins.com/recipe/the-best-swedish-meatb... otherwise if it's a staple like salt I just say something like "stir in and season with additional salt and pepper to taste" like in https://cookbook.cstebbins.com/recipe/sloppy-sophisto-joes

> I think of them as 2 different nodes, 2 instances of the same type of ingredient. But this is inconvenient during the shopping step of the process. There you want all uses of an ingredient (possibly across multiple recipes) collapsed into 1 node.

for sure! The use case I'm solving for myself is easy lookup while I'm cooking which is different than the use case of me going shopping

Maybe someday I'll add a feature to grab a shopping list. Could organise it into sections of the store and do a quick traveling salesman problem :D

also due to the conciseness of the grid, it's also not great if you're making it for the first time

Re: Thinking about recipe formats more than anyone should

#39
post #15

Just finished my own overthinking of recipe structures. I figure that a recipe is more or less an upside-down tree! Where you start with a list of all the nodes (ingredients) Have a n:1 relationship with the next series of nodes (steps) until you finish at a single node (the dish you're trying to make) So instead of having a separate chunk of "here's my ingredients" and "let me repeat the ingredients and one by one i…

Wow, all recipes should look like that, nice work!

Re: Thinking about recipe formats more than anyone should

#40
post #13

Earlier quoted context omitted.

Reminds me of the cookingforengineers.com format to some degree. Here's an example. You'll need to scroll down to see the actual recipe format. https://www.cookingforengineers.com/recipe/194/Cream-of-Mush...

After reading another comment here about a recipe being an “upside down tree” I now understand what at least this format is trying to accomplish. It has some really nice properties, but trades off a key feature of the gantt format: your hands can only be doing one thing at a time. With the gantt format it’s very clear what you are supposed to be doing at any time and it preserves the order of operations. It doesn’t e…

> but trades off a key feature of the gantt format: your hands can only be doing one thing at a time. With the gantt format it’s very clear what you are supposed to be doing at any time and it preserves the order of operations.

In the cookingforengineers.com (COE) format, the order is to do each step in the first column and then move right to the next column and do those steps, etc.

Post reply on HN