Hacker News new | comments | ask | show | jobs | submit login
Ask HN: What is a good “My First Reader” for source code?
10 points by isolier 75 days ago | hide | past | web | favorite | 8 comments
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?

This recent post has some recommendations for open sourced games [1].

Check out my project as well for some smaller projects suitable for reading [2]. I think we have the same ideas-finding smaller but good quality projects to read and learn. Feel free to connect (email in my bio).

[1] https://news.ycombinator.com/item?id=18293159 [2] https://github.com/CodeReaderMe/awesome-code-reading

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).

If you know or have interest in JavaScript, the Underscore annotated source code is good:https://underscorejs.org/docs/underscore.html

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.

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