The Humble Programmer
The Humble Programmer
Turing
Award
Lecture
17
We have come to value good programs in much the same way as
we value good literature. And at the center of this movement, creating
and reflecting patterns no less beautiful than useful, stands E. W. Dijkstra.
18 EDSGERW. DIJKSTRA
SO much for the slowness with which I saw the programming I ~172
profession emerge in my own country. Since then I have seen more 'I t, n'i,ig
Aw~,rd
of the world, and it is my general impression that in other countries, 1,17¢'111 I'1"
apart from a possible shift of dates, the growth pattern has been very
much the same.
Let me try to capture the situation in those old days in a little bit
more detail, in the hope of getting a better understanding of the
situation today. While we pursue our analysis, we shall see how many
common misunderstandngs about the true nature of the programming
task can be traced back to that now distant past.
The first automatic electronic computers were all unique, single-
copy machines and they were all to be found in an environment with
the exciting flavor of an experimental laboratory. Once the vision of
the automatic computer was there, its realization was a tremendous
challenge to the electronic technology then available, and one thing
is certain: we cannot deny the courage of the groups that decided
to try to build such a fantastic piece of equipment. For fantastic pieces
of equipment they were: in retrospect one can only wonder that those
first machines worked at all, at least sometimes. The overwhelming
problem was to get and keep the machine in working order. The pre-
occupation with the physical aspects of automatic computing is still
reflected in the names of the older scientific societies in the field,
such as the Association for Computing Machinery or the British
Computer Society, names in which explicit reference is made to the
physical equipment.
What about the poor programmer? Well, to tell the honest truth, he
was hardly noticed. For one thing, the first machines were so bulky
that you could hardly move them and besides that, they required such
extensive maintenance that it was quite natural that the place where
people tried to use the machine was the same laboratory where the
machine had been developed. Secondly, the programmer's somewhat
invisible work was without any glamour: you could show the machine
to visitors and that was several orders of magnitude more spectacular
than some sheets of coding. But most important of all, the programmer
himself had a very modest view of his own work: his work derived
all its significance from the existence of that wonderful machine.
Because that was a unique machine, he knew only too well that his
programs had only local significance, and also because it was patently
obvious that this machine would have a limited lifetime, he knew that
very little of his work would have a lasting value. Finally, there is yet
another circumstance that had a profound influence on the program-
mer's attitude toward his work: on the one hand, besides being
unreliable, his machine was usually too slow and its memory was
usually too small, i.e., he was faced with a pinching shoe, while on
the other hand its usually somewhat queer order code would cater for
the most unexpected constructions. And in those days many a clever
20 EDSGER W, DIJKSTRA
more dramatic increase in its reliability, made solutions feasible that
the programmer had not dared to dream about a few years before. And
now, a few years later, he had to dream about them and, even worse,
he had to transform such dreams into reality! Is it a wonder that we
found ourselves in a software crisis? No, certainly not, and as you may
guess, it was even predicted well in advance; but the trouble with minor
prophets, of course, is that it is only five years later that you really know
that they had been right.
Then, in the mid-sixties something terrible happened: the computers
of the so-called third generation made their appearance. The official
literature tells us that their price/performance ratio has been one of
the major design objectives. But if you take as "performance" the duty
cycle of the machine's various components, little will prevent you from
ending up with a design in which the major part of your performance
goal is reached by internal housekeeping activities of doubtful necessity.
And if your definition of price is the price to be paid for the hardware,
little will prevent you from ending up with a design that is terribly
hard to program for: for instance the order code might be such as
to enforce, either upon the programmer or upon the system, early
binding decisions presenting conflicts that really cannot be resolved.
And to a large extent these unpleasant possibilities seem to have
become reality.
When these machines were announced and their functional
specifications became known, many among us must have become
quite miserable: at least I was. It was only reasonable to expect that
such machines would flood the computing community, and it was
therefore all the more important that their design should be as sound
as possible. But the design embodied such serious flaws that I felt that
with a single stroke the progress of computing science had been retarded
by at least ten years; it was then that I had the blackest week in the
whole of my professional life. Perhaps the most saddening thing now
is that, even after all those years of frustrating experience, still so many
people honestly believe that some law of nature tells us that machines
have to be that way. They silence their doubts by observing how many
of these machines have been sold, and derive from that observation
the false sense of security that, after all, the design cannot have been
that bad. But upon the closer inspection, that line of defense has the
same convincing strength as the argument that cigarette smoking must
be healthy because so many people do it.
It is in this connection that I regret that it is not customary for
scientific journals in the computing area to publish reviews of newly
announced computers in much the same way as we review scientific
publications: to review machines would be at least as important. And
here I have a confession to make: in the early sixties I wrote such a
review with the intention of submitting it to Communications, but in
spite of the fact that the few colleagues to whom the text was sent
22 EDSGER W. DIJKSTRA
sooner we can forget that FORTRAN ever existed, the better, for as a
vehicle of thought it is no longer adequate: it wastes our brainpower,
and it is too risky and therefore too expensive to use. FORTRAN's tragic
fate has been its wide acceptance, mentally chaining thousands and
thousands of programmers to our past mistakes. I pray daily that more
of m y fellow-programmers m a y find the means of freeing themselves
from the curse of compatibility.
The third project I would not like to leave u n m e n t i o n e d is LISP,
a fascinating enterprise of a completely different nature. With a few
very basic principles at its foundation, it has shown a remarkable
stability. Besides that, LiSP has been the carrier for a considerable
n u m b e r of, in a sense, our most sophisticated computer applications.
LISP has jokingly been described as "the most intelligent way to mis-
use a computer." I think that description a great compliment because
it transmits the full flavor of liberation: it has assisted a n u m b e r of
our most gifted fellow h u m a n s in thinking previoUsly impossible
thoughts.
The fourth project to be mentioned is ALGOL 60. While up to the
present day FORTRAN programmers still tend to understand their pro-
gramming language in terms of the specific implementation they are
working w i t h - - hence the prevalence of octal or hexadecimal d u m p s - -
while the definition of LISP is still a curious mixture of what the
language means and how the m e c h a n i s m works, the famous Report
on the Algorithmic Language ALGOL 60 is the fruit of a genuine effort
to carry abstraction a vital step further and to define a programming
language in an implementation-independent way. One could argue that
in this respect its authors have been so successful that they have created
serious doubts as to whether it could be implemented at all! The report
gloriously demonstrated the power of the formal m e t h o d BNF, now
fairly known as Backus-Naur-Form, and the power of carefully phrased
English, at least w h e n used by someone as brilliant as Peter Naur.
I think that it is fair to say that only very few d o c u m e n t s as short
as this have had an equally profound influence on the computing
community. The ease with which in later years the names ALGOL and
ALGOL-like have been used, as an unprotected trademark, to lend glory
to a n u m b e r of sometimes hardly related younger projects is a somewhat
shocking compliment to ALGOIAs standing. The strength of BNF as a
defining device is responsible for what I regard as one of the weaknesses
of the language: an overelaborate and not too systematic syntax could
now be c r a m m e d into the confines of very few pages. With a device
as powerful as BNF, the Report on the Algorithmic Language ALGOL 60
should have been m u c h shorter. Besides that, I am getting very doubt-
ful about ALGOL 60'S parameter mechanism: it allows the programmer
so much combinatorial freedom that its confident use requires a strong
discipline from the programmer. Besides being expensive to implement,
it seems dangerous to use.
24 EDSGER W. DIJKSTRA
laws of social and cultural inertia--the chance that this drastic change I t) 7 2
will take place must seem negligible. But we all know that sometimes 'l~lring
A~;ird
revolutions do take place] And what are the chances for this one? | , u ( ' l l l l t"
There seem to be three major conditions that must be fulfilled. The
world at large must recognize the need for the change; secondly, the
economic need for it must be sufficiently strong; and, thirdly, the change
must be technically feasible. Let me discuss these three conditions in
the above order.
With respect to the recognition of the need for greater reliability
of software, I expect no disagreement anymore. Only a few years ago
this was different: to talk about a software crisis was blasphemy. The
turning point was the Conference on Software Engineering in Garmisch,
October 1968, a conference that created a sensation as there occurred
the first open admission of the software crisis. And by now it is generally
recognized that the design of any large sophisticated system is going
to be a very difficult job, and whenever one meets people responsible
for such undertakings, one finds them very much concerned about the
reliability issue, and rightly so. In short, our first condition seems to
be satisfied.
Now for the economic need. Nowadays one often encounters the
opinion that in the sixties programming has been an overpaid profes-
sion, and that in the coming years programmer salaries may be expected
to go down. Usually this opinion is expressed in connection with the
recession, but it could be a symptom of something different and quite
healthy, viz. that perhaps the programmers of the past decade have not
done so good a job as they should have done. Society is getting
dissatisfied with the performance of programmers and of their products.
But there is another factor of much greater weight. In the present
situation it is quite usual that for a specific system, the price to be
paid for the development of the software is of the same order of
magnitude as the price of the hardware needed, and society more or
less accepts that. But hardware manufacturers tell us that in the next
decade hardware prices can be expected to drop with a factor of ten.
If software development were to continue to be the same clumsy and
expensive process as it is now, things would get completely out of
balance. You cannot expect society to accept this, and therefore we m u s t
learn to program an order of magnitude more effectively. To put it
in another way: as long as machines were the largest item on the budget,
the programming profession could get away with its clumsy techniques;
but the umbrella will fold very rapidly. In short, also our second con-
dition seems to be satisfied.
And now the third condition: is it technically feasible? I think it might
be, and I shall give you six arguments in support of that opinion.
A study of program structure has revealed that programs--even
alternative programs for the same task and with the same mathematical
content--can differ tremendously in their intellectual manageability.
26 EDSGERW. DIJKSTRA
would be and, having f o u n d this, then constructs a program satisfying I 972
this proof's requirements, then these correctness concerns turn out "1 u r h l g
28 EDSGERW. DIJKSTRA
once our tools will be much more adequate, programming will no longer 1972~
be a problem. Programming will remain very difficult, because once "l.,i.g
we have freed ourselves from the circumstantial cumbersomeness, l.t'('l II l't'
we will find ourselves free to tackle the problems that are now well
beyond our programming capacity.
You can quarrel with my sixth argument, for it is not so easy to
collect experimental evidence for its support, a fact that will not
prevent me from believing in its validity. Up till now I have not
mentioned the word "hierarchy," but I think that it is fair to say that
this is a key concept for all systems embodying a nicely factored
solution. I could even go one step further and make an article of faith
out of it, viz. that the only problems we can really solve in a satisfactory
manner are those that finally admit a nicely factored solution. At first
sight this view of human limitations may strike you as a rather depress-
ing view of our predicament, but I don't feel it that way. On the
contrary, the best way to learn to live with our limitations is to know
them. By the time we are sufficiently modest to try factored solutions
only, because the other efforts escape our intellectual grip, we shall do
our utmost to avoid all those interfaces impairing our ability to factor
the system in a helpful way. And I cannot but expect that this will
repeatedly lead to the discovery that an initially untractable problem
can be factored after all. Anyone who has seen how the majority of
the troubles of the compiling phase called "code generation" can be
tracked down to funny properties of the order code will know a simple
example of the kind of things I have in mind. The wide applicability
of nicely factored solutions is my sixth and last argument for the
technical feasibility of the revolution that might take place in the
current decade.
In principle I leave it to you to decide for yourself how much weight
you are going to give to my considerations, knowing only too well
that I can force no one else to share my beliefs. As in each serious
revolution, it will provoke violent opposition and one can ask oneself
where to expect the conservative forces trying to counteract such a
development. I don't expect them primarily in big business, not even
in the computer business: I expect them rather in the educational
institutions that provide today's training and in those conservative
groups of computer users that think their old programs so important
that they don't think it worthwhile to rewrite and improve them.
In this connection it is sad to observe that on many a university
campus the choice of the central computing facility has too often been
determined by the demands of a few established but expensive applica-
tions with a disregard of the question, how many thousands of "small
users" who are willing to write their own programs are going to suffer
from this choice. Too often, for instance, high-energy physics seems
to have blackmailed the scientific community with the price of its
remaining experimental equipment. The easiest answer, of course,
30 EDSGERW. DIJKSTRA
tion of its tremendous difficulty, provided that we stick to modest and i 972
elegant programming languages, provided that we respect the intrinsic '1 I i r l n g
/~ %~ril I'll
limitations of the human mind and approach the task as Very Humble I.{'¢'hll'C
Programmers.
EDSGER W. DIJKSTRA
D e p a r t m e n t of C o m p u t e r Sciences
The University of Texas at Austin
My Turing Award lecture of 1972 was very much a credo that presented
the programming task as an intellectual challenge of the highest, caliber. That
credo strikes me now lin 1986} as still fully up to date: How not to get lost in
the complexities of our own making is still computing's core challenge.
In its proposals of how to meet that challenge, however, the lecture is
clearly dated: Had I to give it now, I w o u l d d e v o t e a major part of it to the
role of formal techniques in programming.
The confrontation of my expectations in those days with what has happened
since evokes mixed feelings. On the one hand, m y wildest expectations have
been surpassed: neat, concise arguments leading to sophisticated algorithms
that were very hard, if not impossible, to conceive as little as ten years ago
are a regular source of intellectual excitement. On the other hand, I am
disappointed to see how little of this has penetrated into the average computing
science curriculum, in which the effective design of high-quality programs is
neglected in favor of fads (say, "incremental self-improvement of the user-
friendliness of expert systems interfaces"}.
There is an upper bound on the speed with which society can absorb
progress, and I guess I have still to learn how to be more patient.
32