tags:

views:

109

answers:

4

I'm looking for recommendations of good open source projects to study. I'm looking for projects that have:

  • Object Oriented Patterns and Best Practices implemented
  • Security is well implemented
  • Excellent commenting
  • Language is not entirely important however I'm familiar with Java, Android, C#, Python, PHP

I'm sure this question is a loaded gun because all programmers feel their code is good. I do believe there must be a few projects that stand out in the community as excellent examples. I'm also open to the "Everyone should study this code" or "Studying X project really helped me" types of recommendations. Thanks

A: 

Depends upon how much time you have. Arguably, the biggest and most popular OSS project is the kernel.

Warning: And like pointed out in one of the comments, it isn't very well commented. But it would definitely be very well implemented for security and OO patterns and good for best practices. If possible, the parts of the better commented code could be studied?

Ashish
Technically the kernel is hard to understand for userspace programmers (interrupt context and complicated memory allocation/mapping) and is not what I would call well commented. It has improved a lot since I started programming drivers in 2003, though. As everything is in C and rather hardware bound I think it is not the best place to start...
jdehaan
I agree. It is complex and the older code isn't exactly well commented. But arguably it has the best of best-practices, security is very well implemented and since language is not entirely important some parts (the news code is commented, like you said) could be studied?
Ashish
At least the modular and object oriented kernel since 2.6 is less a pain than the old 2.4! :-)
jdehaan
I agree with the above comments and would like to add: studying some parts of the kernel will give a better understanding of how your computer and userspace things work. Want to know how pipes are implemented? The random number generator? /proc files? ioctls? Those pieces are small enough to be found and understood without spending a ton of time/effort-- ie the reward-effort ratio is in your favor.
+2  A: 

Java pet store! It's meant for the kind of exercise you're about to embark upon!

http://java.sun.com/blueprints/code/index.html

pavanlimo
A: 

StructureMap is a .NET dependency injection framework that is considered to have a sound design.

The author goes through some of its design considerations in this presentation.

Jordão
A: 

This is less of a project, but still open source code:

http://ccan.ozlabs.org/list.html

CCAN is a repository of userspace C snippets. Everything in there is an idiomatic exemplar and has been reviewed by dozens of very smart people.