Jon Bentley once said that he would love to curl up in a comfortable couch, with a cigar in hand, and read a good program.
Well aside from the enjoyment part, good code can be an excellent teacher. Someone, I think it was Parnas, commented that the mark of a mature engineering discipline, is a collection of reference works that serve as a benchmark to practitioners in the field.
Steve McConnell of Code Complete fame is very active in this area at the IEEE. There is an effort in progress called the Software Engineering Body of Knowledge (http://www.swebok.org/index.html) , that is attempting to put together the reference works in different areas of software engineering.
However, SWEBOK has an academic aura to it, and I was looking for something more informal, reflecting the developers personal views about a piece of code that he found interesting. I have yet to come across any such collection of opinions... so this is a start.
The things I look catch my eye are good programming practices, elegant design, architectural decisions, well factored code ... anything that appeals to my aesthetic sense.
As a start here are my favourites (strong java bias ahead):
Resin web server
Author: Scott Ferguson.
- Provides an enviable list of features for a web server... load balancing, distributed sessions, scalability, speed.
- Code is superbly factored. Variable names are clear and concise, methods are small and cohesive... the code is easy to follow... it almost seems too simple... and thats what makes it great
- The author has implemented most of the libraries that are required and which are not part of the core java APIs. This includes xml parsers, reg expression library, java script parsing and code generation, etc. This is another example of "If it's a core business function -- do it yourself, no matter what" (see http://www.joelonsoftware.com/stories/storyReader$402)
- Many of the idioms used are highly intuitive, for example using a Virtual File System, stream to write to logs, mail, jars, etc.
Authors: Brett McLaughlin, Jason Hunter, et al
- Takes away the complexity of the DOM interfaces for manipulating xml.
- Provides a simple api that solves 80% of your problems
- Key ideas: simplicity, intuitiveness
- As usual coding standards and commenting techniques are superb.
Tuesday, October 30, 2001
Friday, February 06, 2004
Fog Creek Home