Y2.01K Bug [modified]
-
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
-
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