Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

October 30 2011

On Dennis Ritchie: A conversation with Brian Kernighan

The phrase "Kernighan and Ritchie" has entered computing jargon independently of the lexical tokens from which it is constituted. I talked on Friday with Brian Kernighan about Dennis Ritchie, who sadly passed away two weeks ago at the age of 70. Brian had gotten to know me a bit when he contributed a chapter on regular expressions to the O'Reilly book Beautiful Code. He said, "It's just remarkable how much we all still depend on things Dennis created." Kernighan went on to say that Ritchie was not self-promotional, but just quietly went about doing the work he saw needed to be done.

Plenty of ink has been devoted over the past 40 years to the impacts of the C language and of the Unix operating system, both of which sprang to a great extent from Ritchie's work, and more ink on the key principles they raised that have enabled key advances in computing: portability, encapsulation, many small programs cooperating through pipelining, a preference for representing data in text format, and so on. So I did not concentrate on these hoary, familiar insights, but talked to Kernighan about a few other aspects of Ritchie's work.

More than bits of C remain

It's noteworthy that Android added C support through the Native Development Kit. They needed the support in order to offer 3D graphics through the OpenGL libraries, which were written in C, but the NDK has proven very popular with developers who embellish their applications with device-specific code that has to be written in C.

Apple's Cocoa and iOS have an easier time with C support, because their Objective-C code can directly call C functions. The "C family" that includes Objective-C and C++ is obviously thriving, but plain old C is still a key language too. Kernighan freely admits, "A lot of things are done better in other languages," but C is still queen for its "efficiency and expressiveness" at low-level computing.

Ritchie created C with hardware in mind, and with the goal of making access to this hardware as efficient as possible while preserving the readability and portability that assembly language lacks. So it's not surprising that C is still used for embedded systems and other code that refers to hardware ports or specific memory locations. But C has also proven a darn good fit for any code requiring bit-level operations. Finally, it is still first choice for blazingly fast applications, which is why every modern scripting language has some kind of C gateway and why programmers still "drop down to C" for some operations. And of course, if you use a function such printf or cos from your favorite scripting language, you are most likely standing on the shoulders of the people who wrote those C library functions.

Kernighan told me that Ritchie was always conscious of the benefits of using minimal resources. Much of what he did was a reaction against the systems he was working with when creating Unix with Ken Thompson (a reaction to the Multics operating system) and C (a reaction to the PL/1 language that Multics was based on). EPL, Bliss, and especially BCPL were more positive influences on C. The things that made C successful not only inspired languages and systems that followed, but kept C a serious contender even after they were developed.

After Unix, Ritchie worked a great deal on Rob Pike's Plan 9 system. Not only did Ritchie use it exclusively, but he contributed to the code and helped manage the project at Bell Labs.


The computing environment of the 1970s was unbelievably limited by modern standards. Kernighan said that Ritchie and Thompson had to design Unix to run in 24,000 bytes. And similar constraints existed in everything: disk space, bandwidth (when networks were invented!), and even I/O devices. The infamous terseness of Unix commands and output were predicated on their use at printers, and helped to save paper.

But that was OK back then. You could make do with a fourteen-character limit on filenames, because programs were divided into relatively few files and you might have to manage only a few hundred files in your own work. You'd never need to run more than 32,768 processes or listen on more than 1024 incoming connections on your system. The Unix definition of time soon proved to be more problematic, both because some Unix programs may last beyond 2038 and because a granularity of less than a second is often important.

But Kernighan points out that keeping things within the limits of a word (16 bits on the PDP-11 that Ritchie wrote for) had additional benefits by reducing complexity and hence the chance for error. If you want to accommodate huge numbers of files within a directory, you have to create a complex addressing system for files. And because the complex system is costly, you need to keep the old, simple system with it and create a series of levels that can be climbed as the user adds more files to the directory. All this makes it harder to program a system that is bug-free, not to mention lean and fast.

The joys of pure computer science

Kernighan's and Ritchie's seminal work came in the 1970s, when Kernighan said the computer field still presented "low-hanging fruit." Partly because they and their cohorts did so well, we don't have much more to do in the basic computer development that underlies the ever-changing cornucopia of protocols and applications that are the current focus of programmers. New algorithms will continue to develop, particularly thanks to the growth of multiprocessing and especially heterogeneous processors. New operating system constructs will be needed in those environments too. But most of the field has moved away from basic computer science toward various applications that deal directly with real-world activities.

We know there are more Dennis Ritchies out there, but they won't be working heavily in the areas that Ritchie worked in. To a large extent, he completed what he started, and inspired many others of his own generation.

October 29 2011

Dennis Ritchie's legacy of elegantly useful tools

On Sunday, 10/30 we're celebrating Dennis Ritchie Day. Help spread the word: #DennisRitchieDay

Shortly after Dennis Ritchie died, J.D. Long (@cmastication) tweeted perhaps the perfect comment on Ritchie's life: "Dennis Ritchie was the architect whose chapel ceiling Steve Jobs painted." There aren't many who remember the simplicity and the elegance of the Unix system that Jobs made beautiful, and even fewer who remember the complexity and sheer awfulness of what went before: the world of IBM's S/360 mainframes, JCL, and DEC's RSX-11.

Much of what was important about the history of Unix is still in OS X, but under the surface. It would have been almost inconceivable for Apple to switch from the PowerPC architecture to the Intel architecture if Unix wasn't written in C (and its successors), and wasn't designed to be portable to multiple hardware platforms. Unix was the first operating system designed for portability. Portability isn't noticeable to the consumer, but it was crucial to Apple's long-term strategy.

