2 ms·
There is a god somewhere, dispensing Cosmic Karma as deserved. Yesterday I posted in the original thread: The Java SimpleDateFormat has a similar gotcha co
by hyperman1 8y ago
There is a god somewhere, dispensing Cosmic Karma as deserved.
Yesterday I posted in the original thread:
The Java SimpleDateFormat has a similar gotcha concerning %k vs %h
Today one of my self-written utilities crashes in a weird way. Hacky as it was, it did its job nicely for over two months. Half an hour troubleshooting later it turns out the DATE FORMAT STRING is WRONG. Really. I kid you not. Neither %k nor %h turns out to be right, this specific program has a 1/86400 chance of absolutely requiring %H .
Then again, the standard format strings would not have helped here, I need to match the undocumented behavior of an existing program. And it only crashes when someone inputs something at exactly 00:00:00 and so far no bleary eyed user had to burn the midnight oil.
It is in test for now. In 8 days, this baby aids the data migration to production. This bug would have aborted the launch of a program which has to be released before the GDPR awakens. Very close call.
There is a lesson about hubris somewhere in here.
- hyperman1 8y agoI posted a feature request to findbugs, which seems to have been renamed to spotbugs. At least Java shall suffer no more (if they implement this, at least) https://github.com/spotbugs/spotbugs/issues/637 https://github.com/spotbugs/spotbugs/issues/637
- twic 8y agoThe backstory about the 'rename' is that the original FindBugs maintainer sort of abandoned it, so the community forked it: https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-N... I thought it was a nice demonstration that a project can fairly smoothly survive a regime change without a smooth transfer of power.