Beautiful Code
Compiled by Andy Oram, Greg Wilson

A diamond is a chunk of coal that is made good under pressure. – Henry Kissinger

Beautiful Code is another non-animal O’Reilly volume, with high aspirations. As the sleeve submits: “How do the experts solve difficult problems in software development?” If this book had been able to answer that question, reading it would be a head-spinning experience indeed.

The book’s chapters are each the domain of a different prominent software developer or writer, and several are elegant outlines of what is unarguably some of the best code out there – Apache Webserver, Quicksort, and the Python interpreter. Ostensibly, the authors are talented beyond measure; with a lack of a cohesive theme, a unified structure, or an overall purpose the book quickly becomes a showcase of beautiful code-essays submitted by thirty-couple completely dissonant geniuses. The fact that the book still contains not much other than what it claims is no invitation for criticism. If you want to see real kung fu code, this is your book.

The potential disparities hide in between the lines, where compilers do not tarry. Few of the essays touch on why the code is elegant, or how it got to be the way it was. Most of them wander around what problem is solved by the code, some delve deep into the minutiae of the problem, and a few contain no code at all. This last set could have been chosen to present a semblance of organization, could have pulled loose ends together and formed some conceptual continuity among a wide variety of articles, but in their current states and places even these well-intended ‘theories of code beauty’ ruminations are ineffectual.

If a computer scientist was so riveted by unpolished essays surrounding the world’s best algorithmic hacks that they failed to notice that no new information was gained, no statements beyond the cold, functional truth were made, no concessions given to that imaginative side of the brain that, when it is given the occasional chance to influence the gnarled digits of a perl hacker, results in that big win – the one sought after in wake and sleep for a week – and doubles the maintainability and efficiency of some project, then that reader will be satisfied to the fullest extent.

For the rest of us, this book was no great failure but no revelation, and is deserving of its place on the shelf. And the geeks among geeks, the hackers who would have found a book closer to Hackers and Painters, held it and shook it until C code fell out, will no doubt appreciate this book.