- 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
Frist
Happy new year!
Admin
First (of January)!
Admin
Code Bomb?
And its the Second.
Admin
Did the mayans put this code?
Admin
The "World will end anyway" preparations?
Admin
Should be 2013, as we all know it wont happen, just to be sure that no one can renew the license after the apocalypse.
Admin
I think someone was just too fond of the end of the world idea
Admin
That doesn't excuse the fact that they missed by about 11 (and some change) months.
Admin
You need that kind of statement to test the error case. Of course you're supposed to remove it after testing the error case...
Admin
It really does look like intentional sabotage.
Admin
And of course, as we all know the world will end after December 31, 9999. After all, that's when the calender ends.
Admin
Admin
You took out the anti end of the world code!!! WHAT HAVE YOU DONE!!?!
Admin
Admin
Admin
\w\o\r\l\d
There.
Admin
Sadness is when you run that and you can only blame yourself. It's a double edged sword. :D
Admin
Maybe the IF should have been left in and changed to 2127 ... and I thought a part of the Y2K work was to centralise century windows, certainly not have them coded in-line in various modules ...
Admin
It's still stupid, but perhaps it was put in for testing.
Would be interesting to find out how old the code is. My money is on ten.
Admin
We had a radar simulation that crashed when a swerling number other that 4 was entered with a message saying..."Major error, Bye.'. After some digging, we hit your situation. Go figure.
Admin
I would suggest it was perhaps put in long ago when there as no way any client could possibly be claiming a valid licence as far ahead as 2012, meaning anything with that year has to be invalid... except then, why would the code not test for any years AFTER then as well?
Still a fail regardless, of course!
Admin
There is, (of course) a real 2012 overflow: the DOS date format, which is still the "blessed" timestamp format in Zip files. NTFS and Unix format timestamps are fairly widely supported as well (though as extensions), but I'm expecting some nasty bugs to get flushed out over the year in various hand-written zip creator/readers (and you know there is a bunch of those!)
Admin
Looks like employment preservation code.
Admin
Doesn't
do exactly the same thing as well? :)Admin
Admin
Dawn of The Second Day
48 Hours Remain...
Admin
Admin
Admin
Admin
Officially welcome to the-less-than-half-daily-wtf.com.
Admin
Is there really a more effective way to stare into the abyss of human existence than dealing with crappy software?
Admin
Let it go, man, the last thing you want around here is to get Alex thinking about a site rename again. Well, next to last thing.
Admin
Do need for sabotage, there is an INVALIDDATE section and this was probably a test for that. Someone did not remove a debugging statement.
Admin
My guess is that this was someone's ham-fisted attempt to keep people from entering dates that were 'too far' in the future.
If you have good source control you could figure out when that line was added and if there's a decent change comment about it.
Addendum (2012-01-02 17:06): Which means that 'the real WTF' here is the fact that apparently the person who fixed this problem wasn't able to figure out why the change was put in in the first place using source control.
Admin
You can have the best source control system in the known universe, but someone stupid enough to insert a line like that and leave it in production will almost certainly have put a completely bogus (or unintelligible) explanatory comment.
Admin
By removing the statement you have awoken Ctulhu
Admin
throw new IllegalStateException("Date not possible due to Mayan Calendar Error");
Anyone would dare to create a Mayan Calendar class for Java? ;-)
Admin
Admin
The Mayans correctly predicted the end of the world in 2012, due to GOTO statements.
Admin
TRWTF is not grep'ing for invalid and date in the same line.
Admin
Should've been 2013. There'd be no one to care :)
Admin
"Go to"!?
Admin
Admin
That was planned by your workmates so you would miss the office NYE party. They probably injected this a week ago in your back cos they didn't wanna see you at the party.
Admin
Seriously?
Wouldn't a real invalid date be better? 1854 or something. Otherwise what are you testing?
Oh oh so the real wtf is you tested code that no longer exists, was wrong to begin with, without an automated unit test,and the whole process is totally unreproducible.
Admin
World wont end in 2012, everyone knows it will end in 2038.
Admin
I had one of those blinding-flash-of-light moments back in the 90s. Our stand-in transaction processing system suddenly threw out a whole mess of "invalid currency" errors one July. Nothing we hadn't seen before, but the quantity of them hit an all-time one-day spike. When I was finally able to get the dumps, it turned out they were all coming from the same third-party channel (a consolidator for traffic from airlines), and all the invalid currencies were Canadian dollars (at that time the stand-in system could only handle US dollars, and we limited the channels based on whether we expected them to use anything else).
Suddenly it hit me. The first of July. Canada Day. Canucks all over the world who would otherwise never charge anything on their credit cards were suddenly flying back home on the same day. On Air Canada. And charging the tickets in loonies.
Admin
The good thing is, it forces the maintainer to recheck the whole codebase
Admin
Admin
Nah. This defers the problem too long. He should have put in 2013...job security, you know. If he still works there, he can fix it December 30th to avoid the New Year's disruption.
If he doesn't, well, someone else can put it off for another year, right?