Many great computer scientists and educators have observed that while we teach students to write code, we don’t teach them to read it [1]. When you think about it, it’s ridiculous: architects study hundreds of buildings before designing one of their own, novelist probably read thousands of books before trying to create their own masterpiece [2], and only mathematicians can count how many proofs they go through in detail during their training, so why don’t programmers study great programs to improve their craft?

One of the few people who’s actually done something about this is Diomidis Spinellis. His two books Code Reading and Code Quality are respectively an explanation of how to read large C/C++ programs meant to build and run on Unix, and how to tell good code from bad code. Both are worth reading, as is his blog.  Just last week, for example, he described how he tracked down a bug in a regular expression library. I tried to do something last year when I recorded myself reading through a medium-sized piece of Python. I’d be very interested in pointers to similar material, i.e., to examples of people reading and reviewing code in public.

[1] I’ll award 5 millimarks each to the first three people to find quotes online to back this up.

[2] Though in Dan Brown’s case, it doesn’t appear to have helped.