Brian Kernighan *69, co-author of classic texts including The C Programming Language, came to Princeton in 1964, when the campus had just one computer. He went on to a rewarding career at Bell Labs and returned to the University as a professor, teaching popular courses for both computer-science majors and less tech-inclined students.
PAW Tracks is also available on iTunes — click here to subscribe
TRANSCRIPT:
If you’ve taken a computer science course in the last 35 years, you’ve probably encountered the work of Brian Kernighan, a 1969 Princeton Ph.D. grad and co-author of classic texts including The Elements of Programming Style, The C Programming Language, and The UNIX Programming Environment. Kernighan’s career at Bell Labs and at Princeton has spanned a remarkable period of change in the digital world, as he explained in a recent conversation with PAW.
I’m Brian Kernighan, graduate class of ’69 — star 69.
I was an undergraduate at the University of Toronto. I was there from 1960 to 1964, I guess. And at the time, I didn’t know very much about computers at all. I think I was a junior before I saw my first computer because this was a long time ago. But it seemed kind of interesting. Then I decided — and this I do not remember how — to go to graduate school, and not in Canada but in the United States, and wound up at Princeton because of several things: I had a good friend who was a year ahead of me at Princeton, enjoying graduate school here; Princeton’s offer for graduate support was much more generous than other schools that I had applied to; and also they promised — inaccurately — that they would get me out in three years. It took longer than that, but at least it worked out pretty well.
When I got here, of course, there was no computer science department. This was all part of electrical engineering. At the time, at least as I recall it, there was in fact exactly one computer on campus. It was a big IBM 7094, it sat in a big room, all by itself, on the second floor of the E-Quad, above where the cafeteria area is now, and you didn’t get time on that, it had operators. You would prepare your program on punch cards — this is really going back to the mists of time when dinosaurs still walked the area. You’d prepare your program on punch cards and you would hand it to an operator, and then sometime later you would get your result back. And it often was “oh, I forgot something, how could I be so stupid,” and I’d have to fix it up and repeat the cycle. There were systems that made this somewhat faster — fast turnarounds for small jobs — but for the most part, it was pretty slow, pretty delayed. And that was the situation for several years at least. There was really only that one computer that served the whole campus.
The second summer that I was here — this would be the summer of 1966 — I was very lucky and I got a job at MIT for the summer working on what was called Project MAC. This was their attempt to take their first time-sharing computer system — CTSS — and make the second system, Multics. And that was just a wonderful summer. I had an amazingly good time, met all kinds of really good people, and did really interesting work. And got a feeling — I think that was the first time when I realized how much fun this stuff could be, because unlike the punch cards that I mentioned a few moments ago, the system there was an interactive system. You sat with a keyboard at a strange device and you talked to a computer that was in a big room somewhere else, and it was responsive — instantly responsive. You pushed a key and something happened. And so it made program development far more interesting, and much more fun.
Then when I was looking for a summer job the next summer I, through good luck and the services of a friend, got a job at Bell Labs in Murray Hill, in New Jersey, just about an hour north of Princeton. And that again turned out to be an absolutely wonderful experience. Many of the people that I was working with there had been people who were working with the Multics operation at MIT. So I worked there, I had a great time, did I’m not sure I’d call it useful work but at least I did something, and then spent another summer there in ’68. And at that point, in collaboration with a friend, I came up with something that turned into my Ph.D. thesis, at the 11th hour.
I had such a good time at Bell Labs for those two summers that they offered me a job and I never even talked to anybody else. I just went, and spent 30 happy years there before I came to Princeton. I took a whole week off after finishing my degree and then started to work there.
There was a fairly strong connection between Princeton and people who were interested in technical things and Bell Labs because of geography and a preeminent university on one side and a preeminent research lab on the other side. That connection has been very useful all along. The work itself at Bell Labs was absolutely wonderful because I was there at exactly the right kind of time. This was the very early days of the UNIX operating system and all of the things that came from that, and I was in the group that did that. On the same corridor, I had these people who were changing the world. Now I don’t think at the time any of them, and certainly not me, realized that they were changing the world. But as it went on, we discovered yes, it was having a serious effect.
It was, for me, a really good place to be — lots of good people, interesting things to work on, and nobody telling you which one of those things you had to work on. You could sort of pick the targets of opportunity, explore them as much as you wanted, and then move on to the next one.
There were people creating these really interesting pieces of software — programming languages, tools, and so on — but none of them seemed to be interested in describing them in a way that anybody else could use them easily. So there was a niche that I found myself drifting into. I could write down descriptions of how to do something, how to use something, and it turned into, actually, quite a good way to do things. It was a better match for what I was good at. I was not going to be a blazing original contributor, the way a lot of these folks were, but for whatever reason I turned out to be an OK writer. And so, as they say, the rest is history.
I got pushed into it, I think, gently, originally and almost by accident by Dick Hamming, who was in a sense a mentor, mostly by example but occasionally by pushing. At some point, he suggested that we needed a book of style for programming. We have books of style on how to write English, but nothing on how to write programming. Although he had a totally different notion of it than I eventually came up with, that was kind of the impetus for the first book that I wrote, The Elements of Programming Style, which Phil Plauger ’65 and I did. That was successful enough, interesting enough, and fun enough that it led to the others.
We ripped off the style, as it were, from Strunk and White. The idea of here are some bad examples, and here’s how you do it better. And then can you draw a general lesson from that. So we did for programming languages — and not nearly as well — what Strunk and White had done for English. And definitely tried to emulate the brevity of their book. The first book that we wrote was quite small as well.
When AT&T split in 1995, I think it loosened a lot of the barnacles from the bottom of the boat. I spent a semester teaching at Harvard. After that, when Princeton suggested that maybe I’d like to spend time as a visitor at Princeton, I said sure. I did that for one year as a visitor, and then partway through that they said how would you like to come permanently? I thought about that for months — an absolute no-brainer, and it took me months to decide, “Yeah, this would be fun.” And so I did it, and I have not had a nanosecond of regret ever since. It’s just a wonderful experience, good fun. You hang out with all kinds of interesting people.
What I’ve managed to do is to split life into two components. In the spring I teach a course for computer science majors, mostly — an upper level course. It’s a project course. People go and build really interesting projects, and my role is to stand up at the front and say you have to do something, I don’t care what it is, and then they go and do it. It’s great. They come up with all kinds of neat ideas, and if you look at a variety of systems for dealing with the University, you’ll see things that have come out of that class.
And then in the fall, I teach a course that is for very non-technical students. The typical person in the class will be a history major, an English major, something like that. I try to explain why the stuff that I do on the computer science side is actually interesting and relevant to them in their lives, so that when they’re out running the country, they’ll do a better job than perhaps some of the incumbents.
Alternating between those two, and then spending summers somewhere else, has turned out to be a very nice way to operate. Each one sort of recharges me for the next one.
Brian Kernighan is the author of nine books, most recently D is for Digital: What a Well-Informed Person Should Know About Computers and Communications, which is drawn from his Princeton course “Computers in Our World.”
Paw in print
November 2024
Princetonians lead think tanks; the perfect football season of 1964; Nobel in physics.