OS X applications have become all-consuming things: you can easily pop from email to iTunes to Preview and back again. It's easy to forget one key component of the original Unix philosophy: simple tools that did one thing, did it well, and could be connected to each other with pipes (Doug McIlroy's invention). But simple tools that date back to the earliest days of Unix still live on, and are still elegantly useful.

Dennis Ritchie once said "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." It's true. And we need more geniuses who share his spirit.


Sponsored post

October 28 2011

Top Stories: October 24-28, 2011

Here's a look at the top stories published across O'Reilly sites this week.

Dennis Ritchie Day: October 30, 2011
Tim O'Reilly: "I don't have the convening power of a governor, but for those of us around the world who care, I hereby declare this Sunday, October 30 to be Dennis Ritchie Day."

You say you want a revolution? It's called post-PC computing
Spurred on by a Googler's rant against his own company and Apple's release of a new phone, a new OS and a new cloud infrastructure, Mark Sigal wonders what the "post-PC" revolution really looks like.

We're in the midst of a restructuring of the publishing universe (don't panic)
Hugh McGuire, co-author of "Book: A Futurist's Manifesto," explains why publishing's digital transformation goes way beyond format shifts. He also reveals nine ways the publishing industry will change over the next five years.

"Revolution in the Valley," revisited
With "Revolution in the Valley" making its paperback debut and the work of Steve Jobs fresh in people's minds, we checked in with Andy Hertzfeld to discuss the legacy of the first Macintosh.

What to watch for in mobile web apps
Sencha's James Pearce discusses the most promising mobile web app technologies and explains why device APIs could make the web a lot more interesting.

Velocity Europe, being held November 8-9 in Berlin, brings together performance and site reliability experts who share the unique experiences that can only be gained by operating at scale. Save 20% on registration with the code RADAR20.

October 26 2011

Dennis Ritchie Day

Dennis RitchieSunday, October 16 was declared Steve Jobs Day by California's Governor Brown. I admire Brown for taking a step to recognize Jobs' extraordinary contributions, but I couldn't help be struck by Rob Pike's comments on the death of Dennis Ritchie a few weeks after Steve Jobs. Pike wrote:

I was warmly surprised to see how many people responded to my Google+ post about Dennis Ritchie's untimely passing. His influence on the technical community was vast, and it's gratifying to see it recognized. When Steve Jobs died there was a wide lament — and well-deserved it was — but it's worth noting that the resurgence of Apple depended a great deal on Dennis' work with C and Unix.

The C programming language is quite old now, but still active and still very much in use. The Unix and Linux (and Mac OS X and I think even Windows) kernels are all C programs. The web browsers and major web servers are all in C or C++, and almost all of the rest of the Internet ecosystem is in C or a C-derived language (C++, Java), or a language whose implementation is in C or a C-derived language (Python, Ruby, etc.). C is also a common implementation language for network firmware. And on and on.

And that's just C.

Dennis was also half of the team that created Unix (the other half being Ken Thompson), which in some form or other (I include Linux) runs all the machines at Google's data centers and probably at most other server farms. Most web servers run above Unix kernels; most non-Microsoft web browsers run above Unix kernels in some form, even in many phones.

And speaking of phones, the software that runs the phone network is largely written in C.

But wait, there's more.

In the late 1970s, Dennis joined with Steve Johnson to port Unix to the Interdata. From this remove it's hard to see how radical the idea of a portable operating system was; back then OSes were mostly written in assembly language and were tightly coupled, both technically and by marketing, to specific computer brands. Unix, in the unusual (although not unique) position of being written in a "high-level language," could be made to run on a machine other than the PDP-11. Dennis and Steve seized the opportunity, and by the early 1980s, Unix had been ported by the not-yet-so-called open source community to essentially every mini-computer out there. That meant that if I wrote my program in C, it could run on almost every mini-computer out there. All of a sudden, the coupling between hardware and operating system was broken. Unix was the great equalizer, the driving force of the Nerd Spring that liberated programming from the grip of hardware manufacturers.

The hardware didn't matter any more, since it all ran Unix. And since it didn't matter, hardware fought with other hardware for dominance; the software was a given. Windows obviously played a role in the rise of the x86, but the Unix folks just capitalized on that. Cheap hardware meant cheap Unix installations; we all won. All that network development that started in the mid-80s happened on Unix, because that was the environment where the stuff that really mattered was done. If Unix hadn't been ported to the Interdata, the Internet, if it even existed, would be a very different place today.

I read in an obituary of Steve Jobs that Tim Berners-Lee did the first WWW development on a NeXT box, created by Jobs' company at the time. Well, you know what operating system ran on NeXT's, and what language.

For myself, I can attest that there would be no O'Reilly Media without Ritchie's work. It was Unix that created the fertile ground for our early publishing activities; it was Unix's culture of collaborative development and architecture of participation that was the deepest tap root of what became the open source software movement, and not coincidentally, much of the architecture of the Internet as well. These are the technologies I built my business around. Anyone who has built their software or business with knowledge from O'Reilly books or conferences can trace their heritage back to Ritchie and his compatriots.

I don't have the convening power of a Governor Brown, but for those of us around the world who care, I hereby declare this Sunday, October 30 to be Dennis Ritchie Day! Let's remember the contributions of this computing pioneer.

P.S. Help spread the word. Use the hashtag #DennisRitchieDay on Twitter and Google+

Photo: Via Wikimedia Commons.

Reposted byurfin urfin
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.
No Soup for you

Don't be the product, buy the product!

YES, I want to SOUP ●UP for ...