Let's not forget the stuff that'll break December 31, 2020... because it'll be day 366 (or 365, if 0-indexed). Anyone still using a Zune out there?
2020 Leap Day Bugs
91–100 of 150 posts
Re: 2020 Leap Day Bugs
#92Earlier quoted context omitted.
It's not only about writing your own library though. For example, it's often not reading the documentation properly. In Python, if you take a datetime, and call .replace(year=X) on a datetime for Feb29, it'll throw a ValueError.
Even if you replace it with another leap year?
Re: 2020 Leap Day Bugs
#93Earlier quoted context omitted.
When you encounter someone saying "no one should ever", you can substitute "fewer than a half dozen groups of people should tackle this problem (in systems they want to use in production). It will take each such group a tremendous number of hours, involving a multi-year process of slowly finding edge cases and missing functionality." If that's not true, then there's room to complain, but dates and times fit the bill.…
What if people tried to speak precisely for effect instead of hyperbolically for emphasis?
Sounds boring but functional.
Re: 2020 Leap Day Bugs
#94is there something special about 2020 (regarding leap years)? the rule I know is divisible by 4 && ( not divisible by 100 || divisible by 400) so 2020 is not even an edge case.
"Leap day bugs, again! People, must we go through this every 4 years?"
So this is a crop of bugs that are either code written in the last 4 years or untested/unnoticed/unreported 4 years ago.
One of the Sprint examples (someone roaming between two cell towers and their date changing back and forth) is especially disturbing.
Re: 2020 Leap Day Bugs
#95Re: 2020 Leap Day Bugs
#96Earlier quoted context omitted.
And probably because signed integers are a default choice in certain languages and/or maybe on certain architectures. Java, for example, famously doesn't even have an unsigned 32-bit integer primitive type. (But it has library functions you can use to treat signed integers as unsigned.) Ultimately not a good design choice, but the fact that it actually wasn't that limiting and relatively few people care or notice tel…
> out of range unsigned int AFAIK, that doesn't exist? Otherwise, unsigned would also have UB?
Re: 2020 Leap Day Bugs
#97Earlier quoted context omitted.
And probably because signed integers are a default choice in certain languages and/or maybe on certain architectures. Java, for example, famously doesn't even have an unsigned 32-bit integer primitive type. (But it has library functions you can use to treat signed integers as unsigned.) Ultimately not a good design choice, but the fact that it actually wasn't that limiting and relatively few people care or notice tel…
> out of range unsigned int AFAIK, that doesn't exist? Otherwise, unsigned would also have UB?
Re: 2020 Leap Day Bugs
#98Re: 2020 Leap Day Bugs
#99Re: 2020 Leap Day Bugs
#100Earlier quoted context omitted.
I assumed you were being precise when you asked "why can't people speak more precisely" and also when you asked "can you explain how your comment relates to mine?" I am not the person you originally responded to, fwiw, and I agree that trying to speak precisely is a useful exercise, even if I believe it is impossible except in highly formalized languages.
I wrote "What if people tried to speak precisely", not "why can't people speak more precisely".