views:

44

answers:

4

This is a question to people who live with the metric system. When entering your height on forms is there a strong expectation that you would enter a value of meters or centimeters?

We've gone with meters on WeightChart.com, but have seen some impossibly tall people wondering why our calculations are way off. We've implemented some sanity checks as a fix, but we'd like to meet people's expectations if there is a consensus.

Thanks!!

Update: Thank you for your answers, I see that centimeters are preferred. But sanity checks are going to be required to handle either. Yes I realize that my 'answer' isn't really what my question was seeking, sorry about that.

+4  A: 

Using centimeters at least protects you from having to deal with a decimal point (or comma). But I—being kind of a zealot when it comes to SI—usually assume that the base units are used, unless the context mandates something else.

For height both meters and centimeters are used sometimes, so your sanity checks probably are best from the user's perspective. Nobody will be 190 meters high (at least I haven't met someone like this) or 1.9 cm.

Joey
I once knew a man 189 meters high, true story.
Skurmedel
+2  A: 

I can't speak for all metric countries; as they are roughly (COUNT(SELECT countries FROM world) - 2); but at least in Norway, the common approach is to use centimeters.

Williham Totland
+1 for the COUNT()
Boldewyn
+1  A: 

I'd say let a person enter in their height, then either try to parse it or let them choose the measurement type from a dropdown. You'll probably be able to figure out the type with a simple parse algorithm 95% of the time. The rest you can ask people to be more specific.

Will
+1  A: 

I'd go with Will's answer. Just adding:

If the input is ^[0-9]{2,3}$, it's centimeters. If the input is ^[12][,\.][0-9]{1,2}$, it's meters. If it's anything else, it's time for an error message.

The [,\.], by the way, takes care of some European languages using the comma as decimal separator.

Boldewyn
Thanks, I did not know about the comma separator
marshall g
Turns out .NET decmial.parse() automagically handles commas
marshall g
@marshall_g: Only for the selected locale. Which, for a web application will almost certainly not match the user's. Try it out and throw `"1.23"` and `"1,23"` at `decimal.Parse()`. Although for this problem the difference in parsing probably doesn't matter anyway.
Joey
I would say that the last one should end with [0-9]{2}, generally speaking.
Williham Totland
@Williham: Some users might tend to say "I'm 1,2m tall." and mirror this behaviour in web forms. Hence, `[0-9]{1,2}` here is unambiguous and adds to the user experience.
Boldewyn