Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

1–10 of 176 posts

Ask HN: What source code is worth studying?

#1
This 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?

Re: Ask HN: What source code is worth studying?

#3
I've heard lots of people sing praises for Redis source - https://github.com/antirez/redis. A cursory look into the source shows a very well documented code-base. It's one of the top items in my to-read-some-day list. Salvatore is an excellent C programmer and takes a lot of pain in writing good documentation, despite his not so great English skills. A shout out for him, thanks for setting an example.

Re: Ask HN: What source code is worth studying?

#4
Fabien Sanglard http://fabiensanglard.net has some excellent code reviews on his website, particularly games.

You could read some of the code-bases he reviews, and then read his review. You'll be able to compare and contrast your opinions with his, and if there's interesting variation you can blog about it ;)

Re: Ask HN: What source code is worth studying?

#6

Fabien Sanglard http://fabiensanglard.net has some excellent code reviews on his website, particularly games. You could read some of the code-bases he reviews, and then read his review. You'll be able to compare and contrast your opinions with his, and if there's interesting variation you can blog about it ;)

Thank you. I remember his Quake and Doom reviews. Will catch up on the others.

Re: Ask HN: What source code is worth studying?

#8
post #2

C -> Varnish PHP -> Yii Ruby -> Merb Scheme -> Arc Clojure -> Core JavaScript -> Multeor Any languages in particular that you're interested in not covered above?

I have some experience with Yii and coming from Django I'm not impressed with the _functionality_. Maybe the code is really great but why not study something Symphony which, arguably, achieves more and is therefore better at solving the same problem?

Re: Ask HN: What source code is worth studying?

#9
I think you get more benefit from reading code if you study something very close to what you are working on yourself, something in the same domain, in the same framework perhaps, or at least in the same programming language, at best something you are deeply involved in currently.

I never seem to get enough motivation to read deeply into random "grand" code bases like Lua or SQLLite, but some months ago I got into the habit of always studying a bunch of projects that use a given technology before I use this technology, and it greatly decreased the amount of time it takes me to get to a "idiomatic" coding style. So instead of diving in a random, I would recommend making researching existing code-bases related to what you are currently doing an integral part of your workflow.

Re: Ask HN: What source code is worth studying?

#10
post #2

C -> Varnish PHP -> Yii Ruby -> Merb Scheme -> Arc Clojure -> Core JavaScript -> Multeor Any languages in particular that you're interested in not covered above?

Thanks for this list.

I was mostly looking for Python, Javascript, Haskell and C#. Any help regarding that?

Also, as I believe this thread will also help others, you can go ahead and post about any other code-bases for other languages.

Post reply on HN