Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

121–130 of 176 posts

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

#124

== Vim or Emacs == Just pick one and force yourself to use it to the exclusion of other editors. Future you will thank you later, because you'll still be using it 20 years from now. "We are typists first, programmers second" comes to mind. You need to be able to move chunks of code around, substitute things with regexes, use marks, use editor macros, etc. == 6.824: Distributed Systems == http://pdos.csail.mit.edu/6.8…

Wow, if you done all that, I want to see your code :) Particularly the distributed systems in Arc. Mind sharing a link to any code you have online (even if it's not that)?

I took SICP a long time ago... all the pure functional stuff was great and elegant. I never really got how you can program "real world" / stateful stuff like distributed systems in Lisp dialects. When I look at Lisp code with hash tables and so forth it just looks horrible to me.

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

#125

Please enjoy the source code of PostgreSQL (any version, but latest is generally recommended) core. It is very well factored, and typically also very well commented. This community cares a great deal about code quality, because they are so clear on the relation between readability, diagnosability, and execution correctness.

I second this.

With 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.

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

#126
post #14

The Architecture of Open Source Applications book[0] gives a high level overview on many open source projects. It's a good starting point to dive into the code of these projects. [0] http://aosabook.org/en/index.html

This book is a fascinating read. Highly recommended to anybody that does non-trivial application development.

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

#128

Earlier quoted context omitted.

Relax

Actually, it's an important point. One way to learn a given coding technique is to copy-paste it into your own project, modify it until it works, and then delete it and re-implement it yourself. (The "delete and then reimplement it yourself" is the important part. Don't just copy-paste code!) That way you can build up an understanding of the code as you go, without having to understand it in its entirety from scratch…

I suspect that your suggested use of the code would fall under the fair use statute in 17 U.S.C. § 107 and the guidelines from Folsom v. Marsh since it seems explicitly for pedagogical or research purposes.

IANAL, but if this were me it seems safe enough that I'd be willing to do it and fight Colin in court if need be. :)

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

#130
post #14

The Architecture of Open Source Applications book[0] gives a high level overview on many open source projects. It's a good starting point to dive into the code of these projects. [0] http://aosabook.org/en/index.html

Great series of books! There are three now, and a fourth is being worked on which is very relevant to this posts query. There isn't much too it yet, but its working title is 500 Lines or Less, and it aims to implement some manner of a working application in 500 lines or less. There is a GitHub repo [0] where the project is being coordinate.

[0] https://github.com/aosabook/500lines

Post reply on HN