If you enjoy going through interesting code bases and learning some new tricks and patterns, you would probably enjoy "The Architecture of Open Source Applications" ([0]) - each chapter is a description about the history and architecture of a separate open source project. Whenever learning a new technology, I usually try to find a chapter in this series about it.<p>[0] - <a href="http://aosabook.org/en/index.html" rel="nofollow">http://aosabook.org/en/index.html</a>
one of my biggest issue with looking through codebases is, where do i start?<p>if i'm not familiar at all with the language, or more specifically how the language architectures the program, i'm just going to be spending a lot of time looking at stuff that probably isn't the meat and bones of the library/app.<p>take for example, his first suggest codebase, seastar. i haven't done c++ in years (school, using turbo borland) so where do i look? "apps" maybe? nope just seems to be a folder of libraries. ah, probably the core folder. whoops there are 20+ files/headers. should i dig into this assuming that's where most of the code for the app/library is?<p>i suppose it would probably be nice if there's a site that explains how most programming languages layout their code. e.g) javascript generally is laid out similarly now, as is ruby/rails. so a site to explain the general layout structure would be kinda cool. it's kinda late at night so maybe i'm overthinking this.
Redis is a code base I've been impressed with.<p>Short, readable functions and good comments make it quite easy to follow.<p>[1]: <a href="https://github.com/antirez/redis" rel="nofollow">https://github.com/antirez/redis</a>
I guess I'll be that guy and say that I highly doubt the author has taken more than a cursory glance at more than half his list. He certainly hasn't had the deep epiphanies he's implying from each of them.<p>Seriously, he expects people to believe he's evaluated the code of the Linux kernel, the Chrome browser, Postgres, LLVM, Tensorflow (just to name a few, less than half of his list), deeply enough to be able to make statements like "finest codebase in [x, y category] that I've seen", while also being the CTO of a company?
Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp<p><a href="https://norvig.com/paip.html" rel="nofollow">https://norvig.com/paip.html</a><p>Classic expert systems, but IMHO not outdated. I think they will make a comeback soon once we understand how to integrate probabilistic reasoning, logic and connectionist approaches.
There was some discussion on the very same for an Ask HN[0]. Copying my comment from there I've found the google/leveldb[1] source code to be immensely educational, authored by Jeff Dean and Sanjay Ghemawat. The implementation of leveldb is similar in spirit to the representation of a
single Bigtable tablet[2].<p>[0]: <a href="https://news.ycombinator.com/item?id=13854431" rel="nofollow">https://news.ycombinator.com/item?id=13854431</a><p>[1]: <a href="https://github.com/google/leveldb" rel="nofollow">https://github.com/google/leveldb</a><p>[2]: <a href="http://research.google.com/archive/bigtable.html" rel="nofollow">http://research.google.com/archive/bigtable.html</a>, section 5.3
Great achievement to have read so much code. Honestly, I felt a little depressing for not having read this much code.<p>As an aside, how do you read codebases? Do you read every single line to understand what's going on? Or you get general idea about design/architecture? What are the proven strategies to read code bases?
If you are interested in reading codebases but find some of the larger projects intimidating, I suggest checking out Timothy Davis' sparse matrix library CSparse:
(<a href="http://people.sc.fsu.edu/~jburkardt/c_src/csparse/csparse.html" rel="nofollow">http://people.sc.fsu.edu/~jburkardt/c_src/csparse/csparse.ht...</a>).<p>It is is used internally for sparse matrix representations in Python, R, and Matlab. The entire library fits into 2100 lines of concise yet well documented C code. It is now mostly installed bundled with SuiteSparse, but the link above has the 2006 codebase from the original stand alone library.
Back in high school and college I spent a lot of time reading code. I was on the Amiga, and remember reading Matt Dillon's stuff (a C compiler with library, the DME editor, and Dnet), Tim Budd's smalltalk, David Betz' "advsys" (which inspired me to read a book on parsing and automata), and other stuff that I've since forgotten.<p>These days, it's hard to find time between work and an absolute deluge of interesting stuff to study and play with.
Adding golang/go to the list. It's interesting to read how an actual language is implemented, also it's fairly well documented (most of the documentation is extracted from the codebase, so all the crucial bits have to be there).<p>There are a few parts of the codebase that were automatically transpiled from C, but the rest is usually very readable.
I've always found thefuck to be a great Python code base which is nicely organized and easy enough to wrap your head around. Also an easy project to contribute to.<p><a href="https://github.com/nvbn/thefuck" rel="nofollow">https://github.com/nvbn/thefuck</a>
The codebase I inherited and now maintain is "interesting" too, but more like this:<p><a href="https://en.wikipedia.org/wiki/May_you_live_in_interesting_times" rel="nofollow">https://en.wikipedia.org/wiki/May_you_live_in_interesting_ti...</a>
I always look to requests in how python should be used:<p><a href="https://github.com/requests/requests" rel="nofollow">https://github.com/requests/requests</a>