Hacker News new | past | comments | ask | show | jobs | submit login

Not quite a direct answer, but book(s) missing from op is:

http://aosabook.org/en/index.html

("Architecture of open source applications") and siblings.

I'd say reading the section on "git" there, and then having a look at the git source - or "nginx" and looking at the source - etc - might be one place to start.

Other than that, off the top of my head (suggestions from a hobbist): sqlite, the samba lightning db lmdb, the new openbsd daemons like httpd, opensmtpd, and the NaCl crypto library.

Hopefully more battle-hardened c-programmers can comment/add to the list.

[ed: and seeing rsync mentioned below, I recalled spiped along with a handful of other utilities by Colin Percival (former FreeBSD Security Officer, founder of tarsnap and active hn-er) http://www.tarsnap.com/spiped.html ]




If you're going to try to learn C by looking at any of my code, I highly recommend that you pick spiped for that purpose. Tarsnap is built around libarchive, which is good code but much bigger and less coherently organized; scrypt and kivaloo sacrifice clarity for performance in many places.

But spiped is just 6500 lines of code, of which 4300 is segregated library code; a novice C programmer should be able to start by treating those as black boxes and read through the rest of the code to get a clear sense of how the entire program works -- something which is almost impossible for a program as large as even OpenBSD's minimalist httpd.

And reading spiped will expose you to a lot of the concepts which experienced C developers take for granted -- non-blocking network I/O and callbacks, threads, "extending" the language by creating more sophisticated data structures, workarounds for non-POSIX platforms, etc.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: