The Art of Programming

If ten years from now, when you are doing something quick and dirty, you suddenly visualize that I am looking over your shoulders and say to yourself: ‘Dijkstra would not have liked this’, well that would be enough immortality for me.

Edsger Dijkstra



The above quote is one of many from Edsger W. Dijkstra, a Dutch computer scientist and former professor at my university. It was prof. Dijkstra who introduced me to the Art of programming.


I don’t think that any of us students knew how famous he already was or, for that matter, that he had received the prestigious Turing Award in 1972. I remember him as a humorous and slightly cynical man. Even a bit arrogant perhaps, and definitely unreachable (always shielded by his assistant Wim Feijen).

Actually, the full name of the course he taught was:  “A Short Introduction to the Art of Programming” (the original lecture notes can be found here). By calling it “a short introduction”, he made it perfectly clear that, even in the unlikely case you would ever pass the exam with good result, you would still be a ‘noob’.

More important, though, was the deliberate use of the word Art. For him, elegance and control were keywords when writing an algorithm. He showed us that, almost by nature, elegant algorithms are not only easily verifiable, but often the shortest and most efficient solution to the problem as well.

My first attempt to pass the exam earned me a 3 (out of 10). That was actually quite good, because it meant: 1. Although not elegant, your algorithm works; 2. You proved that it works; 3. You did not use Go To statements (Dijkstra would kill you for that).

My second attempt earned me a 9! Such a high score was quite exceptional, because it meant something like: 1. Damn, your solution is even more elegant than mine (i.e. corrector Wim Feijen’s, definitely not Dijkstra’s); 2. I’m not going to grade it a 10 because that would only draw prof. Dijkstra’s attention. Guess it was one of my brighter days…

In hindsight, I now realize how much influence Edsger Dijkstra’s Short introduction to the Art of Programming actually had on me. Not only in the way I approach algorithmic problems, but even more so in the pleasure I get from finding elegant solutions. I don’t mind him looking over my shoulders now and then.