tags:

views:

485

answers:

7

Whose code do you read because it's fun, useful and educational?

For example, I am really liking Peter Norvig's code. His python samples (Solving Every Sudoku Puzzle, How to Write a Spelling Corrector) are short and beautiful. Plus, I am currently reading Paradigms of Artificial Intelligence Programming, which is full of insights.

So, anyone out there whose code you really like? What has it taught you?

+1  A: 

I like this

[Peter's] http://codebetter.com/blogs/peter.van.ooijen/ for all ASP.net applications

balaweblog
A: 

http://ayende.com/Blog/

It's equally parts practical, educational, entertaining, visionary, and WTF?.

Daniel Auger
+2  A: 

I've begun reading Knuth's TeX: The Program. In addition to writing a beautiful program, Knuth invented a method for program documentation called Literate Programming, where parts of the program are introduced in a natural, comprehensible order, making for a very enjoyable read.

Another one that's sitting on my Safari bookshelf is Beatiful Code, but I haven't found the time to begin it yet.

lindelof
A: 

I'm a big fan of the following chaps ... Scott Gu, Rob Conery, Phil Haack and Scott Hanselman.

I read these blogs / code for fun. They come across well and give good examples; also have a sense of humour which helps! ScottGu's is good for learning about new things coming and latest releases. As a ASP.Net developer this is important to know what is coming up. He also does some good walk through blog posts. Actually it's the same for all of them ... Rob's and Phil' are good for ASP.Net MVC related bits and bobs :-)

WestDiscGolf
+6  A: 

I love reading my own code, especially if it's very old, say 8-10 years or so. :)

This is fun, it's like reading your own old diaries. It's useful, since it can highlight changes in your coding patterns, and make you reflect on things you've learned or picked up since you wrote that old stuff. It's educational for the same reasons, it can even tell you things about yourself, how you've learned, and so on.

It's interesting to see how over the years, your understanding of fundamental concepts have changed, or at least grown, and that this is visible in the code is just fun!

unwind
+3  A: 

Recently I went through the git source by Linus Torvalds. Beginning with the first release, I read my way up through the various versions. This gave me a good impression of how a master programmer pieces together a big project from scratch. Highly recommended.

csl
Be sure to follow each revision on the git repository history, not just the released revisions.
CesarB
Have you *looked* at git's history? It's like a freaking subway map.
jleedev
+1  A: 

I enjoy Andrei Alexandrescu's code for the Phobos library for the D programming language. It was written to be useful rather than instructive, but in practice, I've learned some pretty elegant template metaprogramming by reading it.

dsimcha