Expert C Programming

(Jeff_L) #1

We have long felt that programmers working on real-time control systems should have the privilege of
taking the first ride on the operational prototype. In other words, if your code implements the life
support systems on the space shuttle, then you get to be launched into space and debug any last minute
glitches personally. This would surely bring a whole new focus to product quality. Table 2-2 shows
some of the opportunities.


Table 2-2. The Truth About Two Famous Space Software Failures
When Mission Error Result Cause
Summer
1961

Mercury. used instead of , nothing; error found
before flight

Flaw in Fortran language

July 22,
1962

Mariner
1

"R" instead of " " written
in specification

$12M rocket and
probe destroyed

programmer followed error
in specification

Let us give the last word in this chapter to a more modern story of space software mishaps, almost
certainly apocryphal. On every space shuttle mission, there is a cargo manifest, or list of all items to
be loaded on board the craft before launch. The manifest lists each item with its weight, and is vital for
calculating the fuel and balancing the craft. It seems that before the maiden flight, a dock master was
checking off certain items as they were loaded onto the shuttle. He checked off the computer systems,
and then came to the manifest entry for the software. It showed the software as having zero weight,
which caused a minor panic—after all, surely everything weighs something!


There was some frantic communication between the loading dock and the computer center before the
problem was resolved, and the zero-weight software (bit patterns in memory) was allowed to pass! Of
course, everyone knows that information has mass in a relativistic sense, but let's not ruin a good story
with pedantry, eh?


References


Ceruzzi, Paul, Beyond the Limits—Flight Enters the Computer Age, Cambridge, MA, MIT Press,1989


Hill, Gladwyn, "For Want of Hyphen Venus Rocket is Lost," New York Times, July 28, 1962.


Nicks, Oran W., Far Travelers—The Exploring Machines, NASA publication SP-480, 1985.


"Venus Shot Fails as Rocket Strays," Associated Press, New York Times, July 23, 1962.


Chapter 3. Unscrambling Declarations in C


"The name of the song is called 'Haddocks' Eyes.'"


"Oh, that's the name of the song, is it?" Alice said trying to feel interested.


"No, you don't understand," the Knight said, looking a little vexed.


"That's what the name is called. The name really is 'The Aged Aged Man.'"


"Then I ought to have said 'That's what the song is called'?" Alice corrected herself.

Free download pdf