Hacker News new | ask | show | jobs
by greaterscope 4772 days ago
Two projects you may want to review for ideas are Redis and toybox.

Redis comes to mind because it started out as largely a single file of code that has since been split and organized into multiple files. The code is quite approachable; you'll likely understand how most of it works after a day of causal browsing. http://redis.io

Toybox comes to mind because it's insanely modular, and aggressive about code re-use. The logic can feel a bit dense at times, but he's going for size and speed. I'm a big fan of Rob's efforts. http://landley.net/code/toybox/

2 comments

>> redis

Thanks for this pointer. We also tend to be more organic in modularity. Start with a big chunk of code and split it when the time is right.

>> Toyboy, "insanely modular"

I haven't read the toybox code (so maybe it's not that bad) but we've had some folks go to extreme in the modularity/code-reuse direction. Their code is NOT easy to read.

On the subject of code reading: are there specific areas of the linux kernel (or minux or ...) that someone would recommend to read?
Reading through this book[1] was a really mind-expanding experience for me. It is an overview of the kernel and doesn't dive into any one part in depth, but it was extremely valuable for me in learning how to structure a large c project as the same techniques and ideas are useful for many large projects.

[1] http://www.amazon.com/Kernel-Development-Developers-Library-...