This review was originally printed in the December 2007 edition of the UKUUG newsletter, which is now defunct.
Title: Beautiful Code
Authors: Andy Oram, Greg Wilson
This book consists of a collection of essays tied together around the common theme of ‘beautiful’ code, covering a wide range of subjects from implementing quicksort to working on kernel device drivers. Some of the names you might recognise (Brian Kernighan for example), others are less well known but still have interesting insights to offer.
What I particularly liked about this book is that most of the essays are based on real world problems, rather than some complex and abstract solution which the authors have thought up but is never likely to occur in the course of software development. Too many essays of this type tend to discuss scenarios which most people would never come across, so it was refreshing to see a collection which was grounded in the real world.
The book is also full of sample code which illustrates the problems under discussion, and much of it is detailed enough to be transported into your own work. However, some of the code examples are a little on the long side, for example in the Subversion essay there are five pages of code listings in a row, which is a bit too much to take in at once. The other minor criticism which I have is the breadth and depth of programming knowledge which is required to fully understand and follow the essays. Although most of the essays retain a certain level of abstraction, there are a significant number of instances where low level code is brought into play, and several languages are used (LISP, C and Ruby to name just three which are quite different from one another), so I’m not convinced that many people will be able to follow all of the essays as a result.
Overall, this book is an interesting and engaging read, but to really get the most out of the essays you need to understand the code in depth, so this book isn’t suitable for filling the time on your daily commute. At nearly 600 pages, the book is also quite lengthy, and perhaps could have benefited from either some judicious editing or perhaps splitting off some of the essays into a second volume or a companion website. As is often the problem with edited collections such as these, the essays don’t tie into one another very well – which is good in one sense as you can dip into the book wherever you want, however I came away feeling that overall the book lacked a single thread to bind everything together.
The final verdict: it’s certainly worth flicking through the table of contents (available on the O’Reilly website) and seeing how many of the essays are perhaps worth reading, but I think it’s unlikely that there will be enough essays of interest to justify purchasing the whole text. Individually, the essays are generally of a high quality, but as a whole the collection doesn’t gel well enough for me.