- cross-posted to:
- programmerhumor@lemmy.ml
- cross-posted to:
- programmerhumor@lemmy.ml
You think timezones are annoying? Try handling metrics that use imperial and metric, need to be rounded to different precisions across a large system, and are sometimes recorded in a different unit than it’s viewed in. Slap some floating point error on there, and you got yourself a fun time.
I spent all day working on bug where backend was categorizing 19.9999 as falling between <20, but frontend was rounding it to 20 and categorizing it as >=20.
Hopefully you’re not working for NASA.
I remember talking about ths in early semesters of Software Engineer career in college
hey at least once your code is correct it’ll stay that way. You won’t have to deal with things like old and new versions of your program disagreeing on what time it was in Iran for the last month and a half of 1978
But have you ever try making a calendar?
https://zachholman.com/talk/utc-is-enough-for-everyone-right
Thanks, interesting read
This is why, in any competent software dealing with physics in any way, it is always metric under the hood. Someone wants to see a quantity in some stupid freedom units? Fine sure convert it for them, but internally everything should be metric. Physics is hard enough, there’s no reason to make it worse with an inconsistent unit system with built in footguns somehow.
Tom Scott’s video is about to do the rounds again then
Reading the pytz time zone database is an insane and engaging read.
Nobody is ever going to solve that problem.
Days since last timezone issue: -0.0416666666667
underflow
Would be better as 4,294,967,295 instead of -1.




