Comment by AlotOfReading
6 days 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.
6 days 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.
One 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).
Until 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.
This also helps downstream a lot.
It's not difficult to write regression tests that catch unit mistakes.
One of the Mars landers famously failed due to unit conversion errors from metric to standard.
I 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)
Claiming 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.
3 replies →
I know you’re being snarky, but the US system is not “imperial” anyway. It’s properly “US Customary” but is often called “US Standard.”
Wasn't it (also?) the Ariane V flight in 1996? Oh, NVM, that was an overflow error.
Degrees, very funny.