Hacker News new | ask | show | jobs
by duped 1091 days ago
> Slowly add @milk{4%cup} [- TODO change units to litres -], keep mixing

No! Handle units! @milk{4%cup} should be trivially convertible to liters and configured by the user. For harder conversions (volume to mass) keeping a list of ingredients and their densities (configurable of course) would be extremely useful.

On that subject, being able to specify a recipe in terms of ratios and then automatically convert it to scale would be a super power that I can't beat by hand.

For example when I bake I do everything by weight and have all the recipes I like written out by hand with unit conversions. Because measuring by volume isn't easier in 2023 than placing your mixing bowl on a kitchen scale and balancing everything to the mass of your butter and eggs.

7 comments

"No! Handle units! @milk{4%cup} should be trivially convertible to liters"

No! That's silly and it's not how cooking works! This way you get stupid recipes like on American cooking Youtube channels that just run their volumetric measurements through a converter and end up with recipes that call for 234 grams of flour, 13.5 grams of this or that spice and 78 ml of whatever. Recipes are (well, should be) tuned to the measurement system they use, and packaging availability in the area it targets, so that you get recipes that use e.g. 400ml of coconut milk (because that's the most common can size around here), whole numbers in amounts of ingredients etc. Converting between units in cooking and baking is not simply using a unit conversion calculator on your phone!

(and that's not even mentioning that there are UK, Australian and US cups, tablespoons and teaspoons)

There's a simple and obviously correct answer to this problem: the markup language should support only standard SI and conversions to weird Angloamerican units should be made from those base units.
The direction of conversion doesn't matter. If a recipe starts out with 300 gr of flour, and that gets converted into 1 3/4 cups + 2 tbsp, that's useless (or at least silly and cumbersome) for an imperial unit user. The whole recipe needs to be recalibrated to use imperial units, and that conversion needs to take culture (I should probably say 'locale', I'm not sure what the right term is here) into account, so that it would use 'sticks of butter' in the US and 'grams of butter' in Australia. I don't think this conversion can be automated.

My point is - recipes cannot be converted easily between unit systems. There is more to converting a recipe than applying a ratio table.

> For harder conversions (volume to mass) keeping a list of ingredients and their densities (configurable of course) would be extremely useful.

Actually the USDA maintains this information in the FoodCentral database. I built a recipe management website using this information, for example check out this page: https://letscooktime.com/Recipes/Details?id=09989dc1-ee98-4f...

I think Cooklang is neat but non-developers are never going to learn it to write recipes. CookTime (my website) allows you to write structured recipes using a GUI, and soon you'll be able to use AI to just enter in random text and images and import them as recipes.

You're going to be really sad when you learn there are at least 3 standard definitions of "cup". iirc 225mL 240mL 250mL
Also 200mL, and if you go into older standards (sometimes needed to read a grandmother's cookbook) it could also mean 180mL, or 175ml.
Baking is very suited to ratios, cooking less so. Bakers commonly talk about percent hydration, which is how much water there is compared to the flour.
This is only because most recipes are incredibly imprecise. Chefsteps have gram measurements for almost everything, baking or not, and have a scaling tool built into their recipe view. It's incredibly useful.
At a certain point you run into physical realities of living, growing things. You can use ratios to make homogenized items (mashed potatoes or sauces or caramelized onions or sausage). But even if you had two chicken breasts of the same mass they'll need different amounts of sauce or coating since they'll have different surface areas, and different cook times since they'll have different volumes.

I think any recipe for roasted vegetables has to be by volume of the chop/dice fwiw. There's lots of ways to chop carrots into 20g chunks, but they won't all cook well or evenly, so a 1/4" dice is what you'd call for (even if you call for 600g of carrots)

One problem with cooking is that your pans and heat transfer do not scale. So you cannot just arbitrarily scale up/down recipes, even if you take precise measurements. The result may be way too watery or dry, for example.

(I guess this would also apply to baking anyway.)

My wife makes sourdough, and this frustrated the hell out of me when she started. I asked her what hydration meant, and she said how much water was in it. So of course I told her to do water/water+flour.

Nope, apparently it's just water/flour...which doesn't make sense to me, as it allows 'hydration' to go over 100%.

Why water/water+flour and not water/water+flour+salt+starter? Because water:flour is the key relationship - that's what dictates the outcome. I think some people who do a lot of enriched doughs will give everything as a percentage of the mass of flour, pretty convenient.

Really it's _just_ the ratio, normalized to 100 for convenience

You're right, I meant water+flour+starter denominator. Didn't figure salt would matter enough.

My math brain wants everything as a percentage of a whole, but I see how it's simpler the way it is. Especially since the starter also has some relatively unknown amount of water and flour inside itself.

The starter has a mostly similar percentage of water. And there isn't that much of it anyway to make a significant difference.

I'm not that experienced with baking, so take the above with a grain of salt!

Once you're going for consistent loaves eg selling them to people who expect them to be the same every day, you do have to factor in hydration of the starter. Usually you keep it the same as the dough for simplicity but there are reasons why it might make sense for them to be different.
While I agree it is unintuitive, it is super practical when calculating the recipe.

Making a 80% hydration pizza dough? Just measure how much flour you added and multiply by 0.8!

Kitchen scales start to have this feature built in at around the $60 point too. Dramatically simplifies bread baking, pickling, and a couple other pure ratio projects.
When I started baking, the precise measurement was the first thing that I threw out. When I did things “by eye” I got better results. I think it’s because the person writing the recipe doesn’t have the same water, flour, starter or salt as you. I take the measurements as “very general guidelines”, now.
Serious American bakers mostly use Diamond brand kosher salt. Serious bakers universally will specify if they're using kosher or table or some other salt, because they pack differently and provide different effects.

You're going to be much closer following mass measurements than volume ones - your flour may have different moisture and protein levels than the author's. But those are minor compared to the >25% variations in flour when measured by volume.

I started using ratios for seasonings and sauces and then using taste to add it to the meat/veggies/whatever as needed and it's been very good at recreating 'good' recipes. So I wouldn't discount it. But it definitely has a bunch more skill because you're playing with more variables than baking.
only if those ratios are defined by weight not volume. a "cup of brown sugar" is a useless measure. For example: I can give you three different cups of brown sugar with the same volume but radically different quantities of sugar in them. "Packed" vs "unpacked" isn't much help because i can do the same thing with both of those too...
> Because measuring by volume isn't easier in 2023 than placing your mixing bowl on a kitchen scale and balancing everything to the mass of your butter and eggs.

Eh, I've tried both and I have to disagree. Pouring milk or oil may be easier with the scale because you have very precise control over the flow rate, but for flour and other dry goods it's far easier to scoop, scrape, and dump a cup than it is to add a bit at a time while avoiding the sudden avalanches that inevitably start as things loosen up.

Honestly I'm the opposite way. for liquids, volumetric measurement is pretty consistent.

However dry goods like flour are hard because so many little things affect the density of the scoop. Vs if I just put it on the scale and scoop it into a bowl/cup on a tared scale, I can get it most of the way there and then just spoon in/out little bits to get to the right mass.

For cooking I find it doesn't really matter but with baking where those ratios are so strict, mass measurements for dry goods is just so much more repeatable.

No, it is not easier to use a cup to scoop. You are very unlikely to be able to consistently get the same amount. Instead you get variable amounts based on how much you packed it, the humidity, and the grind of the flour.

For liquids you don't have precise control over the flow rate so it isn't easier to do over the scale. Although depending on the circumstances it is because you don't have to worry about spillage.

I just pour it right out of the container I store it in and don't have trouble with clumping. Life is easier and cleaner without packing flour.
> Weight vs volume measurements

This is as un-winnable a debate as vi vs emacs.

The world is full of both kinds of people. Any attempt on the part of the format to dictate one or the other approach will simply reduce the use of the format. As firmly convinced as you are of the rightness of your position, there is at least an equal number of equally committed champions of the other position, regardless of which position you hold.

Encouraging/facilitating the presentation software to accept data in either format and render it in either format will be the winning solution.

Baking experts seem to be almost universally on the side of mass. It's more divided outside baking (though mostly breaks down along American/everyone else lines). It's really compelling to support both because recipes are legacy systems. I make the dinner rolls I make because my grandma makes them that way, and that's what my family likes. I can and have converted it to mass, because I can measure flour faster that way.

But the amount specified in any unit is an approximation. How much flour that dough needs is dependent on how much moisture is in that dough. That's different in different kitchens, with different flours, at different times of year. My grandma specified five cups of flour, plus more for working the dough, so it will always take more than that. The thing I like isn't five cups of flour, or 600 grams, it's whatever is necessary to achieve the right dough. 600g is a better approximation, because it's more consistent. But ultimately if you want to learn to cook something the way someone else does, you need a lot of qualitative instruction in addition to the quantitative

Are your baking experts English speaking?

In my table (in a coffee shop) right now I have a fee recipe books about baking: flour lab, la patisserie de Yann Couvrer, le Grand libre de la viennoiserie, french patisserie by Ferrandi and they all use weights for baking recipes (tho the last one also has volumes).

I have some grandma recipes which are whatever-metric (some sort of pancakes are "one egg, one egg of water, one spoon of flour") but I think it's mostly historical.

Nah, cooking/baking is chemistry and recipes are about faithfully reproducing the reactions as specified. This comes down to reproducibility and reliability which comes down to quality of the ingredients, ease of using the technique, and skill of the person doing it.

And the metric that is most reproducible for liquid or dry ingredients is weight, because it can preserve ratios. That's why professional bakeries, baristas, and chefs don't measure their ingredients by volume since it's inaccurate even for the most skilled technicians. Just like your pharmacist isn't measuring dosage by volume without known and precise densities.

For example I don't think it matters if you measure oil or water by volume since that's rather easy to do. That said, if you want to preserve ratios with the rest of your ingredients you better be doing it by weight or else you won't be faithfully following the recipe.

This is not a subjective comparison. If a recipe is only specified by volume it cannot be followed accurately. Similarly if you want to design your own, you need a notepad to track ratios by weight.

IMO it's just legacy.

All high level pastry recipes have converted to weights a long time ago since precision is important, but truth is for most recipes exact dosage does not matter so traditional measures from a time when scales were less common and precise survive.

They will die down in time.

Baking is chemistry, chemists measure primarily by weight.

Weight is superior.

You can use a spoon to transfer into the measuring bowl.

My mom taught me when I was a wee lad that a heaping table spoon was about 20g of flour, and a flat table spoon of sugar is about 10g. I have no idea if this is true, but to get 200g you get approximately ten table spoons, and you just get a bit less or more in the late one.

I still use a spoon to scoop clumpy things or things I need a very small <5g amount of. It's no more dishes than if I'd used cups and tablespoons, typically less, and it's much easier than sifting, which is necessary to get consistent amounts of flour from cups
> specify a recipe in terms of ratios and then automatically convert it to scale would be a super power that I can't beat by hand

Somebody mentioned here a couple of weeks ago that you can use a slide rule to do scale ratios in a recipe. I can't find that link now but here's a build-your-own recipe converter (circular) slide rule that I found:

https://www.reddit.com/r/Cooking/comments/v7ilgv/cooked_up_a...

sounds like a job for Unitron :) https://github.com/alustig3/unitron
I would suspect teaching Willow (https://github.com/toverainc/willow#readme) to do that would be much more reasonable in a kitchen setup, for the exact reason guhidalg mentioned: who wants to use oil soaked hands to touch something in the kitchen?
Love this. I would buy this if it was IP-whatever waterproof rated so I can periodically wash off the oils and flours that _will_ get caked on this thing.

If this thing was paired with a mass scale at 1g accuracy with a dynamic range of like 0 to 5kg, I would pay like $50 for this.