1. 16
  1.  

  2. 8

    This reminds me that code is not literature. Reading code is fine, but people rarely read a whole codebase, top to bottom, in order to understand how everything is put together. Rather, it’s more like going out into the field and collecting specimens, like the The Royal Society of London for Improving Natural Knowledge. Ladies and gentlemen of high breeding adventuring into the wild, bringing back extraordinary and remarkable specimens of code as found in nature.

    1. 7

      I’d also recommend RE2: https://github.com/google/re2 — It’s probably more of interest if you want to know how a really fast regex engine is built. Russ Cox’s article series on regular expressions is great, but nothing beats taking a dive into the code. There are comments everywhere explaining neat optimizations. e.g., The “one pass” optimization is wicked cool, but only gets a passing mention in the articles.

      1. 3

        I enjoyed parts of Beautiful Code when I read it a while ago. It has mixed reviews. My review echos those mixed reviews.

        Most enjoyed chapters:

        • Chapter 1 A Regular Expression Matcher
        • Chapter 18 Python’s Dictionary Implementation: Being All Things to All People
        • Chapter 25 Syntactic Abstraction: The syntax-case Expander
        1. 3

          I highly recommend Simon Peyton Jones' chapter on concurrent programming using software transactional memory as well. It appears to be freely available online here: http://research.microsoft.com/pubs/74063/beautiful.pdf

        2. 3

          Wow, the backbone.js and underscore.js commentary is really good. I don’t even like javascript and I want to read them.