• First (unregistered)

    Frist

    Happy new year!

  • Null (unregistered)

    First (of January)!

  • (cs)

    Code Bomb?

    Null:
    First (of January)!

    And its the Second.

  • Raizer (unregistered)

    Did the mayans put this code?

  • Petr (unregistered)

    The "World will end anyway" preparations?

  • Suomynona (unregistered)

    Should be 2013, as we all know it wont happen, just to be sure that no one can renew the license after the apocalypse.

  • iluxa (unregistered) in reply to Raizer

    I think someone was just too fond of the end of the world idea

  • (cs) in reply to iluxa
    iluxa:
    I think someone was just too fond of the end of the world idea

    That doesn't excuse the fact that they missed by about 11 (and some change) months.

  • Poster (unregistered)

    You need that kind of statement to test the error case. Of course you're supposed to remove it after testing the error case...

  • (cs)

    It really does look like intentional sabotage.

  • (cs)

    And of course, as we all know the world will end after December 31, 9999. After all, that's when the calender ends.

  • (cs)
    svn blame
    to the rescue!
  • d (unregistered)

    You took out the anti end of the world code!!! WHAT HAVE YOU DONE!!?!

  • (cs) in reply to GalacticCowboy
    GalacticCowboy:
    svn blame
    to the rescue!
    Gotta love blame! It's the sole piece in source control that keeps a team together.
  • (cs) in reply to Pim
    Pim:
    And of course, as we all know the world will end after December 31, 9999. After all, that's when the calender ends.
    No, the problem of ending calendars was solved in RFC2550 once and for all. There is no escape from the world anymore.
  • (cs) in reply to m
    m:
    No, the problem of ending calendars was solved in RFC2550 once and for all. There is no escape from the world anymore.
    Haha, that RFC was written on April the first. I'm not falling for that one! Anyway, you say there's no escaping the world, but I can try.

    \w\o\r\l\d

    There.

  • (cs) in reply to GalacticCowboy
    GalacticCowboy:
    svn blame
    to the rescue!

    Sadness is when you run that and you can only blame yourself. It's a double edged sword. :D

  • FRooP (unregistered)

    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 ...

  • Caoilte (unregistered)

    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.

  • Not Frist (unregistered)

    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.

  • Adrian Wood (unregistered)

    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!

  • simonbuchan (unregistered)

    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!)

  • Gary Olson (unregistered) in reply to Melnorme
    Melnorme:
    It really does look like intentional sabotage.

    Looks like employment preservation code.

  • P (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    GalacticCowboy:
    svn blame
    to the rescue!
    Gotta love blame! It's the sole piece in source control that keeps a team together.

    Doesn't

    svn praise
    do exactly the same thing as well? :)

  • (cs) in reply to simonbuchan
    simonbuchan:
    There is, (of course) a real 2012 overflow: the DOS date format, which is still the "blessed" timestamp format in Zip files.
    It may be the blessed timestamp format, but it doesn't roll over until 2107, as it has 7 bits for year number from 1980.
  • (cs) in reply to d
    You took out the anti end of the world code!!! WHAT HAVE YOU DONE!!?!

    Dawn of The Second Day

    48 Hours Remain...

  • (cs) in reply to ekolis
    ekolis:
    You took out the anti end of the world code!!! WHAT HAVE YOU DONE!!?!

    Dawn of The Second Day

    48 Hours Remain...

    Jack Bauer would have already finished the game by now!
  • (cs) in reply to Pim
    Pim:
    m:
    No, the problem of ending calendars was solved in RFC2550 once and for all. There is no escape from the world anymore.
    Haha, that RFC was written on April the first. I'm not falling for that one! Anyway, you say there's no escaping the world, but I can try.

    \w\o\r\l\d

    There.

    \⊕ or perhaps 🌐
  • foo (unregistered) in reply to PiisAWheeL
    PiisAWheeL:
    iluxa:
    I think someone was just too fond of the end of the world idea

    That doesn't excuse the fact that they missed by about 11 (and some change) months.

    People should spend the last 11 months of the world contemplating their lives instead of dealing with crappy software licenses.

  • TRTDWTF (unregistered)
    int days_in_december[15] = { 2, 5, 6, 8, 9, 12, 14, 15, 16, 19, 20, 22, 27, 29, 30 };
    

    Officially welcome to the-less-than-half-daily-wtf.com.

  • BushIdo (unregistered) in reply to foo

    Is there really a more effective way to stare into the abyss of human existence than dealing with crappy software?

  • some guy (unregistered) in reply to TRTDWTF
    TRTDWTF:
    int days_in_december[15] = { 2, 5, 6, 8, 9, 12, 14, 15, 16, 19, 20, 22, 27, 29, 30 };
    
    Officially welcome to the-less-than-half-daily-wtf.com.

    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.

  • will (unregistered)

    Do need for sabotage, there is an INVALIDDATE section and this was probably a test for that. Someone did not remove a debugging statement.

  • (cs)

    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.

  • F (unregistered) in reply to Omnifarious
    Omnifarious:
    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.

    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.

  • Max (unregistered)

    By removing the statement you have awoken Ctulhu

  • (cs)

    throw new IllegalStateException("Date not possible due to Mayan Calendar Error");

    Anyone would dare to create a Mayan Calendar class for Java? ;-)

  • a 'oi rgb (unregistered) in reply to some guy
    some guy:
    TRTDWTF:
    int days_in_december[15] = { 2, 5, 6, 8, 9, 12, 14, 15, 16, 19, 20, 22, 27, 29, 30 };
    
    Officially welcome to the-less-than-half-daily-wtf.com.

    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.

    Because someone who runs a free site is not entitled to a holiday over Christmas/New Year?

  • (cs)

    The Mayans correctly predicted the end of the world in 2012, due to GOTO statements.

  • Atle (unregistered)

    TRWTF is not grep'ing for invalid and date in the same line.

  • Zekses (unregistered)

    Should've been 2013. There'd be no one to care :)

  • steve goodhall (unregistered)

    "Go to"!?

  • (cs) in reply to BentFranklin
    BentFranklin:
    The Mayans correctly predicted the end of the world in 2012, due to GOTO statements.
           GO TO 2012
    2012   CONTINUE
    
    (I couldn't resist).
  • Totara (unregistered)

    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.

  • 8bit (unregistered) in reply to Poster

    Seriously?

    You need that kind of statement to test the error case.

    Wouldn't a real invalid date be better? 1854 or something. Otherwise what are you testing?

    Of course you're supposed to remove it after testing the error case...

    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.

  • (cs)

    World wont end in 2012, everyone knows it will end in 2038.

  • (cs) in reply to First
    It took me a moment to realize the significance of 4:00PM, but then it hit me: I'm on Pacific Time, which is UTC -8 hours.

    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.

  • (cs)

    The good thing is, it forces the maintainer to recheck the whole codebase

  • (cs) in reply to 8bit
    8bit:
    You need that kind of statement to test the error case.

    Wouldn't a real invalid date be better? 1854 or something. Otherwise what are you testing?

    Go ahead and set your system clock to the year 1854 and let me know how it turns out.

  • (cs) in reply to FRooP
    FRooP:
    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 ...

    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?

Leave a comment on “2012... Just Because”

Log In or post as a guest

Replying to comment #:

« Return to Article