Metric vs Imperial, 30 years later



  • So I'm integrating a website with a certain large provider of shipping quotes... not too bad, the docs have a few less errors than some other big companies and the oddest thing is having to send two concatenated XML documents... I've seen worse.

    That is until I got to the units part, and I've seen this issue with 2 large US-based shipping providers, so maybe some helpful US developers can explain it for me. Suppose we have to specify a distance, we just need to provide a value and the units, right? And because the ratio between units is always the same, it doesn't matter what those units are, right? Wrong.

    Both shipping companies I've integrated with reckon they will accept distance units of 'cm' or 'in' and weight units of 'kg' or 'lb'. However, both have a real aversion to 'kg' and 'cm'. So far I've had responses like 'mesurement system not valid for selected country' (trying to use metric units with a US address or imperial units with a UK address), 'I think the error is caused by your use of these units, try normal LB and IN and see if that works' (random support guy).

    Are we brits just wierd having both metric and imperial units in common use? Are metric units used anywhere in the US?



  • Coca-cola comes in two and three liter bottles.  One-liter bottled water is common in the US, as are one liter and half-liter empty water bottles.

    Code that lets you select units, but doesn't convert automatically to whatever units the shipper is really using, is a definite WTF.  Either pass-through whatever units you're really allowing, or convert... don't give the user two choices, one of which leads to an error message!



  • the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?



  • There really is no safe way to convert the units. You have to specify the measurement in the units they require. The problem is rounding.

    Here's the problem: Suppose you specify a measurement as 10 cm. They use inches. Well, 10 cm converts exactly to 3.94 inches. But if we assume two significant digits, that gives a range of 3.7 to 4.1 inches. So we cannot convert to inches and keep two significant digits.

    When you convert, you either have to lose significant digits (call 10cm 4inches) or introduce false significant digits(call 10cm 3.9 inches). In many applications, neither is acceptable.



  • @joelkatz said:

    There really is no safe way to convert the units. You have to specify the measurement in the units they require. The problem is rounding.

    Here's the problem: Suppose you specify a measurement as 10 cm. They use inches. Well, 10 cm converts exactly to 3.94 inches. But if we assume two significant digits, that gives a range of 3.7 to 4.1 inches. So we cannot convert to inches and keep two significant digits.

    When you convert, you either have to lose significant digits (call 10cm 4inches) or introduce false significant digits(call 10cm 3.9 inches). In many applications, neither is acceptable.

    Where'd you get the "3.7 to 4.1" range from having two significant digits?



  • @joelkatz said:

    There really is no safe way to convert the units.

    I read this and thought, what?! But then....

    @joelkatz said:

    ...if we assume two significant digits, that gives a range of 3.7 to 4.1 inches. So we cannot convert to inches and keep two significant digits.

    When you convert, you either have to lose significant digits (call 10cm 4inches) or introduce false significant digits(call 10cm 3.9 inches). In many applications, neither is acceptable.

    Good point - in this case both large shipping companies (lets call them XXX and XxxXx) specify the number format giving a fixed no. of decimal places (1 or 2). In extreme cases the error could be 5% (eg. converting to lb at 1 d.p. means we could be 0.05 lb out, which is a lot in a 1 lb package).



  • @joelkatz said:

    Here's the problem: Suppose you specify a measurement as 10 cm. They use inches. Well, 10 cm converts exactly to 3.94 inches. But if we assume two significant digits, that gives a range of 3.7 to 4.1 inches. So we cannot convert to inches and keep two significant digits.
     

    Oh yea, that happens to me all the time using UPS. I told them it was a 100lb package, and they said wait a minute do you mean 100.lbs or 100lbs our chart uses 3 significant digits not 1, and I punched him in the face and stole his truck.




  • TRWTF is that there is still any misunderstanding between force (weight) and mass.  The kilogram is a measure of mass and the pound is a measure of force.  The SI unit of force is the Newton (N) and the imperial unit of mass is the slug.  Personally, I think we should use the slug more often.  Perhaps the aversion to its usage lies in its homonymic counterpart: the slimy mollusk.

    </soapbox>



  •  @versatilia said:

    Good point - in this case both large shipping companies (lets call them XXX and XxxXx) specify the number format giving a fixed no. of decimal places (1 or 2). In extreme cases the error could be 5% (eg. converting to lb at 1 d.p. means we could be 0.05 lb out, which is a lot in a 1 lb package).

    Yea well. So let's see, what are you going to do when you correct your program to send them the data in their format? Are you actually going to break out the ruler/scale and re-measure in the correct units? Or send them the measure in their units and say it has an error range of +/-5%? I doubt it, you're just going to convert to the unit they want and then send it in whatever precision they let you.

    So tell me, what difference does it make who does the converting?

     This isn't a science lab, it's a shipping company. 



  • @communist_goatboy said:

    TRWTF is that there is still any misunderstanding between force (weight) and mass.  The kilogram is a measure of mass and the pound is a measure of force.  The SI unit of force is the Newton (N) and the imperial unit of mass is the slug.  Personally, I think we should use the slug more often.  Perhaps the aversion to its usage lies in its homonymic counterpart: the slimy mollusk.

    </soapbox>

     *Throws brick*



  • @communist_goatboy said:

    TRWTF is that there is still any misunderstanding between force (weight) and mass.  The kilogram is a measure of mass and the pound is a measure of force.

    It isn't, as how could versatilia attempt to convert between them if it was?



  • @communist_goatboy said:

    TRWTF is that there is still any misunderstanding between force (weight) and mass.  The kilogram is a measure of mass and the pound is a measure of force.  The SI unit of force is the Newton (N) and the imperial unit of mass is the slug.  Personally, I think we should use the slug more often.  Perhaps the aversion to its usage lies in its homonymic counterpart: the slimy mollusk.

    </soapbox>

    Yeah, but so long as we're close to a nice, reliable source of 1G, and we're not sufficiently close to any other significant source of gravity, pounds and kilograms are relatively easy to convert - at least, so long as we don't involve British currency.  If we had interplanetary travel, it would be a much bigger WTF.

    As it is, it's probably more of a WTF that someone gets bent out of shape over it... (err, like I used to...)



  • If you see "10 cm", you reason as follows:

    If the real measurement was less than 9.5 cm, it would have been reported as 9 cm, not 10 cm.

    If the real measurement was more than 10.5 cm, it would have been reported as 11 cm, not 10 cm.

    So if you see "10 cm", you have a possible range of plausible real measurements of 3.74 inches through 4.13 inches.

    So how do you convert "10 cm" to inches? "3.74-4.13 inches?" You think a shipping company that measures in inches is going to like that?

    I should have picked pounds and kilograms, but the issue is the same. The type of conversion the OP is imagining is simply not possible.



  • @mauricio said:

    the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?

     

    Umm... Pretty much [i]all[/i] of the U.S. uses lb and in.  And distances here are in miles, not km.

    And why is it that in the UK, a person's weight is measured in "stone" (always in the singular). What's the conversion factor for that?

     



  • @dwilliss said:

    And why is it that in the UK, a person's weight is measured in "stone" (always in the singular). What's the conversion factor for that?
     



  • @dwilliss said:

    @mauricio said:

    the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?

     

    Umm... Pretty much all of the U.S. uses lb and in.  And distances here are in miles, not km.

    And why is it that in the UK, a person's weight is measured in "stone"
    (always in the singular). What's the conversion factor for that

     

    I'd say anyone who does anything scientific might like to have a word with you, even in the USA. Unless you can find a molecular biologist or something that measures things in 'nano-inches'.

    Also, Google 'Convert 1 stone to pounds'. Google is always your friend. Google is always right. Believe in the Google. Trust in the Google. (e,f;b)



  • @dwilliss said:

    @mauricio said:

    the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?

     

    Umm... Pretty much all of the U.S. uses lb and in.  And distances here are in miles, not km.

    And why is it that in the UK, a person's weight is measured in "stone" (always in the singular). What's the conversion factor for that?

     

    I've always seen a person's "weight" (mass) expressed in kg; the only lingering traces of Imperial units are in road signs (miles and mph), milk brought by the milkman and beer/cider served in a pub (pints).



  •  @Deiwos said:

    @dwilliss said:

    @mauricio said:

    the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?

     

    Umm... Pretty much all of the U.S. uses lb and in.  And distances here are in miles, not km.

     

    I'd say anyone who does anything scientific might like to have a word with you, even in the USA. Unless you can find a molecular biologist or something that measures things in 'nano-inches'.

    Anyone who does anything scientific, except NASA. I'm obvsiously referring to the Mars climate orbiter fiasco.



  •  @joelkatz said:

    If you see "10 cm", you reason as follows:

    If the real measurement was less than 9.5 cm, it would have been reported as 9 cm, not 10 cm.

    If the real measurement was more than 10.5 cm, it would have been reported as 11 cm, not 10 cm.

    So if you see "10 cm", you have a possible range of plausible real measurements of 3.74 inches through 4.13 inches.

    So how do you convert "10 cm" to inches? "3.74-4.13 inches?" You think a shipping company that measures in inches is going to like that?

    I should have picked pounds and kilograms, but the issue is the same. The type of conversion the OP is imagining is simply not possible.

    Nonsense.  If I tell you "convert 10cm to inches" you're going to get an actual answer, you're not going to get a range, no matter how many or few significant digits I allow.  If I say my package is 10cm on a side, I'm not saying "it's between 9.5cm and 10.5cm", I'm saying it's 10cm.



  • @mauricio said:

    who uses lb and in except uk and part of us?

    Who uses cm to measure TVs and monitors?

    All continental European electronics sites that I checked used inches. Some added the size in centimeters in parentheses.



  •  @benryves said:

    I've always seen a person's "weight" (mass) expressed in kg

    Really, I see pounds/stones (1 stone is a proper imperial measure which equals 14 lbs in case foreigners don't know) quite frequently (also when a baby is born, we always say they were xx pounds/ounces, not yy kg/grams).

    the only lingering traces of Imperial units are in road signs (miles and mph), milk brought by the milkman and beer/cider served in a pub (pints).

    Nope.

    - People I know generally measure their heights in feet/inches.

    - 2.5/3.5 inch disk drives.

    - TV sizes

    - mpg in cars (even though lots of younger people won't really know what a 'g' is)

    - acres if you are buying property, although the land registry only uses hectares

    probably lots more. You'd be surprised. Really the UK is an example of why you DON'T need a single form of measure. If you go into a timber merchant and ask for a 6ft by 4ft pieces of quarter inch ply they'll be able to supply it without blinking. Similarly if you asked for 1.8m by 1.2 m piece of 6mm ply, they'd be able to give you it as well (they'd probably give you exactly the same thing..). Or, you could go into a greengrocers and ask for a pound of apples, or half a kilo of apples. It's only 'lesser' nations that think you have to have one or the other. ;-) 

    I suppose that it's because we use both measure systems so much that it is second nature to supply or ask for the units if they're not obvious.(The EU tried to force us to use metric solely, but gave in and shops can now give imperial prices as well as metric prices, and so shops are still allowed to sell you a pound of apples if you ask for it)

    I suppose if you were very young (ie under 30 ;) ) then you might be more metric than older people.

    There are also lots of 'pseudo-metric' measurements - ie the 454 gram tins or the 30 cm ruler, or timber measurements

    PS - road signs also measure shorter distances in yards. (They can't use metres, or the 'm' abbreviation would be ambiguous).

     


  • Discourse touched me in a no-no place

    @pscs said:

    even though lots of younger people won't really know what a 'g' is
    It's etiher 9.61, 8 or 6.66 pints.



  • @julmu said:

    Who uses cm to measure TVs and monitors?
     

    True, TV sizes are labeled in inches, but that's just used as a labelling thing - i.e., "a 42 inch TV is larger than a 37 inch". Nobody uses those numbers to know the actual size of the TV screen - you use centimeters for that. At least around here. My 32" TV is 82 cm wide, for example.



  • @boh said:

    @julmu said:

    Who uses cm to measure TVs and monitors?
     

    True, TV sizes are labeled in inches, but that's just used as a labelling thing - i.e., "a 42 inch TV is larger than a 37 inch". Nobody uses those numbers to know the actual size of the TV screen - you use centimeters for that. At least around here. My 32" TV is 82 cm wide, for example.

    I'm pretty sure it's not. 32" is the DIAGONAL size of the screen, which is not the same as the width. See [url]http://www.prinds.com/tools/screenDimensions.htm[/url] for a way to calculate the actual dimensions based on the diagonal and the aspect ratio.



  • @Heron said:

    Nonsense.  If I tell you "convert 10cm to inches" you're going to get an actual answer, you're not going to get a range, no matter how many or few significant digits I allow.  If I say my package is 10cm on a side, I'm not saying "it's between 9.5cm and 10.5cm", I'm saying it's 10cm.

     

    Okay, then please tell me how you convert 10cm to inches. Do you think if you tell someone "it's 10cm wide" they'll get the same idea as if you say "it's 3.937 inches wide"?

    Seriously?



  • @joelkatz said:

    @Heron said:

    Nonsense.  If I tell you "convert 10cm to inches" you're going to get an actual answer, you're not going to get a range, no matter how many or few significant digits I allow.  If I say my package is 10cm on a side, I'm not saying "it's between 9.5cm and 10.5cm", I'm saying it's 10cm.

    Okay, then please tell me how you convert 10cm to inches. Do you think if you tell someone "it's 10cm wide" they'll get the same idea as if you say "it's 3.937 inches wide"?

    Seriously?

    Your problem is that something that is 10cm long is harder to describe in another set of units? Do you want metric-using countries to only make things with lengths of multiples of 2.54 so that it converts easily to inches for you? Can you outline your complaint a bit more clearly? Because I have no idea what is wrong with expressing 10cm in 3.937 inches.



  • @pscs said:

    If you go into a timber merchant and ask for a 6ft by 4ft pieces of quarter inch ply they'll be able to supply it without blinking. Similarly if you asked for 1.8m by 1.2 m piece of 6mm ply, they'd be able to give you it as well

    What if I ask for a 6 ft by 1.2 m piece of 0.2 attoparsecs ply?



  • @Welbog said:

    Your problem is that something that is 10cm long is harder to describe in another set of units? Do you want metric-using countries to only make things with lengths of multiples of 2.54 so that it converts easily to inches for you? Can you outline your complaint a bit more clearly? Because I have no idea what is wrong with expressing 10cm in 3.937 inches.

     

    I guess the issue is that 10 cm is not the same as 10.000 cm

    If you told someone that a piece of string was 10cm long, they'd assume you meant it was 'about' 10cm long, the exactness of it depends on context. 10cm might be 'nearer 10cm than 11cm' or it might be 'nearer 10cm than 10.5cm' or 'nearer 10cm than 1m'

    If you told someone that a piece of string was 10.000 cm long, they'd know you were being precise, and it was exactly 10cm long. (You could also explicitly describe the precision, eg by 'it is exactly 10cm long'). 

    Saying that the piece of string is 3.937 inches is being more precise than you need to be. I'd probably say "3.9 inches", or "3 and 15/16ths" or "nearly 4 inches".

    It does all depend on context - which is, I suppose, precisely the problem if you are trying to do it automatically.

     

     



  • @pscs said:

    I guess the issue is that 10 cm is not the same as 10.000 cm [snip]
    This once again reminds me that significance exists only to confuse people who don't know anything about error calculations. 10cm is the same as 10.000cm. Error is not inherent in the number of digits used to express the number Saying 10cm with 5% error is the same thing as saying 3.937 inches with 5% error. Saying 10cm +/- 5mm is the same thing as 3.937 inches +/- 5mm. Error does not change when you change the units of the original value. If you think the error of 10cm is 5mm, then it's still 5mm when you convert cm to inches. So it doesn't really matter what you think the error on the value is, because it will always be the same when you convert to another unit. That's how I can safely say that 10cm is 3.937 inches.

    Significance is just a faulty shortcut for truly understanding measurement error.



  • @Welbog said:

    @pscs said:

    I guess the issue is that 10 cm is not the same as 10.000 cm [snip]
    This once again reminds me that significance exists only to confuse people who don't know anything about error calculations. 10cm is the same as 10.000cm. Error is not inherent in the number of digits used to express the number Saying 10cm with 5% error is the same thing as saying 3.937 inches with 5% error. Saying 10cm +/- 5mm is the same thing as 3.937 inches +/- 5mm. Error does not change when you change the units of the original value. If you think the error of 10cm is 5mm, then it's still 5mm when you convert cm to inches. So it doesn't really matter what you think the error on the value is, because it will always be the same when you convert to another unit. That's how I can safely say that 10cm is 3.937 inches.

    Significance is just a faulty shortcut for truly understanding measurement error.

     

    What's wrong with you nerds? Please go to the market and buy 1.281 kilograms of apples +/- 3.5% error. Now go back to your corner!



  • @tgape said:

    Yeah, but so long as we're close to a nice, reliable source of 1G, and we're not sufficiently close to any other significant source of gravity, pounds and kilograms are relatively easy to convert - at least, so long as we don't involve British currency.  If we had interplanetary travel, it would be a much bigger WTF.

    I see a new type of question for physics tests:

    Company A is located at equator (g_a=9.789 m·s−2) and it sends a 1000 kg of gold to company B. Company B is located at the south pole (g_b=9.832 m·s−2) and uses pounds when receiving packages. Will company B receive more (less) gold than expected? Ignore density changes with temperature; gold density is euqal 19300 kg·m−3.



  • What happens if the number of inches you give them is a little bit too small? What happens if the number you give them is a little bit too big?



  • @Welbog said:

    10cm is the same as 10.000cm
     

    To a scientist, engineer or mathematician, maybe, but not to other people.

    Go to a timber yard and ask for a bit of wood 10cm long and you'll get one about that long. Ask for one 10.000cm long, and you won't. If they are intelligent they'll refuse to serve you because they can't guarantee they'll be able to give you a piece exactly that long. If they're not so intelligent they'll give you a piece of wood which doesn't meet your requirements.

    If UPS ask you how big a parcel is, do you say '10cm by 20cm by 5cm' or do you say '10.126cm by 19.766cm by 5.002cm'? Most people would say the former, even if the latter was more accurate. They also wouldn't say '10cm by 20cm by 5cm with a +/-5% error'. If you are the sort of person who would, then I pity any of your friends...

    So, if you go to a shipping website which does conversion, and it says: 'enter the width of the parcel in whichever units you want' and you enter '10cm', then in the confirmation it says:

    Parcel width: 3.93700787 inches

    would you accept that confirmation? I'm not sure I would, because I couldn't check that my parcel was really 3.93700787 inches wide (says I, being careful not to use the word 'package' on a techie website when talking about measurements...) If it said 'Parcel width: 4 inches' I'd still have concerns, although less so. I'd actually want it to be confirmed back in the units of measurement that I specified.

    Also I wouldn't expect the shipping website to ask me for the width of the parcel with an error specification, otherwise it would get confusing for lots of people.

    Note that I am just talking about 'normal' conversions for 'normal' people. If you get into measurements where you would be talking in millimeters or 32nds of an inch or smaller, then, yes, be as precise as you want in your conversions.

    (PS - I guess I'm trying to say that, literally and mathematically, yes, 10cm is the same as 10.000cm, but it has a 'meaning' beyond that. The precision that you specify implies a required accuracy/precision. You can make this explicit by extra words such as 'exactly', 'approximately', 'about', 'precisely' or by specifying an error range, but if you don't then, in normal speech, there is an implication of the error range).


  • @pscs said:

    PS - road signs also measure shorter distances in yards. (They can't use metres, or the 'm' abbreviation would be ambiguous).

     

    How so? The proper abbreviation for miles is "mi".



    BTW, Canada has the same mixed-units issue, mainly since a lot of the population grew up with imperial and couldn't be arsed to learn metric.


  • Discourse touched me in a no-no place

    @zolf said:

    and uses pounds when receiving packages.
    Pound-mass or Pound-force?



  • @zolf said:

    @tgape said:

    Yeah, but so long as we're close to a nice, reliable source of 1G, and we're not sufficiently close to any other significant source of gravity, pounds and kilograms are relatively easy to convert - at least, so long as we don't involve British currency.  If we had interplanetary travel, it would be a much bigger WTF.

    I see a new type of question for physics tests:

    Company A is located at equator (g_a=9.789 m·s−2) and it sends a 1000 kg of gold to company B. Company B is located at the south pole (g_b=9.832 m·s−2) and uses pounds when receiving packages. Will company B receive more (less) gold than expected? Ignore density changes with temperature; gold density is euqal 19300 kg·m−3.


    Assuming their scales are calibrated properly, and assuming pounds-force...

    Company B will receive a package weighing 2210 lbs. They would expect the package, if they were lazy with their conversions, to weigh 2205 lbs. The other information about ga and gold's density is added to confuse the unwary.

    Of course, they still receive the same actual amount of gold.

    If they use pounds-mass, with scales calibrated properly for local gravity, they'll receive exactly the expected amount.

    I need a life.




  • @communist_goatboy said:

    TRWTF is that there is still any misunderstanding between force (weight) and mass.  The kilogram is a measure of mass and the pound is a measure of force.  The SI unit of force is the Newton (N) and the imperial unit of mass is the slug.  Personally, I think we should use the slug more often.  Perhaps the aversion to its usage lies in its homonymic counterpart: the slimy mollusk.

    </soapbox>

    The pound is a unit of mass, idiot. Scales have measured mass for centuries (an equal-arm or steelyard balance [as opposed to a spring scale] does in fact measure mass). "weight" as meaning force rather than mass is a made-up definition by people who didn't actually understand what people mean by the words they use.



  •  

    The TDWTF Drinking Algorithm
    while (numDrinks < 3) {
    haveADrink();
    }
    gotoWork();
    while (numDrinks < 6) {
    haveADrink();
    }
    wasteMyTimeAndOthersOnTDWTF();
     
    Uninitialized variable "numDrinks".
     


  • @dwilliss said:

    @mauricio said:

    the real wtf is that in 2009 people still use lb, in, oz and others measurement other than ton/kg, km/m/cm

    who uses lb and in except uk and part of us?

     

    Umm... Pretty much all of the U.S. uses lb and in.  And distances here are in miles, not km.

    And why is it that in the UK, a person's weight is measured in "stone" (always in the singular). What's the conversion factor for that?

    O RLY?

    Actually, any science application (barring the NASA Mars probe fiasco) uses metric, even in the U.S.



  • I'm not sure what significant digits has to do with anything. The factor of conversion between inches and centimeters is DEFINED as 2.54 cm per inch. If something is 10 inches wide, then it is 25.4 centimeters wide, period. There is no "fuzzyness" except in the original measurement.

    The factor 2.54 does not have three significant digits, it has an infinite number of significant digits.



  • @Welbog said:

    Your problem is that something that is 10cm long is harder to describe in another set of units? Do you want metric-using countries to only make things with lengths of multiples of 2.54 so that it converts easily to inches for you? Can you outline your complaint a bit more clearly? Because I have no idea what is wrong with expressing 10cm in 3.937 inches.

     

    Then you're not particularly bright, because it's extremely obvious. Something that is in fact 9.92 cm long might be described as 10 cm long because the person had a rule that was accurate to .1 cm or so. So something reported as 10 cm could easily actually be 3.905 inches. Reporting it as 3.937 inches would simply be wrong.

    Someone who fell "about 100 feet" did not fall "about 30.48 meters". (Although in fairness, it is that last .48 meter that does all the damage.)


  • @lolwtf said:

    BTW, Canada has the same mixed-units issue, mainly since a lot of the population grew up with imperial and couldn't be arsed to learn metric.
     

    Yup.  Common measurements here:

    SI:

    kWh, Celsius, km/h, kilometers, grams (for cans/soft drinks), cubic metere, litres.

    Imperial:

    horsepower, BTU, calorie, feet, inches, squre feet, pounds and ounces (deli), psi (tire pressure)

    You can always order from the deli in grams because the scales are set for that anyways and just convert the lbs/oz into grams.  Basically, anything you buy (The hardware store is an exception) is done in calculated in metric, even though most people tend to use imperial units.  However, virtually everyone uses SI for temperature, gasoline, milk, and speed.  It's annoying as hell.  I try to stick with SI because I know that's how all the billing will be done and the guy at the counter doesn't have to convert things for me.  Although, there are exceptions, like for tire pressure, BTUs, and horsepower.



  • Thus, my theory that all food recipes are sub-optimal. What are the chances that the best-tasting combination of a certain set of ingredients can be expressed in round measurements in some arbitrary system of units?



  • You might observe that real cooks don't use recipes.  They just put in enough of each ingredient that they know will taste good.

    Written-down recipes with rounded units are for the rest of us, who enjoy making something that approximates to a cook's intentions.



  • @smxlong said:

    I'm not sure what significant digits has to do with anything.

    Because there is an implied precision based on that.

    There is no "fuzzyness" except in the original measurement.
     

    And that is precisely the issue. If anyone asks me my height, I am 5' 8" tall. That doesn't mean that I am 172.72 cm tall, just somewhere between about 171 and 174 cm tall. I don't say 'I am 5' 8" tall +/- half an inch', or 'I am 5 feet 8 inches and 523 thousandths of an inch tall'

    If I DID say 'I am 5 feet, 8 inches and 523 thousandths of an inch tall' you would rightly assume that the possible error there is less than if I just said 'I am 5 feet, 8 inches tall'. EVEN THOUGH I haven't explicitly specified the error range. The possible error range is implied by the number of significant digits I supply.

    So, if a website asks me for my height in inches and converts it to cm, what does it do with my entry of 5 feet 8 inches? 172.72cm is mathematically correct, but not necessarily the right answer. A range from 171.5 to 174cm is more likely to be the right answer, but that means that it needs to understand ranges or error calculations, which is more complex.

    (Note that context does matter, if I was entering measurements for a CNC machine then I would expect "10cm" to be 10cm. If I am entering measurements for UPS shipping, I would expect "10cm" to be somewhere between 9.5 and 10.5 cm).



  • @joelkatz said:

    Something that is in fact 9.92 cm long might be described as 10 cm long because the person had a rule that was accurate to .1 cm or so. So something reported as 10 cm could easily actually be 3.905 inches. Reporting it as 3.937 inches would simply be wrong.
    If the length of the object in question is exactly 9.92cm, then reporting its length as 10cm is just as wrong as reporting it as 3.937 inches. Sure there's a perception that the 3.937 value is more precise than the 10 value, but that's a human flaw in understanding measurement error and your flaw in not communicating the potential inaccuracy in the measurement. 10cm is 3.937 inches. If you're so concerned about these measurements, then report a simpler number in the error range of the original calculation. If 3.9 inches lies within the original error range of 10cm +/- 5mm, then report it as 3.9 inches. Or 4 inches. But know that by doing this you're introducing even more error into the value in opposition to what you seem to be trying to avoid.



  • @Welbog said:

    If the length of the object in question is exactly 9.92cm, then reporting its length as 10cm is just as wrong as reporting it as 3.937 inches.
     

    There is nothing wrong with me reporting my height as "6 feet" even though nobody's height is exactly 6 feet. If you were right, then essentially all measurements of things that didn't include specific tolerances would be "wrong".

    In fact, there isn't really any such thing as a length of "exactly 9.92 cm".




  • @joelkatz said:

    essentially all measurements of things that didn't include specific tolerances would be "wrong".
    This is pretty much the case. That's why in scientific fields measurements have error, and whenever you operate on such values you also operate on the error so that it can be correctly tracked. Not accounting for measurement error is good enough for a lay person, sure, but it's most definitely wrong.



  • @lolwtf said:


    BTW, Canada has the same mixed-units issue, mainly since a lot of the population grew up with imperial and couldn't be arsed to learn metric.

     

    My parents refer to all temperatures in Fahrenheit.  Drives me crazy because I always have to do the conversion.  Miles, pounds, inches, and the like, I'm OK with, because I encounter them frequently enough to know intuitively what they mean without having to do the math, but the temperature always throws me.  Also for some reason my thermostat is °F - I didn't even know you could get those in Canada.

    On the other hand, I'm equally confused when somebody gives me an oven temperature in °C.  I have never, ever seen an oven or any other cooking device that operates on °C.  So to make the same point that others have made, it just goes to show you that standards are a useless mess, and that the units you or I use will almost always depend on a combination of our history and the particular application.

    On topic:  Our system deals with many different types of measurements and handles all of the conversions automatically.  It's particularly fun when, for example, you have to differentiate between U.S. gallons and Imperial gallons.  Aside from the occasional ambiguity though, the process is basically transparent to users, and that is how it should be.

    There is one rub:  People generally expect the measurement that comes out to be the same measurement they put in.  If I put in 10 cm it's not acceptable for the system to spit out 3.937" afterwards.  So the measurement type always has to be stored, you can't just naively convert to whatever unit you like to use internally (assuming you even have one).  And this means that no matter how you design the system, you're always going to have to do some conversion in real-time, and your reports have to be unit-aware.

    It's even worse when you're trying to combine different (but convertible) measurements on a single report.  Yes, there really are legitimate cases like this.  Trying to determine the "primary" unit in these cases is a very imperfect science.



  • @Welbog said:

    @joelkatz said:

    essentially all measurements of things that didn't include specific tolerances would be "wrong".
    This is pretty much the case. That's why in scientific fields measurements have error, and whenever you operate on such values you also operate on the error so that it can be correctly tracked. Not accounting for measurement error is good enough for a lay person, sure, but it's most definitely wrong.

     

    No, it's not the case. You are the only person in the world who finds this confusing. Everybody else has no difficulty implying the level of accuracy from context. When a person says they're "6 feet tall", other people have no difficulty infering the implied error bars.

    In any event, if you were right, pretty much the whole world would be a WTF, since almost nothing permits you to enter error bars on your data.


Log in to reply