Coders at work

05 Sep 2010

Since I much enjoyed Peter Seibel’s Practical Common Lisp, I was looking forward to Coders at work. Written entirely using a question and answer format it’s an unconventional read. But after a couple of interviews the format, inspired by Programmers at work, begins to feel more natural.

The book tells the story of 15 prominent coders by asking each coder roughly the same questions. After covering their initial exposure to programming, it moves on to how they design and debug programs and whether or not they use literate programming or design by contract or more formal proof techniques. In my opinion, each interview varies too little and is backed by too many anecdotes. I’d hoped for universal wisdom and advice that would transcend time and technologies.

Perhaps not too surprisingly, during the interviews you learn how many of the coders got into the field entirely by chance. Simon Peyton Jones, a creator of Haskell, was drawn to electrical and software engineering because he found math too hard and competitive. Others were lucky enough that their school happened to have a mainframe sitting in the basement for them to tinker with. On the whole, computers simply sparked an early and lifelong passion.

Another common coder’s trait seems to be that of code reading. As an individual developer, you should improve by studying real code of every quality. As a team of developers, you should improve by shared code reviews of what you’re building. Like no other technique, studying and reviewing code will help share knowledge and improve general developer skills. Yet, the typical organization keeps to in-house presentations on the vNext features of some product and calls it knowledge sharing for developers.

I ought to do more a la Scott Hanselman’s weekly source code. When taking on C++ and MFC in the late nineties, I remember reading the MFC sources and admiring how well it applied design patterns and design by contract to the C-based Windows API. That code base alone had a profound impact on my understanding of object-orientation and how to write code.