Dennis Ritchie, Unix, and clarity

Last week’s obituaries of Dennis Ritchie focused, naturally, on his creation of C and his co-creation, with Ken Thompson, of Unix. I want to talk about something else: the remarkable clarity of the writing done by Ritchie and the other early Unix developers at Bell Labs.

The early Unix user’s manuals, both the man pages and the longer pieces, were written by the programmers themselves. You might think this a recipe for disaster; as a class, programmers aren’t known for their facility with English. But the early Unix developers weren’t ordinary programmers. They were researchers who thought deeply about how programs, languages, and operating systems ought to be organized, and they expected to write technical papers about their work.

Scholarly papers have a reputation for dullness, but good ones aren’t dull to people who know, or want to learn, the topic. If you have any interest in Unix, you should take a look at Dennis Ritchie’s old home page. Not only will you find links to wonderful old papers about C and Unix, you’ll get an immediate sense of the man behind them. Here’s the section he labels History:

For many years, I worked in the Computing Sciences Research Center of Bell Labs. On October 2005, a reorganization redistributed this group, and I’m now with the center called by the slightly ungainly name of Convergence, Software and Computer Science Laboratory (but still in the same office). This experience has been more varied than it might seem; here’s some of the history:

When I joined in 1967, Bell Labs was a corporation jointly owned by American Telephone and Telegraph Company and its subsidiary Western Electric. Its official name was Bell Telephone Laboratories, Incorporated.
Soon after, Ken Thompson, together with me and others, first started work on Unix. Also soon after, AT&T, which still owned most of the Bell System, updated its logo (I doubt the events were related). The new logo just updated the image; corporate structure remained the same. The material published by us during the period up to 1984 used this Bell logo and the name “Bell Laboratories.”
In 1984, AT&T, under a negotiated consent decree, divested the local telephone companies it had owned and in the process gave up the Bell logo and the Bell name except in connection with Bell Laboratories. Bell Telephone Laboratories Inc. was dissolved as a corporation and became an integrated unit of AT&T. We lost the Wehrmacht helmet and gained the Deathstar, and now identified ourselves as working at “AT&T Bell Laboratories.”
In 1996, AT&T (this time voluntarily) spun off its systems and technology organizations into Lucent Technologies, while AT&T kept the services business. Bell Labs stayed mostly with Lucent, though some of our colleagues helped form a new AT&T labs, much as some of us went to Bellcore in 1984. The new corporate logo usually includes the line “Bell Labs Innovations.”
Lucent and Alcatel merged as of Dec 1, 2006. Another new name and logo! and still the same office.

Bell Labs has remained a remarkably good place to do work that has enduring impact over the long run, no matter what the company, the courts, the PR types or upper management decide should be our name and logo on a given day or year.

Concise, factual, gently humorous. The same style you see in most of the old Unix stuff.

Ritchie’s most famous piece of writing is, of course, The C Programming Language, which he wrote with Brian Kernighan. K&R is basically a rewrite of Kernighan’s C tutorial, Ritchie’s C reference manual, and a paper with the same title written by Ritchie, Kernighan, Steve Johnson, and Mike Lesk for a 1978 issue of the Bell System Technical Journal that was all about Unix. Most C programming books could substitute as boat anchors; K&R is only half an inch thick but always seems to have the answer you’re looking for.

Bell System Journals

(These are my copies of the 1978 and 1984 special Unix issues of the Bell System Technical Journal. Why do I have them? I found them on the giveaway shelves at my local library. This isn’t as weird as it sounds. I live in Naperville, Illinois, home to one of the Bell Labs facilities. People often donate their old books to the library, and the library gives away those it can’t make use of. Someone from the Labs must have dropped these off when clearing out their own library shelves. I’ve scored a handful of Unix books this way.)

Kernighan (the K in AWK) was probably the best writer of the group. I am continually amazed at how he manages to get across complex ideas in so few words. My favorite passage in any piece of technical writing is in the user manual for eqn1 he wrote with Lorinda Cherry:

A word of warning about matrices—each column must have the same number of elements in it. The world will end if you get this wrong.

Alfred Aho (the A in AWK) cowrote the Dragon books on compiler design. Ken Thompson wrote “Reflections on Trusting Trust”, which says, in a very simple and understandable way, things about compilers that Aho would probably prefer to sweep under a rug.

