Monday, 11 March, 2002

C.A.R Hoare on Constructing Software

In his 1980 Turing Award lecture, The Emperor's Old Clothes (it's a PDF, you might want to right-click and download for offline viewing), C.A.R. Hoare says:

There are two ways of constructing a software design.  One way is to make it so simple that there are obviously no deficiencies and the other is to make it so complicated that there are no obvious deficiencies.

(The quote is on page 81 of the PDF, halfway down the left column.  But read the entire article—it's worth the time.)

The next page or so of the article discusses his experiences with the Algol 68 design (overly complex), the PL/1 debacle (overly complex), and the new (at the time) ADA language (which in turn flopped, largely because it was overly complex).  Are you seeing a pattern here?  (Perhaps relevant is that all three languages were designed by committee, whereas the most successful languages since 1970 to present are C, Basic, and Pascal—all of which were designed by small groups.)

Although Hoare's quote is in the context of programming language designing, it applies equally to all software projects.  Unfortunately, the former method is much more difficult—at least in the short term—so most people who call themselves computer programmers don't even attempt it.  Rather, they "design at the keyboard."  The result is the current state of most software, and a growing public distrust of everything computer-related.

The study of software construction—effective means of building quality software—is something of a passion for me, which is one reason I get so frustrated when I see or have to use such poor software; or, even worse, hear yet another "programmer" say that there's no such thing as bug-free code.  There is such a thing, it can be created, and it's cheaper in the long run than trying to fix and maintain poorly-written code.

There has been some grumbling lately from within the software industry to improve security and quality of software.  This can't come any time too soon, in my opinion.  If we continue much longer with the poor state of software, it will attract the eye of legislators, who will undoubtedly do something to make matters worse.  Better that we clean our own nests, don't you think?