Ask HN: What source code is worth studying?
403 pointsThis is one my favourite questions, asked by idlewords: https://news.ycombinator.com/item?id=879101
But its been a long time since then, and with a new set of programming languages, I believe there are new code bases that's worth studying about and learning from.
So, which code-base should I be reading about to improve myself?
Comments (166) 76 threads
Earlier commentsWith most large and modular systems in C (think Linux kernel), you're completely lost and the internal architecture is opaque.
PostgreSQL's source code is a marvel of clarity.
It is possible to make misteps gracefully - that is, even when making mistakes you can mitigate the problems by writing clean code and trying to make it fit nice patterns you've already seen.
Sure, you can't copy directly, but you can get a feel for what is nice and isn't by looking at lots of code that has reached it's goal, and thus get an intuition for code smells.
Further, seeing how principles and patterns are used elsewhere helps take abstract concepts and turn them into real examples - for me anyway this is vital for my learning of anything.
* The lack of ifdef's that make cross compiling a breeze
* It is easy to understand, compare to reading the Linux kernel
http://plan9.bell-labs.com/sources/plan9/sys/src/
http://pauladamsmith.com/articles/redis-under-the-hood.html
http://www.starkiller.net/2013/05/03/hacking-redis-adding-in...
All comments shown.
Couldn't load more comments. Check your connection and try again.