Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe timing #3

Open
norm opened this issue Jun 27, 2020 · 3 comments
Open

Recipe timing #3

norm opened this issue Jun 27, 2020 · 3 comments

Comments

@norm
Copy link
Member

norm commented Jun 27, 2020

I find it helpful to have a guide as to how long it'll take to cook a meal. Especially when the first step is "the day before, prepare…" such as when marinading chicken.

I suggest a key at the top of the recipe object time which contains an object containing timings, something like:

'time': {
    'advance': 3600,
    'prepare': 30,
    'cook': 60,
}

Keys could be arbitrary or specified.

At its simplest, values would be an integer representing the minutes. But I am also thinking of a recipe that has a prep which has rice refrigerate "for at least two hours, preferably overnight." and how that could be encoded with min/max values.

@jaylett
Copy link
Member

jaylett commented Jun 27, 2020

As with quantity, I think there needs to be a complex type to accommodate your last point. Since minutes are not SI, and indeed since your example is clearly not in minutes I think the complex type (including units) should be mandatory to avoid confusion.

Defining the complex type would allow us to use it optionally on steps.

I think the key should be "timing" rather than "time".

I'm not sure I understand what "advance" means. Things you do before prep, but which are themselves preparatory? This opens up questions about the underlying object model of steps with prep attached to ingredients. Would it be better to extend ingredients[n].prep to have timing, and steps[n] to have timing, and then suck them up to top-level at render time? (An optional top-level timing could give an overview / simple version to display where there aren't detailed timings.)

For instance, take your key lime pie. There's prep on the butter:

        {
            "name": "butter",
            "quantity": {
                "amount": 250,
                "unit": "g"
            },
            "prep": "melted"
        },

which could be:

        {
            "name": "butter",
            "quantity": {
                "amount": 250,
                "unit": "g"
            },
            "prep": {
                "timing": { "count": 5, "unit": "minutes" },
                "task": "melted"
        },

or similar. (The keys aren't great.) Or, you just do:

    "timing": {
        "prep": { "count": 5, "unit": "minutes" },
        "cook": { "count": 70, "unit": "minutes" },
        "stand": { "min": 60, "unit": "minutes", "narrative": "at least an hour, preferably overnight" }
    }

The last demonstrating basically the same problem in reverse, that we have "post" steps as well as "prep" steps. (The "melt" prep is actually in step 2 in the recipe, confusingly.)

@norm
Copy link
Member Author

norm commented Jun 27, 2020

Are you saying you do not prepare things two and a half days in advance?

I would be fine with timing in individual steps, although a lot of recipes only have aggregate times available so it should be fine to be at the root level too. And presence in one step should not mandate it being in every step.

The thought behind advance was roughly that there are things you do in advance of the point where you start preparing. Such as marinading. In my head a thing you do the day before isn’t the same kind of prep as chopping stuff just before you start cooking. But I’m not wedded to the distinction, it does still count as prep.

(I also have thoughts about being able to overlap steps when it comes to timing, but not explored it on my whiteboard yet.)

@jaylett
Copy link
Member

jaylett commented Jun 27, 2020

Are you saying you do not prepare things two and a half days in advance?

I sometimes manage to soak chickpeas overnight…

There's a generalisable problem here about sequencing, although it's the one we generally agree not to tackle. I also still strongly suspect that recipes are most useful with the balance of prep attached to ingredients rather than steps for everything (and optional … between them). Since horsefort I have changed the way I cook slightly in that I tend to do all the prep in advance (unless there are Suitable Big Gaps) rather than trying to chop things while cooking other things. Which is a way of saying that the current strategy is probably useful in helping people be sensible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants