Natural language BMI calculator
Body Mass Index, or BMI, is a metric used to indicate when someone is dangerously under- or over-weight. Most normal people should aim for a BMI between 18.5 and 24.9, but it is important to note that it might not work well if you're athletic or pregnant! Many top athletes are classed as 'Obese' according to a standard BMI test, so take the results with a big pinch of salt!*
I've written this Body Mass Index (BMI) Calculator partly to help me learn about writing tools for Movable Type, and partly because it seemed relevant to what I do for fun. I decided to write one from scratch rather than link to someone else's because I couldn't find an example of a BMI calculator that could cope with a mix of Imperial and Metric measurements. Being a 1972 child, I was brought up whilst adults were largely confused by the switchover from Imperial (feet & inches, lbs & ounces) to Metric (cm & metres, grams and kilograms). They doggedly stuck to a mix of both, and so I've grown up not really understanding either. Like many people my age, I tend to know my height in feet and inches, but my weight in kilos. No BMI calculator I've found so far can cope with this, so I wrote one that could. I'm also a geek, and love to start again with a clean slate.
I also borrowed ideas from Google's calculator, which is great (want to know how many centimetres in a light-year, anyone?). So my calculator also tries to let you type enter your weight and height in a way that makes sense to you. It can understand things like
- 56 kilos, 5 foot 11
- 145 lbs, 180 centimetres
- 87 inches, 12 stone 1lb
Give it a go and tell me what does and doesn't work!
*salt intake calculator coming soon...
0 TrackBacks
Listed below are links to blogs that reference this entry: Natural language BMI calculator.
TrackBack URL for this entry: http://www.tritastic.com/cgi-bin/mt-tb.cgi/25

Leave a comment