A review by spiralnode
Beautiful Code: Leading Programmers Explain How They Think by

informative slow-paced

2.0

I had high expectations of 'Beautiful Code': I wanted to learn. Learn from how some of the best people in the industry view beautiful code, how they define it, how they work towards it, how they identify smells (for lack of a better word) and any techniques I could replicate too. But this book is borderline unreadable: the essays are disjointed, the quality of writing and explanations is all over the place, and it reads indulgent rather than educational.

There is a vast range of code approached here - from C to Java to Fortran to Matlab and even assembly, and if you are looking to learn how to judge the beauty of code, it becomes quite the exercise if you aren't versed in all of the programming languages it's going to be difficult to grasp all the intricacies you should be criticising. And I would even argue it's not useful to try, Fortran isn't used in the industry today apart from highly specialised weather predictions, and the code presented aged pretty badly with some examples being as old as from the 70s. Other essays were useless for me personally, but other readers might interact with them differently - having read the MapReduce paper by Jeffrey Dean, this abridged version did nothing for me, it's literally a fragment of the paper.

Where was the editor? The contributors seem to have been given complete free reign to the degree that the text turned from teaching to bragging. Also, the quality goes down very rapidly, and some essays don't even feature code, but are more akin to meditations on characteristics of refactored code or high level architectural concepts, like the principles in Ruby.

I did have a favourite, though! The essay on Quicksort optimisation was interesting, a step by step journey into code analysis, how to view performance, how to look under the hood at how each instruction runs. Also towards the beginning of the book was an essay on three-way diffs, how trees model them, and that I also thought was explained well, was approachable yet challenging. Out of the later essays, probably the ones focused on Python, on the internal dictionary implementation and Numpy, were interesting to read about and potentially applicable.