of a language. I looked at my book and I found excerpts from several dozen pages where I thought it gave all the variety of things I need in the book. Then I sat down and I thought, well, if I were Phyllis, how would I like to key this in? What would be a reasonable format that would appeal to Phyllis, and at the same time something that as a compiler writer I felt I could translate into the book? Because TeX is just another kind of a compiler; instead of going into machine language you’re going into words on a page. That’s a different output language, but it’s analogous to recognizing the constructs that appear in the source file.
the programming turned out to be harder than he thought. I showed the second version of the design to two of my graduate students, and I said, “Okay, implement this, please, this summer. That’s your summer job.” I thought I had specified a language. To my amazement, the students, who were outstanding students, did not complete it. They had a system that was able to do only about three lines of TeX. I thought, “My goodness, what’s going on? I thought these were good students.” Later I changed my attitude, saying, “Boy, they accomplished a miracle.” Because going from my specification, which I thought was complete, they really had an impossible task, and they had succeeded wonderfully with it. These guys were actually doing great work, but I was amazed that they couldn’t do what I thought was just sort of a routine task. Then I became a programmer in earnest, I had to do it.
this experience led to general observations about programming and specifications. When you’re doing programming, you have to explain something to a computer, which is dumb. When you’re writing a document for a human being to understand, the human being will look at it and nod his head and say, “Yeah, this makes sense.” But there are all kinds of ambiguities and vagueness that you don’t realize until you try to put it into a computer. Then all of a sudden, almost every five minutes as you’re writing the code, a question comes up that wasn’t addressed in the
specification. “What if this combination occurs?” It just didn’t occur to the person writing the design specification. When you’re faced with doing the implementation, a person who has been delegated the job of working from a design would have to say, “Well, hmm, I don’t know what the designer meant by this.”
It’s so hard to do the design unless you’re faced with the low-level aspects of it, explaining it to a machine instead of to another person. I think it was George Forsythe who said, “People have said you don’t understand something until you’ve taught it in a class. The truth is you don’t really understand something until you’ve taught it to a computer, until you’ve been able to program it.” At this level, programming was absolutely important.
When I got to actually programming TeX, I had to also organize it so that it could handle lots of text. I had to develop a new data structure in order to be able to do the paragraph coming in text and enter it in an efficient way. I had to introduce ideas called “glue,” and “penalties,” and figure out how that glue should disappear at bound-
aries in certain cases and not in others. All these things would never have occurred to me unless I was writing the program.
Edsger Dijkstra gave this wonderful Turing lecture early in the 1970s called “The Humble Programmer.” One of the points he made in his talk was that when they asked him in Holland what his job title was, he said, “ Programmer,” and they said, “No, that’s not a job title. You can’t do that; programmers are just coders. They’re people who are assigned like scribes were in the days when you needed somebody to write a document in the Middle Ages.” Dijkstra said no, he was proud to be a programmer. Unfortunately, he changed his attitude completely, and I think he wrote his last computer program in the 1980s.
I checked the other day and found I wrote 35 programs in January, and 28 or 29 programs in February. These are small programs, but I have a compulsion. I love to write programs. I think of a question that I want to answer, or I have part of my book where I want to present something, but I can’t just present it by reading about it in a book. As I code it, it all becomes clear in my head. The fact that I have to translate my knowledge of this method into something that the machine is going to understand forces me to make that knowledge crystal-clear in my head. Then I can explain it to somebody else infinitely better. The exposition is always better if I’ve implemented it, even though it’s going to take me more time.
It didn’t occur to me at the time that I just had to program in order to be a happy man. I didn’t find my other roles distasteful, except for fundrais-ing. I enjoyed every aspect of being a professor except dealing with proposals, which was a necessary evil. But I wake up in the morning with an idea, and it makes my day to think of adding a couple of lines to my program. It gives me a real high. It must be the way poets feel, or musicians, or painters. Programming does that for me.
the teX project led to metafont for the design of fonts. But it also wasn’t smooth sailing. Graphic designers are about the nicest people I’ve ever met in my life. In
References:
Archives