Automated Unit Conversion

The friendliest place on the web for anyone that enjoys cooking.
If you have answers, please help by responding to the unanswered posts.

sapph

Assistant Cook
Joined
Jun 26, 2011
Messages
2
Greetings, all. I'm developing a recipe management app for the iPhone. One of the features I'm developing is unit conversion (metric <-> American customary).

The problem is with the common use of volumetric measurements when mass/weight measures should be used.

If you have 1 c of flour, my recipe is going to see 'c' and do the conversion to mL. However, mL of flour is silly. The problem is there are so many possible dry goods that should probably be measured in grams - there is no way to build a special case for each one.

Is there anyone out there that uses metric? How would you like an app to deal with this issue?
 
Last edited:
I would have the app automatically convert flour from cups to dry weight in background, and then show the user a conversion to grams. For example, the user selects 1 cup all purpose flour. The software automatically converts that to 4.4 ounces and spits out a conversion of 125 grams. Of course you would have to have a different cup to dry weight conversion for each type of flour (whole wheat, all purpose, bread, etc.) and for other dry ingredients measured by volume such as sugar, salt, pepper, various spices, etc.
 
...Of course you would have to have a different cup to dry weight conversion for each type of flour (whole wheat, all purpose, bread, etc.) and for other dry ingredients measured by volume such as sugar, salt, pepper, various spices, etc.


This is the central issue with converting dry ingredients from volume to weight. Every dry ingredient is different. It's also a matter of how it's measured. Flour can be sifted and measured, packed into a cup, lightly spooned into a cup etc. Weights will vary as much as 20%.
 
I deal with it all the time -

you will find reputable sites that for example cite a cup of flour anywhere from 120 grams to 160 gram. in fact the density of pastry, cake, AP, self-rising, bread, whole wheat, white whole wheat, etc - all differ by 'type' of flour and by 'brand' of flour (actually, by whoever milled it...)

for a single cup the differences may not be too noticeable - for a 12 cup bread recipe, then it can make a difference.

a teaspoon of salt.... sea salt? kosher? table salt? popcorn salt?
sugar, anyone. . . .?

>>so many dry goods . .
yup. and that's the problem - converting volume to mass requires knowing the density. and no it is not impossible to build a special case for each, just a lot of work and research.
 
I would have the app automatically convert flour from cups to dry weight in background, and then show the user a conversion to grams. For example, the user selects 1 cup all purpose flour. The software automatically converts that to 4.4 ounces and spits out a conversion of 125 grams. Of course you would have to have a different cup to dry weight conversion for each type of flour (whole wheat, all purpose, bread, etc.) and for other dry ingredients measured by volume such as sugar, salt, pepper, various spices, etc.

I would love to be able to do this - however there are dozens of dry ingredients that American's typically measure volumetrically - many of which you mention. I would have to get weight conversions for all of them. Further there are probably dozens of ways each of them could be listed. For example:
Flour
All-Purpose Flour
All Purpose Flour
Flour, All-Purpose
Flour, All Purpose
Flour (Sifted)
All-Purpose Flour (Sifted)
All Purpose Flour (Sifted)
Flour, All-Purpose (Sifted)
Flour, All Purpose (Sifted)
Flour (Packed)
All-Purpose Flour (Packed)
All Purpose Flour (Packed)
Flour, All-Purpose (Packed)
Flour, All Purpose (Packed)

I'm sure there are twice as many ways to enter just the things I've listed (Packed Flour, All-Purpose).

If I do something, I want to do it right, and I'm not sure that I could reliably capture precisely what ingredient a user is trying to enter, know the proper conversion, and then do the math.
 
In all the truth metric users also use cup measuring. Or maybe glass rather.At least I know that I do it. I have metric glass and all my metric recipes are in250 ml glass measuring. Though I have used regular cup as a substitude and it works just fine.
 
I have a one liter measuring cup that has metric on one side, Imperial on the other. It also has liquid and dry measurements.
 
I would love to be able to do this - however there are dozens of dry ingredients that American's typically measure volumetrically - many of which you mention. I would have to get weight conversions for all of them. Further there are probably dozens of ways each of them could be listed. For example:
Flour
All-Purpose Flour
All Purpose Flour
Flour, All-Purpose
Flour, All Purpose
Flour (Sifted)
All-Purpose Flour (Sifted)
All Purpose Flour (Sifted)
Flour, All-Purpose (Sifted)
Flour, All Purpose (Sifted)
Flour (Packed)
All-Purpose Flour (Packed)
All Purpose Flour (Packed)
Flour, All-Purpose (Packed)
Flour, All Purpose (Packed)

I'm sure there are twice as many ways to enter just the things I've listed (Packed Flour, All-Purpose).

If I do something, I want to do it right, and I'm not sure that I could reliably capture precisely what ingredient a user is trying to enter, know the proper conversion, and then do the math.
The 15 or so items you listed could be reduced to a menu (or submenu) with 6 or less choices.
 
Last edited:
sounds simple & easy, but it isn't. which is why there are no really good 'applications' out there for this purpose.

if the theory is to cut & paste a recipe into a "translation box" the problem is how to know whether it's scoop&level or sifted flour - (a) it might not be mentioned in the ingredient list - (b) might be specified in the directions. software is good, fuzzy logic a wonderful thing, but ain't none of it there yet where it can cut&paste "read and understand" a recipe to the point it can translate from one cultural practice/standard to another.

then, since this is probably intended to translate both ways, in addition to USA flour designations, include British, German DIN and French definitions, Italian, (plus who all else....?)

and there's the issue of stuff like butter. in USA commercial butter is processed (ie air added) so that one pound = 2 cups. this is not true in Europe. much less truer for 'specialty' butters - which have their own host of names.

next of course is the problem of the novice cook - when presented with a menu set
scooped | scooped & leveled | fluffed | sifted | double sifted - does not know what it all means much less which one to pick - and winds up with a 25-30% error.

technically it's all possible - except for the 'auto translate from cut&paste' bit - there are far too many shortcomings in that approach to consider it feasible at this time. some of the cookbook software does a fair job at translating a cut&paste recipe list - but they are most definitely not reliable or perfect.

the organization of the software & menus is critical to the usability. an extensive user set-up file allowing lots and lots of 'defaults' would simplify things - with over ride exceptions provided - but iPhone apps and the 'cloud' stuff really is not intended for that sort of thing.
 
I understand what you would like to do, but I think you're over complicating an otherwise simple process. Making the kind of application you write about can be an exercise in programming skill, but probably not practical or turn out to be very popular... not that I want to discourage you... (been there...done that!)

Have fun with it, but realize you may be trying to adjust too many variables.
 
Back
Top Bottom