Ask HN: What source code is worth studying?
51–60 of 117 posts
Re: Ask HN: What source code is worth studying?
#52It's short and clearly written. And it demonstrates some neat things, like memory management.
Re: Ask HN: What source code is worth studying?
#53SQLite's source listing is great. I learned a lot about good C practices and documentation reading it.
Especially its deep test architecture.
Re: Ask HN: What source code is worth studying?
#54The NT kernel is the most beautiful piece of code I've seen. Dave Cutler and team wrote some very, very elegant code that anyone (even if you're not a kernel hacker) can understand. If I need 'code inspiration', I spend some time looking through their code.
Now, the NT kernel itself doesn't have source out there but for folks who are students, you should be able to get your hands on the Windows Researh Kernel (http://www.microsoft.com/resources/sharedsource/windowsacade...). This has all the good stuff (and is much easier to build too)
Re: Ask HN: What source code is worth studying?
#55--EDIT---
Found it: http://web.archive.org/web/20050315135351/http://nanocrew.ne...
Re: Ask HN: What source code is worth studying?
#56The best code I've seen: -
Common Lisp - "Paradigms of Artificial Intelligence Programming" by Peter Norvig and "On Lisp" by Paul Graham
C - "C Interfaces and Implementations" and "LCC- a compiler for ANSI C" both by David Hanson. I also found the code for the Player/Stage robotic sim framework surprisingly readable.
I liked the Scala Actors library code as well.
If any HNers know any great codebases in Haskell or Erlang, please post here.
Re: Ask HN: What source code is worth studying?
#57"Code reading requires its own set of skills, and the ability to determine which technique to use when is crucial. In this indispensable book, Diomidis Spinellis uses more than 600 real-world examples to show you how to identify good (and bad) code: how to read it, what to look for, and how to use this knowledge to improve your own code." http://www.spinellis.gr/codereading/
Re: Ask HN: What source code is worth studying?
#58http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree...
Re: Ask HN: What source code is worth studying?
#59Any recommendations for Ruby/Rails projects?
http://tomayko.com/writings/unicorn-is-unix
I found Sinatra to be an interesting read (and specifically how it parses the app configuration into methods):
Re: Ask HN: What source code is worth studying?
#60The Linux kernel: http://miller.cs.wm.edu/
I've found that doing so a) improves my knowledge of what's going on under the hood tremendously, and b) has taught me a fair bit about how to do code reviews and make difficult design decisions. Studying the kernel itself line-by-line would take ages, but reading a few threads a week depending on what piques my interest is totally manageable.