Nobody's just reading your code
Peter Seibel, the author of the <i>Coders at Work</i> book mentioned in the post, actually discussed this in a blog post: <a href="http:&#x2F;&#x2F;www.gigamonkeys.com&#x2F;code-reading&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.gigamonkeys.com&#x2F;code-reading&#x2F;</a><p>It&#x27;s not quite true that <i>none</i> of the programmers interviewed in the book routinely read code for fun. In his blog post, Seibel mentions the exceptions:<p>&gt; First, when I did my book of interviews with programmers, Coders at Work, I asked pretty much everyone about code reading. And while most of them said it was important and that programmers should do it more, when I asked them about what code they had read recently, very few of them had any great answers. Some of them had done some serious code reading as young hackers but almost no one seemed to have a regular habit of reading code. Knuth, the great synthesizer of computer science, does seem to read a lot of code and Brad Fitzpatrick was able to talk about several pieces of open source code that he had read just for the heck of it. But they were the exceptions.<p>The Knuth exception is notable: he <i>does</i> routinely read code for fun. In the book he mentions things like<p>&gt; I’ve got lots of collections of source code. I have compilers, the Digitek compilers from the 1960s were written in a very interesting way. They had their own language and they used identifiers that were 30 characters long but very descriptive, and their compilers ran circles around the competition at the time—this company made the state-of-the-art compilers of 1963 or ’64. And I’ve got Dijkstra’s source code for the THE operating system. […]  I collected it because I’m sure it would be interesting to read if I had time. One time I broke my arm—fell off a bike—and I had a month where I couldn’t do anything much, so I read source code that I had heard had some clever ideas in it that hadn’t been documented. I think those were all extremely important experiences for me.<p>And then a passage quoted in the post about how he reads code, with a Fortran compiler as example (not repeating here it&#x27;s in Seibel&#x27;s blog post: <a href="http:&#x2F;&#x2F;www.gigamonkeys.com&#x2F;code-reading&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.gigamonkeys.com&#x2F;code-reading&#x2F;</a> ), after which the interview (and the book) ends with Knuth saying:<p>&gt; don’t only read the people who code like you.<p>(The examples in the book of people who last seriously read code years ago also interesting, e.g. Douglas Crockford mentions some programs he read, and there are multiple pages in the book about Guy L. Steele reading the TeX program.)<p>Anyway, back to Knuth: I think that, the way he reads and digests code (or even papers: <a href="http:&#x2F;&#x2F;blog.computationalcomplexity.org&#x2F;2011&#x2F;10&#x2F;john-mccarthy-1927-2011.html?showComment=1319546990817#c6154784930906980717" rel="nofollow">http:&#x2F;&#x2F;blog.computationalcomplexity.org&#x2F;2011&#x2F;10&#x2F;john-mccarth...</a>), it addresses a lot of the points the linked post makes. Even when “just reading” code, or anything for that matter, you <i>are</i> supposed to be doing the things the post mentions in “hacking versus passive reading”: active exploration, critical examination, synthesis.<p>For example, Knuth read the code of ADVENT (aka <i>Colossal Cave Adventure</i>), and loved the code (not just the game itself) so much that he rewrote it to share with others to read, in his own preferred literate-programming (CWEB) style that matches the way he thinks (<a href="http:&#x2F;&#x2F;www.literateprogramming.com&#x2F;adventure.pdf" rel="nofollow">http:&#x2F;&#x2F;www.literateprogramming.com&#x2F;adventure.pdf</a>). This definitely doesn&#x27;t sound like “passive reading” to me.<p>Nevertheless, great post.