### Windowing Question/Comment from our in-house Geek!

greenspun.com : LUSENET : TimeBomb 2000 (Y2000) : One Thread

I've been debating the Y2K issue with the head of our hardware/systems integration dept. We work at a small ERP software vendor. He sent me the following email and I'd sure appreciate it if some of the tech folks on this board could respond:

Jimmy, I just realized something. There might be a critical flaw in the "sliding window" technique for year calculation. to wit: In 2001, a 30 year sliding window says that any number from 00 to 31 will be in century "20", and any number from 32-99 is in century "19". It also should base the century choices on the current year. If the current year is less than 70, then we drop back a century when we violate the window, otherwise we jump forward. What if everyone missed the part about the centuries? do we go though this in 100 years? What happens in, say, 2098? Did the programmers make the systems smart enough to slide the window so that anything from 00-28 equates to century "21"? If I enter "01/01/02" in 2098, do I get 1902, 2002, or 2102? The algorithm to do it correctly is really simple, so I don't really think that I could possibly be the first to come up with it, but hey, with 95% of all humans being idiots, one never knows. Have a nice day.

-- Jimmy Splinters (inthe@dark.com), January 24, 2000

And the answer is (drum roll please)......It depends! The systems started with a fixed window (00-99 = 1900-1999). Although this dynamic window is somewhat clever, I doubt it was used much, even if recognized. If date routines are scattered throughout a program, this would have only added to the complexity. If date handling routines were centralized in a common library (yeah, right!) this would have been much easier. A serious fly in the ointment are systems that must span multiple centuries of data. I think somebody talked about databases of oil leases that go back to the late 1800's.

Anyway, the systems do what they have been programmed to do. In any event, these systems won't be around much longer anyway. ;-)

-- Chris Tisone (c_tisone@hotmail.com), January 24, 2000.

Most sliding windows will require some programmer intervention in about 100 years, if the code is still around. Most non-sliding windows will require programmer intervention in a random number of years, if the code is still around. (A lot of places that chose windowing were just trying to buy a few years time until they got around to replacing the old systems.)

If the Y2K remediators documented their fixes and/or kept a common library of date routines or date objects, it should be an easy maintenance fix. The hard part of Y2K was finding the code and finding the dates, not making the fixes.

-- kermit (colourmegreen@hotmail.com), January 24, 2000.

JUST SAY "NO" TO WINDOWING. That means all data should be converted to dates with 4-digit years. All programs need to be converted to deal with dates with 4-digit years only. PERIOD. The managers and IT turkeys keep looking for a way to avoid "biting the bullet". STOOOOPID!! They can always authorize time to deal with problems caused by screwups, but never enough time to do what's required to reduce/eliminate the screwups in the first place. F*ing clueless (Dilbert type) pointy-haired bosses.

-- A (A@AisA.com), January 24, 2000.