The clarity of these guys’ writing is undoubtedly a reflection of the clarity of their thoughts—the same clarity that makes Unix such a pleasure to use. We Mac and Linux users are lucky to have had such brilliant forebears.

One more thing. If you’re a proponent of plain text files, you have another reason to appreciate Dennis Ritchie and the old Unix developers: they wrote a ton of tools for manipulating text. Both the tools they wrote directly—like troff, grep, awk, sed, sort, wc, tr, and so on—and the later tools they inspired—like Perl, Python, and Ruby—are the basis for all the Markdown/HTML/PDF transformations that are part of your daily workflow.

Update 10/18/11
The Ritchie family recently updated the DMR page at Bell Labs. The old content is still there, but they’ve added this:

Dennis died in early October, 2011. This is a note from his sister and brothers: As Dennis’s siblings, Lynn, John, and Bill Ritchie—on behalf of the entire Ritchie family—we wanted to convey to all of you how deeply moved, astonished, and appreciative we are of the loving tributes to Dennis that we have been reading. We can confirm what we keep hearing again and again:

Dennis was an unfailingly kind, sweet, unassuming, and generous brother—and of course a complete geek. He had a hilariously dry sense of humor, and a keen appreciation for life’s absurdities—though his world view was entirely devoid of cynicism or mean-spiritedness.

We are terribly sad to have lost him, but touched beyond words to realize what a mark he made on the world, and how well his gentle personality—beyond his accomplishments—seems to be understood.

Lynn, John, and Bill Ritchie

  1. That’s a link to a PostScript file; I couldn’t find a PDF version that wasn’t embedded in a much larger document. It renders directly in Safari, but will probably initiate a download in other browsers. 

