- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
If that's Ruby, is nil causing troubles in a language that doesn't even dereference nil pointers? Amazing.
Admin
So was it sabotage?
Admin
I hear a coded reference to "called the said cow-orker every kind of bad name imaginable." And in the most impolite way possible.
Admin
I've often had to patch Microsoft SRSS reports with these kinds of date bugs in them.
Usually in January when a report lazily tries to calculate month numbers and ends up trying to build a date using month 0 instead of month 12 of last year.
I'm always surprised at just how badly people can fail to understand dates by treating their components as numbers.
And I'm somewhat in awe of how much standard date handling libraries do, and how well they do it.
Admin
at least billing blew up on 1 december when more people were likely to be working, rather than on 1 january when many are either on leave or hungover, and which is also a public holiday in many places (:
Admin
Was this new code? If this code has been around for at least a year, this wouldn't be the first occurrence of the problem.
Admin
I imagine it's 'new' in the sense that 'it was done in March, then forgotten about until now'.
Admin
Need more code to understand what's going on here. This seems like an attempt to indirectly patch a bad state caused by some other bad code somewhere that isn't understood. Also, I agree that if they used some kind of version control, one could easily see when it was introduced and maybe even read the logged comments. Of course, commented code would help tremendously too.
Admin
A lot of common datetime libraries treat month 0 or day 0 as the 12/last day of the previous year when parsing because this mistake is so common and it'd just easier to add an edge case for invalid values than get bad developers to understand their problem space.
Admin
As to any customer whose bill was cancelled by the bug at any time in history , the result would be they (probably) didn't send you any money that month and therefore would have an outstanding balance when next month rolls around.
Decent bet the main bill generating code does something morally equivalent to
With the result that any damaged bills are self-healed a month later.
Admin
Hopefully not.
I don't know about you. But if I got no bill one month and than next month got a double bill with zero explanation I would be furious. This is the sort of situation that requires a letter or at least email with an apology and explanation and not just a silent doubling of the next bill.