Dennis Ritchie
 
Support Ukraine

Dennis Ritchie

Few people knew his name, and he never became a superstar outside of his own little circle, but Dennis Ritchie[a] helped shape the digital world.

With Ken Thompson[b] and others he created UNIX[c], the first portable operating system. Originally it was the system of choice for servers and high-end workstations, but through its clones UNIX has ended up on every Android phone, every iPod, iPhone and iAnything. We live in a UNIX-powered world.

My first contact with UNIX was at university, the Royal Institute of Technology, when I came into contact with their Solaris workstations. Later I would run into another UNIX, Red Hat Linux, based on a UNIX clone written by a Finn that didn't know what he was getting into - Linus Torvalds. I type this on an iPod touch, and If you read this on monochrome.sutic.nu, then it is being served up by a server running a UNIX operating system.

How could UNIX spread so widely? Fans will undoubtedly point to some sort of inherent superiority of the architecture, but there are enough warts in it to make that explanation on its own incredible at best. The explanation I would like to advance has three points:

  • It was small and simple enough that a single person could implement it. Perhaps not an efficient enough implementation to be practically useful, but it could be done. In contrast, MULTICS[d], the operating system UNIX was intended as a counterpoint to, never went that far despite many good and revolutionary ideas.

  • It was opened for study. One can get the full, annotated source code in Lions book[e][1][2][3]. While this was originally only for academic use and then further restricted, try that with any other operating system of that age - or any non UNIX-based operating system of today.

  • It was built to be portable. Operating systems used to be tightly bound to the hardware they controlled and were bundled with. UNIX was not. This made the target market for UNIX huge.

In order to achieve this, Ritchie had to have a programming language that was clear, concise and portable among system architectures, yet allowed enough bit-twiddling and bare-metal access to make the resulting system viable. Something he also created.

The C programming language[i] was conceived as a system programming language, that is, something to write operating systems in, but it turned out to be useful outside of its original niche and ended up being used for everything from embedded systems programming to applications.

My first contact with C was in the form of two books: "Programming Windows 3.1"[j] by Charles Petzold[k], a book about writing software for Microsoft Windows. I was doing all my programming in Turbo Pascal for Windows, but Pascal and C are close enough relatives that code could be used with only minor modifications. Beyond the purely syntactic, I only remember one modification, and that was the use of the AHIncr function's memory offset to step through memory segments. The second book was "Flights of Fantasy"[l] by Christopher Lampton[m]. After Turbo Pascal, I switched to C++ (a derivative of C) with Borland C++.

Today I do most of my coding in Java, but for the times when you need to really make the machine do precisely what you want with little to no overhead, C is it.

Why was C so successful? I'd say that the reasons are very much the same as for UNIX. C is a small language with few constructs. It is easy to write a half-assed compiler for it. That half-assed compiler can then be used to compile the source for a whole-assed C compiler and so bootstrap the toolchain for a system. It was made for tinkerers. If you know what you're doing, C will let you do it - at your own risk. This was my reason for switching to C++ from Pascal. I was fed up with having to fight the well-meaning limitations built into Pascal. Finally, it was, by design, portable. If you could code in C, you could get a program to run on any system.

Thank you, Dennis Ritchie, for this and everything else. Not only were you brilliant, both in terms of inception and product delivery, you had the guts to set your creations free so that they could be our creations.

Thank you.

Cattle die, kindred die,
Every man is mortal:
But the good name never dies
Of one who has done well.

Havamal 76[n]

Footnotes

2011-11-08, updated 2014-03-01