If you are fronted web developer then you should defenitely read jQuery sources. There is a lot of patterns that you could borrow and reuse in your own JS libraries.
I had to go look. I agree; there are some things done consistently in the code that are high on my nitpick "don't do that" list. Ugh. I'd have to reformat to work on it, then format to whatever standard they use on checkin, I think.
You're right, Nginx is great too. (I'm not familiar with the OpenBSD source, but it looks good.) I probably prefer Nginx to SQLite, but I think that's mostly personal preference -- I don't like excessive in-source documentation.
There is no single code or project that I could name. Not because there are no open source codes or projects that weren't worth reading, because there are thousands of them. I couldn't name any, because people are different, and what one finds good and worthy code, the other finds rubbish - thus, there can be no single project that would make every reader happy.
On the other hand, if you look at the question in a different way, you could say that the code (be it open source or not) every programmer must read before his end, is his own. As one looks at his life in one's deathbed, so should a programmer look at his code.
Quite the contrast with the Bourne Shell:
"Nobody really knows what the Bourne shell's grammar is. Even examination of the source code is little help."
– Tom Duff
http://en.wikipedia.org/wiki/Bourne_shell#Quotes
The Linux kernel. If you look at it really closely it isn't so pretty, but its massive size and overall complexity for me (as an undergraduate) was like looking into the grand canyon. What's more impressive is the speed at which things change and that despite breaking all of the traditional rules for "good" software design practices...it works amazingly well.
Plan 9 source code (http://plan9.bell-labs.com/plan9/), mostly for its historical value - created by the same team that made C and Unix - and for an insight on how those people envisioned the evolution of Unix.
Just to clarify, I'm not talking about event-driven programming, errbacks and callbacks, but rather how they've done all of the abstraction of the different protocols and subsystems. It's one of the few times where I've considered inheritance absolutely essential.
One of my university professors some years ago said the source of Rogue was one of the C program he read. I've never been able to find it, and I am curious since then. Does anyone?
When I downloaded mongrel2 I wanted to take a quick peak at superpoll beyond what was in the blog post about it, an hour later I was still reading the source. It is some of the best-written C I've seen.
A good place to start is this interactive code viewer: http://www.keyframesandcode.com/resources/javascript/deconst... There is also a great presentation by Paul Irish ("10 Things I Learned from the jQuery Source"): http://www.youtube.com/watch?v=i_qE1iAmjFg