Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

21–30 of 117 posts

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

#21
post #16

I haven't perused it myself, but every time I see this question posed, someone always mentions Lua: http://www.lua.org/ftp/ Similar previous discussions: http://news.ycombinator.com/item?id=225577 http://www.reddit.com/r/programming/comments/26dyh/ask_reddi...

Thanks for these links - I figured the topic must have come up before, but couldn't Google my way to the right HN thread. Hopefully there will be a search box on this site one day.

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

#23
post #16

I haven't perused it myself, but every time I see this question posed, someone always mentions Lua: http://www.lua.org/ftp/ Similar previous discussions: http://news.ycombinator.com/item?id=225577 http://www.reddit.com/r/programming/comments/26dyh/ask_reddi...

Thanks for these links - I figured the topic must have come up before, but couldn't Google my way to the right HN thread. Hopefully there will be a search box on this site one day.

Just use http://searchyc.com/ :)

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

#24
post #19

Any recommendations for php? I wrote a php/mysql web application for SaaS customers. I am looking at ways to improve performance/cache/error handling or simply write a better code.

Perhaps MediaWiki?

Personally, I wouldn't recommend it. Unfortunately I can't give a better alternative, but I've done some hacking on MediaWiki since version 1.7 and while it's some of the better examples of PHP out there, it still leaves lots to be desired in different places.

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

#25
post #2

SQLite's source listing is great. I learned a lot about good C practices and documentation reading it.

You will enjoy "C Interfaces and Implementations", along with the full, literate source-code for LCC.

This is also good, Standard Function Library:

http://legacy.imatix.com/html/sfl/

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

#26
post #14

Your compiler's source code. That should shake your confidence in the world.

for an easier time, your favorite language interpreter's source code ... interpreters are easier to comprehend than compilers, since you can 'follow along' with the flow of execution in the main interpreter loop just like you're executing a program ... e.g., creating stack frames, allocating heap memory, assigning variables, etc.

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

#27
post #10

Django's code is well written, and very well documented.

I think you tend to learn more studying badly written badly documented code. Certainly there's a lot of knowledge to be gained being able to decipher spaghetti code with no documentation. I guess it depends on your aims though.
Post reply on HN