18 Responses to “Dennis Ritchie, Unix, and clarity”

  1. Allen MacKenzie says:

    Beautiful post. This stuff is important. I tell my students that if you can’t write it clearly, then you probably don’t understand it. (They don’t believe me, of course.)

  2. Jennifer says:

    I read an early version of the source code of Unix (1980) which my university in West-Berlin had obtained. The best code I’ve ever seen. Even the backdoor they left (intentionally?) in there was smart :-)

  3. Ralph Corderoy says:

    Good to see this particular aspect being given recognition. IIRC, Dennis said in an interview the K&R’s prose was mostly Brian Kernighan’s work with Ritchie concentrating on the terse specification in the appendix. dmr’s own writing is still a model of clarity though, as you say.

  4. Dave Schmitt says:

    I worked at Bell Telephone Labs (BTL) from 1965-69 and again from 1973-83 and was proud to play a part in the transition from assembly language to C throughout the Labs. At one point in the early 1980’s a company started selling a C compiler that appeared to be a thinly disguised adaptation of Dennis’s copyrighted C source code. Since BTL’s primary output was patents and copyrights, it was important to prove or disprove that this vendor was in violation. Management formed a task force of C compiler experts, including Dennis and me. The task force was based in Chicago, where I worked, and it took Dennis a couple of days to clear his calendar and get there from his office in NJ. Meanwhile, the task force floundered around trying to figure out how to prove that the vendor was using our source code when we were not allowed to see the vendor’s source. To conduct our study, we had purchased a copy of the product and confirmed that it behaved just like a C compiler, which was no surprise. But we were stumped about the next step, when Dennis arrived and immediately cut the Gordian Knot. He said that since he wrote the BTL C compiler, he was intimately familiar with its quirks and bugs. Rather than test if the vendor’s product had all the features of our compiler, he suggested testing if it had all the bugs. Within a few hours Dennis confirmed that it did, and by the end of the week we had written a report which eventually led to a settlement with the vendor. That’s my best memory of Dennis Ritchie — a man who saw simple and elegant solutions to complex and gnarly problems.

  5. Dr. Drang says:

    Thanks for the story, Dave. A better tribute than my post.

  6. Dr. Drang says:

    For those of you unfamiliar with Ralph (comment 3), he’s the proprietor of, a nice resource for groff/troff users. Back when I was a heavy groff user, was one of my go-to sites. Ralph was also big on the groff mailing list; he’s one of the people that make the internet useful.

  7. Robert L Hamilton, Engineer says:

    A very interesting story. I was at Bell Labs in the early 1960’s — not involved with the Computer stuff but I did have a friend who was working in that department. The story about the name ‘C’: It was called B but when they went to register the name with Western Electric they were told ‘B’ was taken: a ‘B-Wire Connector’ was in production. They asked about ‘C’ and was told they could use it.

  8. Dr. Drang says:

    There actually was a B language, written by Ken Thompson. Ritchie discusses it in his history of C, where he describes it as “BCPL [an earlier language] squeezed into 8K bytes of memory and filtered through Thompson’s brain.”

  9. Chris says:

    Good article, thanks. That link to his website is either temprarily down or defunct, BTW.

  10. Dr. Drang says:

    Ritchie’s Bell Labs page may have been down as his family updated it with the note I quoted at the bottom of the post.

  11. Jonathan Shulman says:

    I cannot help but notice the vast contrast with which the world has responded to the recent passing of two icons in the IT industry. Without men like Dennis there would be no Linux for Steve to decorate. Billions do not know your work Dennis, but they use it every day. Those who know salute you.

  12. Rafael says:

    “Unix is simple. It just takes a genius to understand its simplicity.” – Dennis Ritchie

    As a developer, I am very thankful to Ritchie for making my life easier with the tools he built. He brought the art of development to a new level, and every developer owe him something.

  13. Bryan Lee says:

    Thanks for posting this. It’s sad that I never got to know the man until he died… I’m mainly a C++ programmer and all I heard and knew before his death was Bjarne Stroustrup. Dennis truly deserves the recognition for all the work he had put in. Without C, there won’t be C++. Truth be told, I have always liked the simplicity and elegance of C functions despite its flaws.

  14. Mike Kohli says:

    Great post, maybe I’m just a geek, but my copy of the Bell Systems Technical Journal, July- August 1978 Vol. 57, No. 6, Part 2, has always been one of my best finds in my technical library. Thanks for confirming it.

  15. Winston Beech says:

    It’s a pity that IBM and Bill Gates didn’t smell the coffee when the PC-AT was introduced almost 30 years ago. That machine was capable of running Unix but instead the marketers stuck with the quadriplegic MS-DOS. The power of marketing - and perhaps IBM’s belief that it was all just a fad - stuck us with a toy operating system that still lurks in the bowels of even the latest bloated version of windows. I thought all PCs were unreliable junk until 1987 when I first installed Xenix on one. I made my living largely in the Unix world for the next 15 years. Dennis did more for me than any of the better known billionaires. RIP.

  16. Bill Cheswick says:

    Another name that belongs here is Doug McIlroy. He was the Department Head for this group. Pipes were his idea. He was also a meticulous writer. I remember his edits of man pages: reducing two sentences to one, clearer one. Every sentence had to count. and long man pages an anathema. (If it takes that much explanation, write a paper.)

    By many accounts, Doug was the smartest guy in the group. Unix an C owe a lot to his quiet leadership.

    Last I heard, Doug is an adjunct professor at Dartmouth.

  17. Dr. Drang says:

    I was going to put a paragraph about Doug McIlroy (and pipes) in the post, but I couldn’t find a good accessible example of his writing. The best McIlroy story I know is in Don Knuth’s Literate Programming book.

    Knuth was given a challenge by Jon Bentley (of Programming Pearls fame) to write a program that read a text file and printed out the top n words in the file according to frequency. Knuth wrote a longish program in (I think) WEB that worked but was kind of complicated. McIlroy saw Knuth’s program and rewrote it as a very short shell script that simply piped together 5-6 tr, sort, and uniq commands. A brilliant solution, but unfortunately my searches for a link to McIlroy’s description of his script came up empty.

    I should also mention that Bill Cheswick is also considered by most to be a pretty bright guy and is no stranger to writing.

  18. John C.E. D'Alton says:

    Dear people, Monday 24 Oct 2011.

    I don’t think I ever heard of Dennis Ritchie, I’m 75 so I may have forgotten. My closest to UNIX I get is I run LINUX. Great men and women of the word such as Dennis are never recognised at the time, sad. RIP.

    God bless.