Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

31–40 of 117 posts

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

#31
One project I found fascinating reading a while back when I was working on graphics, is AGG. It's a vector graphics toolkit, a bit like Cairo, Quartz 2D or Java 2D. It uses a particular style of C++ - a mixture of template programming together with regular polymorphism - to build up a collection of rendering components. The components are almost Unix-like - you plug them together to build your customized rendering pipeline, and the C++ compiler's template logic takes care of making everything hardwired (or dynamic, if you choose to use the polymorphic components):

  http://www.antigrain.com/
The end result is a toolkit which is at a lower level than Quartz 2D et al, but could easily be used to build such an API. It can also be adapted for embedded, or high precision uses.

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

#32

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.

I learnt a lot by using frameworks as symfony. The initial learning curve is steep, but then you can understand architecture better. The jump to other languages such as python and java was really easy after that.

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

#36
post #20
post #15

Earlier quoted context omitted.

I agree with this, and along the same thought, OpenBSD (or any BSDs really, but OpenBSD tends to favor simpler implementations) source is very clear and concise.

Minix, not being as 'real world' as the BSD's or Linux, is even more readable, if you're just interested in a quick glance at how an OS works.

From Minix' site: MINIX 1 and 2 were intended as teaching tools; MINIX 3 adds the new goal of being usable as a serious system on resource-limited and embedded computers and for applications requiring high reliability.

Is Minix 3 still readable, or do you recommend Minix 2?

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

#38

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.

There's a lot of excellent PHP code in the Horde Project's repository: http://cvs.horde.org/

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

#39
Quake source code: www.idsoftware.com/business/techdownloads/

From a graphics and game engine perspective, it was very informative to go through pieces of of the source - I was mainly interested in the client/server and collision detection areas of the code.

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

#40
For Java, all of Apache's stuff is good - particularly Jakarta. http://jakarta.apache.org/ This covers a wide range of topics and is designed to have a public API. http://code.google.com/p/google-collections/ and http://code.google.com/p/guava-libraries/ and http://code.google.com/p/google-guice/ are interesting in that they come out of Google, beyond their own individual merits.
Post reply on HN