Thursday, October 13, 2011

RIP Dennis Ritchie

Sublime. There is no better word that can be used to describe the C programming language and the Unix operating system, which were co-created by Dennis M. Ritchie (dmr), who passed away earlier this week. C and Unix are sublime.

The way computers work today is because that is how Dennis Ritchie (and cohorts) decreed they should run. This is known as the Unix operating system, which all modern operating systems are based on, either directly or indirectly. We take for granted things like “files” on our computers, but that’s not how most computers organized data prior to Dennis Ritchie. It’s not just your computer, but your mobile phone, your TV, and even your car, that work the way that Ritchie (et al) designed.

In additional to Unix, Ritchie is also responsible for the C programming language (Unix was written using C). Most modern languages, from JavaScript to to PHP to Lua are based partly on the C programming language.

But C is more than just a programming language. It is a sublime expression of computing.

In the beginning, C was designed to be a “portable” low-level language. Until C, low-level code was written in machine language. Sure, database applications might be written in high-level languages like COBOL, but such languages were inappropriate for low-level code, like that found in operating systems. C was designed specifically to be a common low-level language that worked on many different machines at the time. This allowed Unix, which was written in C, to become a universal operating system that worked on many types of machines. In the modern world, Unix runs your iPhone and super computers.

But a strange thing happened after C: all new machine processors designed after that point were designed specifically to run C.

Take your iPhone, for example. It runs a processor type called “ARM”. The ARM processor was designed from the ground up to run C code efficiently, specifically in the way it handles the stack and conditional expressions. Or take the x86 processor family from Intel. Over the years, as the processor has grown from 16-bit to 32-bit to 64-bit; the blueprint has always been how it can run C code efficiently. Even though the x86 and ARM cannot run each other’s machine language, they both can be programmed in C, and both run C efficiently.

I’m a long-time C programmer. I learned C as a child, and it took me a decade of programming to appreciate the sublime nature of C. It would be fair to say that it was Dennis Ritchie (and cohorts) that taught me how to program. By studying their decisions in creating the language, I learned how such a language should be used. I still have my original dog-eared copy of K&R’s book on the C programming language. Like any good book, I have read and re-read it multiple times.

In the late 1990s, I started my own company, selling a high-performance network monitoring system for preventing hacker attacks. By weaving C code in just a certain way, I was able to achieve 10 times the network speeds of my nearest competitor. I could achieve the improbable because I could see the sublime nature of C. This caused my competitor to buy out my company, replacing their product with my own. This has made me very rich. And I owe this to Dennis Ritchie (and his codesigners).

Dennis Ritchie wasn’t solely responsible for Unix and C. There were many others involved, notable Brian Kernighan and Ken Thompson. It was these guys who were the heros of my youth, not baseball players or musicians or politicians. It was these guys who inspired me to become the person I am today.
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Thanks dmr.\n");
}