Uses This

1278 interviews since 2009

A picture of Brian Kernighan

Brian Kernighan

Computer scientist (Unix), writer

in developer, mac, teacher, writer

Who are you, and what do you do?

I'm Brian Kernighan. I spent 30-plus years at Bell Labs in the group that produced Unix, C, C++ and other odds and ends of useful software. While there I wrote a few books with some super co-authors. Since 2000, I've been teaching in the computer science department at Princeton University. If you're going to have a second childhood, a good university is a great place to have it. I manage to get some writing done here too, most recently a text for non-CS types called D is for Digital. This is based on a course that I usually teach in the fall; in the spring, I teach an upper-level programming / software engineering course.

What hardware do you use?

Mostly Macs at this point. I have a 27-inch iMac at work (big screen) but with the tiny wireless keyboard; I long ago got tired of keyboards that, with wheels, could double as skateboards, so it's nice to have a little one made by a reliable manufacturer. At home I have several elderly 13 or 15 inch MacBook Pros, and an 11 inch Air. That's the computer I carry when I need to carry one. I took it around Europe for much of last summer, and now I carry it back and forth between work and home, and hardly notice its presence. Would that all computers were as small and light.

I have an old Lenovo Thinkpad with XP but never take it anywhere, though for some things it's actually way faster than newer computers. And there's a non-trivial pile of dead Windows laptops that I keep thinking about refurbishing as Linux boxes, but I never get around to it and probably never will.

A couple of Kindles for my wife; I don't care to read on them, so they're not much used. An iPad, unused. A 7 inch Android tablet, ditto. Several cell phones, none turned on; the one that I actually use (about once a month) is a Samsung feature phone from 5 or 6 years ago. It's odd that "feature" means "doesn't have any features", except that it can make phone calls.

And what software?

The Macs are almost exclusively used as terminals to the Linux servers provided by the CS department. Of course I run Firefox and Chrome locally, and I use Word, Excel and Powerpoint for the obvious tasks, because in spite of minor annoyances, they work and are compatible with what everyone else uses.

As the last representative of the dinosaur era, I read mail mostly with Alpine, which is faster and easier than any web-based system I know, and does a nice job of storing my mail locally. It also keeps me pretty much immune to HTML-based attacks and irritants.

I use Rob Pike's Sam editor most of the time -- that's what I'm using right now -- and vi the rest of the time, because I know it well enough that there's no need to think. Every once in a while I try emacs but have never gotten fluent enough to make it worth switching.

I don't write as much code as I would like, and much of it is short examples for teaching; that means breadth over depth -- lots of small programs in lots of languages -- and often they are little more than sleazy hacks just to get something working. I write really short things in Awk, and use Python for longer text processing applications. Some day I ought to learn [long list of languages] better.

What would be your dream setup?

I'm so tired of wires running all over the place and little add-on gadgets that clutter the environment. Every day I have to be sure I've packed the charger for my otherwise lovely Air, and have remembered to take the VGA adapter so I can use it in class. Every room in the house that has a computer also has some kind of charger, and of course that's different from the chargers for phones. All of them have incompatible connectors. Printers need cables; scanners need cables and adapters. And don't get me started on the rat's nest of cables for the TV. One could dream of not having to put up with any of this, but it's likely to stay just a dream.