Ask HN: What is a good “My First Reader” for source code?

10 points by isolier ↗ HN
I am a hobbyist programmer; I have programmed a few very simple 2d games, a 3D texture mapped terrain renderer, and some other small utilities all in C for a bit of context. I am looking for some good, and frankly easy, very small projects to read for an idea how "real programmers" engineer software and to simply learn. I am not all that interested in fancy, tricky algorithms or anything, just coherent and well engineered (and easy to digest) software. Any ideas where to start?

8 comments

[ 0.27 ms ] story [ 14.7 ms ] thread
I'm not sure what My First Reader is but perhaps O'Reilly's cookbook series would fit what you're looking for?

They also have another sub-imprint, whose name is slipping my mind right now, focused on teaching technical topics very visually. The general layout of those books is very illustrated compared to typical technical books.

OP is probably referring to the types of books generally supplied to small children who are first learning how to read. They tend to be extremely short (no more than a few dozen words in the whole book); heavily illustrated; and use simple words and sentence structure.

By extension, I gather they’re looking for examples of well-engineered programs small and simple enough for a true beginner to thoroughly grok within a short period. Presumably something in a few hundred lines of code that avoids unnecessary indirection or cleverness.

If you're interested in reading JavaScript, I put together a short reading list of JS libraries/codebases to read organized by size [0]. I highly recommend the small but powerful "JSON in JavaScript" and Redux, and as another comment mentioned, the Underscore source code is a great read as well.

[0]: https://github.com/AlexanderEllis/js-reading-list

Great list! Did you personally read all of them?
Not yet! So far I've made it through the short codebases and many of the medium ones. I started a new job recently, and I've found that the ramping up period has sapped much of my "reading code outside of work" energy (as I have more than enough code to read at my day job).