burned with disappointment. I really
felt a hot flash, I was so upset. It had to
look right, and it didn’t, at that time.
I’m happy to say that I open my books
now and I like what I see. Even though
they don’t match the 1968 book exactly, the way they differ are pleasing
What it was like writing teX.
Structured programming gave me a
different feeling from programming
the old way—a feeling of confidence
that I didn’t have to debug something
immediately as I wrote it. Even more
important, I didn’t have to mock-up
the unwritten parts of the program. I
didn’t have to do fast prototyping or
something like that, because when you
use structured programming methodology you have more confidence that
it’s going to be right, that you don’t
have to try it out first. In fact, I wrote all
of the code for TeX over a period of seven months, before I even typed it into a
computer. It wasn’t until March 1978
that I spent three weeks debugging everything I had written up to that time.
I found that writing software was
much more difficult than anything
else I had done in my life. I had to keep
so many things in my head at once. I
couldn’t just put it down and start
something else. It really took over my
life during this period. I used to think
there were different kinds of tasks:
writing a paper, writing a book, teaching a class, things like that. I could
juggle all of those simultaneously. But
software was an order of magnitude
harder. I couldn’t do that and still teach
a good Stanford class. The other parts
of my life were largely on hold, including The Art of Computer Programming.
My life was pretty much typography.
teX leads to a new way
Literate programming, in my mind,
was the greatest spin-off of the TeX
project. I learned a new way to program.
I love programming, but I really love
literate programming. The idea of literate programming is that I’m writing
a program for a human being to read
rather than a computer to read. It’s
still a program and it’s still doing the
stuff, but I’m a teacher to a person. I’m
addressing my program to a thinking
being, but I’m also being exact enough
so that a computer can understand it
as well. Now I can’t imagine trying to
write a program any other way.
As I’m writing The Art of Computer
Programming, I realized the key to
good exposition is to say everything
twice: informally and formally. The
reader gets to lodge it in his brain in
two different ways, and they reinforce
each other. In writing a computer program, it’s also natural to say everything
in the program twice. You say it in English, what the goals of this part of the
program are, but then you say it in your
computer language. You alternate between the informal and the formal. Literate programming enforces this idea.
In the comments you also explain
what doesn’t work, or any subtleties.
You can say, “Now note the following.
Here is the tricky part in line 5, and
it works because of this.” You can explain all of the things that a maintainer
needs to know. All this goes in as part
of the literate program, and makes
the program easier to debug, easier to
maintain, and better in quality.
after teX, Don gets to go back
We finished the TeX project; the climax was in 1986. After a sabbatical in
Boston I came back to Stanford and
plunged into what I consider my main
life’s work: analysis of algorithms.
That’s a very mathematical thing,
and so instead of having font design
visitors to my project, I had great algorithmic analysts visiting my project.
I started working on some powerful
mathematical approaches to analysis
of algorithms that were unheard of in
the 1960s when I started the field. Here
“at age 55 i
emeritus of the
art of computer
with a capital ‘t.’
i love that title.”
I am in math mode, and thriving on
the beauties of this subject.
One of the problems out there that
was fascinating is the study of random
graphs. Graphs are one of the main focuses of Volume 4, all the combinatorial algorithms, because they’re ubiquitous in applications.
frustrated with the rate of
progress, he “retires” to devote
himself to “the art.”
I wasn’t really as happy as I let on. I
mean, I was certainly enjoying the research I was doing, but I wasn’t making
any progress at all on Volume 4. I’m doing this work on random graphs, and
I’m learning all of these things. But at
the end of the year, how much more
had been done? I’ve still got 11 feet of
preprints stacked up in my closet that
I haven’t touched, because I had to put
that all on hold for the TeX project. I
figured the thing that I’m going to be
able to do best for the world is finishing The Art of Computer Programming.
The only way to do it was to stop being a professor full time. I really had
to be a writer full time. So, at age 55 I
became “Professor Emeritus of The
Art of Computer Programming,” with
a capital “T.” I love that title.
Don is a master at straddling
the path between engineering
I always thought that the best way to
sum up my professional work is that it
has been an almost equal mix of theory
and practice. The theory I do gives me
the vocabulary and the ways to do practical things that can make giant steps
instead of small steps when I’m doing
a practical problem. The practice I do
makes me able to consider better and
more robust theories, theories that
are richer than if they’re just purely
inspired by other theories. There’s
this symbiotic relationship between
those things. At least four times in my
life when I was asked to give a kind of
philosophical talk about the way I look
at my professional work, the title was
“Theory and Practice.” My main message to the theorists is, “Your life is
only half there unless you also get nurtured by practical work.”
Software is hard. My experience with
TeX taught me to have much more admiration for colleagues that are devot-