Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Y2.01K Bug [modified]

Y2.01K Bug [modified]

Scheduled Pinned Locked Moved IT & Infrastructure
helpc++htmlcom
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DQNOK
    wrote on last edited by
    #1

    I just encountered some code that fixed a Y2K issue with the following:

    decade = substring( my_YYDDD_DateString, 1,1 ) ;
    --return a YYYYDDD date string.
    if( decade = 0 ) then
    return "20" || my_YYDDD_DateString ;
    else
    return "19" || my_YYDDD_DateString ;

    HOLY MOLEY! They took a Y2K issue and fixed it by creating a Y2.01K issue. Given that the Fiscal Year where this code is used ends on Sep 30, they've got about 56 days to get it fixed! When the task to fix Y2K issues was given to programmers over a decade ago, I think most of us just assumed they would actually fix it; not just push it out one decade. It appears that the programmers that wrote this may have been paid by the line because they duplicated that code segment above throughout the code. A true "sliding window" would have been just as easy to implement, but then, they wouldn't have been able to cash-in on fixing the Y2.01K bug. Kind of scary. Get ready to get out your wallets!

    David --------- Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code. http://yosefk.com/c++fqa/picture.html#fqa-6.6 ---------

    modified on Wednesday, August 5, 2009 5:44 PM

    L 1 Reply Last reply
    0
    • D DQNOK

      I just encountered some code that fixed a Y2K issue with the following:

      decade = substring( my_YYDDD_DateString, 1,1 ) ;
      --return a YYYYDDD date string.
      if( decade = 0 ) then
      return "20" || my_YYDDD_DateString ;
      else
      return "19" || my_YYDDD_DateString ;

      HOLY MOLEY! They took a Y2K issue and fixed it by creating a Y2.01K issue. Given that the Fiscal Year where this code is used ends on Sep 30, they've got about 56 days to get it fixed! When the task to fix Y2K issues was given to programmers over a decade ago, I think most of us just assumed they would actually fix it; not just push it out one decade. It appears that the programmers that wrote this may have been paid by the line because they duplicated that code segment above throughout the code. A true "sliding window" would have been just as easy to implement, but then, they wouldn't have been able to cash-in on fixing the Y2.01K bug. Kind of scary. Get ready to get out your wallets!

      David --------- Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code. http://yosefk.com/c++fqa/picture.html#fqa-6.6 ---------

      modified on Wednesday, August 5, 2009 5:44 PM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      A true coding horror! :omg:

      I are Troll :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups