Welcome to Duncan White's Practical Software Development (PSD) Pages.

I'm Duncan White, an experienced and professional programmer, and have been programming for well over 30 years, mainly in C and Perl, although I know many other languages. In that time, despite my best intentions:-), I just can't help learning a thing or two about the practical matters of designing, programming, testing, debugging, running projects etc. Back in 2007, I thought I'd start writing an occasional series of articles, book reviews, more general thoughts etc, all focussing on software development without all the guff.

See all my Practical Software Development (PSD) Pages

picture of D. White


Book Review: The Pragmatic Programmer: from Journeyman to Master

Authors: Andrew Hunt and David Thomas
Publisher: Addison-Wesley Oct 1999
ISBN: 020161622X
  The Pragmatic Programmer: cover image

This is probably the single best programming book I've ever read. Both Dave Thomas (who, some years before my time, was a student at Imperial College) and Andy Hunt have a really sound range of practical experience in the software industry - 25 years each, I think they say in their Preface - and unlike many authors (Somerville, anyone?) have the gift of communicating their experiences concisely and clearly.

They use a central metaphor of programming as woodworking - which is much more fun than the usual ``design as architecture" metaphor which often seems to leave out the actual process of programming, testing and debugging. They take the woodworking metaphor into fruitful locations - one part of becoming an expert (programmer? master carpenter?) is to develop a varied toolbox of tools with which you are extremely familiar which boost your productivity significantly.

One of the things they focus on, and return to repeatedly, is the important idea of writing code generators - or programs that write programs. They emphasize that this sounds more complex than it is, that a simple code generator can be written in a few minutes and still save hours of work. They also point out that a simple ("passive") code generator designed to be run once does not have to be perfect, if it does 90% of the work but the result needs hand editing - that's fine.

Then they move onto "active" code generators, that produce guaranteed correct code from some simpler input - parser and lexer generators are the obvious examples here, but they can do anything. I'm particularly into code generators and little languages, so this theme chimes well with me. Several of my other PSD articles are about designing little languages and building code generator tools for them. One of those articles (transplants a functional language feature (recursive data types) into C,

They also summarise their long experience as a series of incredibly useful Tips. Here are a few of my favourites:

Plus my favourite tip of all - I laughed so hard I nearly fell off my chair when reading this for the first time. Because, let's be honest - we've all been there:

Of course, there's quite a bit of overlap with Kernighan and Pike's The Practice of Programming (tPoP) (review here) - indeed, the select isn't broken tip is extremely similar to tPoP's observation that beginnners have a tendency to blame the compiler or library (page 119 of the Practice of Programming).

And finally - you must look up Rubber Ducking in the index, both because it's extremely funny (and psychologically accurate) but especially to see a mention of Greg Pugh, another ex-Imperial bod - we get everywhere, I'm telling you! (More overlap again - Rubber Ducking in the Pragmatic Programmer is extremely similar to the Practice of Programming's tell it to the Teddy Bear on page 123 of PoP).


d.white@imperial.ac.uk
Back to my Practical Software Development Top Page.
Updated: May 2022