Menu

BMI Calculator: Why My Health Form Called a 190 lb User Obese (and the Unit Fixes That Stopped It)
πŸ“°

BMI Calculator: Why My Health Form Called a 190 lb User Obese (and the Unit Fixes That Stopped It)

DEV Community: pythonΒ·meng mengΒ·8 days ago
#eDIUZu9U
#devtopython#devto#dev#feet#inches
Reading 0:00
15s threshold

BMI Calculator: Why My Health Form Called a 190 lb User Obese (and the Unit Fixes That Stopped It)

Last month I shipped a health-check form for a corporate wellness dashboard. Two weeks later the clinic nurse called, annoyed. A tester who weighs 190 lb at 5'11" had been flagged "obese" by our form. Her own calculation said 26.5, overweight at worst, nowhere near obese.

Both numbers came from the same formula. The difference was what we fed into it. She had her numbers in five seconds on paper. We had a bug that took three days and three separate unit mistakes to pin down. Here is how I traced it, plus the three ways I now verify BMI results before anyone sees them.

Method 1: A small Python script

Start with the metric formula, because metric removes one whole class of unit bugs.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.