CS 477 Lecture Notes

Week Fourteen, Thursday: Project Demonstrations

Demonstration Agenda

TBD

Year 2000 Problem

Even though Y2K came without many problems (because of the efforts through the preceeding years), Y2K problem fixes are still relevant now: many new bugs may appear in the future as a result of fixes incorporated in the last few years. Software engineers should be conversant with some of the approaches to the Y2K "bugs" that might have been implemented.

Portions of this lecture are excerpted from Dr. Dobb's Journal, May, 1998. Fair use for educational purposes.

The Y2KP is sometimes erroneously called the "millenium bug:" The third millenium won't begin until January 1, 2001. Many problems will occur before year 2000. GPS receivers with their 13-bit epoch field in PROM will fail on August 22, 1999.

Bob Bemer: "Everybody blames the programmers, but it wasn't their fault. It was people [like managers, customers]. They were happy they didn't have to use 19s." (Quoted from "Programming Paradigms," by Michael Swaine, Dr. Dobb's Journal, May, 1998. Bob Bemer invented ASCII, data typing, named COBOL, and was a pioneer in word processing and time sharing.)

Y2KP Management

The first thing a company must do is assess the magnitude of the problem. Any business that hasn't already started this is poorly managed and deserves to go under in 2000. It could be really interesting to obtain a list of these companies and sell their stock short. Here's the management process:
  1. Formulate a list of software programs that are mission critical.
  2. Use scanning software on the source code (if it's available) of the mission critical programs to determine which ones have a Y2KP.
  3. Focus efforts on repairing those mission critical programs.

Repair Approaches

Regardless of whether we call it corrective, adaptive, or perfective maintenance, the faults must be identified and repaired. The problems are of two types: programs and data.

Date Expansion

The preferred method, given sufficient time: go from MMDDYY date representation to MMDDYYYY.

Advantages:

Drawbacks:

In practice, date expansion requires that you find and alter all declarations, output and input statements, calculations, and function calls. All existing data files with dates must be converted.

Windowing

Windowing is a logic solution. Dates are translated on-the-fly. Humans do this easily and naturally. There are two types of windowing, fixed and sliding. Sliding windows move as the current date changes (the fix lasts longer).

Advantages:

Drawbacks:

Date Compression

The Y2KP is really a storage overflow problem. Date "compression" simply uses a more concise date representation.

Advantages:

Compression works well when:

The CYYDDD Format: C is the number of centuries since 1900 and YY is the number of years in the century. DDD is the day-count in the year.

The DDDDDD Format: Count the number of days since a certain date.

The MMDD 16-bit Year Format: Replace the YY field with a bit register (two 8-bit bytes). 16 bits stores 65,535 years.

The 48-bit Date Format: Count the number of days since a given date and store in a 48-bit register. It holds billions of years.

See DDJ for algorithms for date conversions.


This page established April 13, 1998; last updated January 17, 2000.