The two best ways of learning how to program are writing code and reading (good) code. I read a lot of code in my younger days, and I think it helped me. Programming courses give students plenty of practice in writing code. I wonder how many give students an opportunity to read good code. There should be a course in which all the students read and discuss a large program, like a literature class.
One problem with that idea is a lack of good code to read. Knuth’s TeX and Metafont books are good reading. But to really understand them you have to first wrap your head around TeX itself, which is a rather complicated macro processor. In some ways the code for TeX is easier to understand than TeX itself. Also, the code is in the Web version of Pascal, not a popular language today. The Lions book and TCP/IP Illustrated, Volume 2, show good coding, and are at least written in C, though again the code is rather old by today’s standards.
Are there any modern code bases that are helpful to read? It would be best if there were some commentary, or at least really excellent comments.
Leave a Reply
You must be logged in to post a comment.