3 ms·
Unit mistakes happen all the time, which is why you should be using your units library religiously and still being vigilant even then. Worst case I've found wa
by AlotOfReading 3mo ago
Unit mistakes happen all the time, which is why you should be using your units library religiously and still being vigilant even then.
Worst case I've found was off by 15 orders of magnitude.
- gleenn 3mo agoOne of the Mars landers famously failed due to unit conversion errors from metric to standard.
- golem14 3mo agoWasn't it (also?) the Ariane V flight in 1996? Oh, NVM, that was an overflow error.
- blemasle 3mo agoI didn't know the imperial system was named "standard". Funny, cause its everything but standard both internationally and its definitions (which are not standard as based on SI)
- Dan_- 3mo agoI know you’re being snarky, but the US system is not “imperial” anyway. It’s properly “US Customary” but is often called “US Standard.”
- fc417fc802 3mo agoClaiming something isn't standard because it isn't based on SI is entirely circular in the case of weights and measures. That said I wish the US would bite the bullet and make the switch. Mandating dual labeling on everything would be a great start. Then in 20 years we could narrow it back down to one.
- reddalo 3mo agoYou just need to start teaching kids the metric system. Then when they'll grow up the switch will almost magically happen by itself.
- AlotOfReading 3mo agoAll of my science classes in the rural US from middle school onward were taught entirely in metric, and it had been that way for decades prior. Obviously I'm an adult now, and metric still isn't universal.
- picofarad 3mo agoThe cost is too high. You can't have mph and kmh signs on the same road. So you gotta switch all the signs at once. Mile markers, exit numbers (are miles), distance to signs, all have to change. I did the math on a comment elsewhere. Just google how many miles of interstate there are, and quadruple it, thats not even approaching how many signs you'd need for just the interstate. Signs run $25-ish, plus installation, which can cost >$1000. At the very least the km markers will need to be installed.
- 27183 3mo agoIt's not difficult to write regression tests that catch unit mistakes.
- zapkyeskrill 3mo agoDegrees, very funny.
- cyberax 3mo agoOne of my personal rules is to ALWAYS suffix the variables and fields with unit names: `timeout_ms` or `rate_kbps`, NOT `timeout` or `rate`. Unless the variable type already constrains it (e.g. Duration in Go).
- markus_zhang 3mo agoThis also helps downstream a lot.
- monkpit 3mo agoUntil someone comes along and changes it without updating the name, or the value comes from a remote service and they change without you changing your name… etc.