Book Review: How Software Works

Another month, another book kindly sent for review from No Starch. This one’s of the more conceptual variety, and sets out to explain – in laymen’s terms – the algorithms that are responsible for much of the “magic” of modern technology.

hsw_cover-front

When I was younger, and just getting into computers, I used to spend hours reading second-hand software and hardware manuals. I think I must have read the manual for my old computer’s motherboard 50 times. A kindly network engineer from the PC Pro forums (ah, those were the days) sent me an old 400-page networking manual that I inhaled too. Manuals were the best. Manuals showed me what computers were capable of.

It wasn’t until later that I became aware of where the real action is. Algorithms. Manuals are a fine thing, but they’re typically written at a high-level. They tell you what’s happening – and which buttons to press – but, for expediency, often skip over the “how” – the way the mysterious feats that first got me fired up about computers are actually achieved.

This book, How Software Works (by V. Anton Spraul), is all about the “how”. You won’t find any practical manual-type information in here at all, so don’t expect to come out the other side of this book with a finely-honed knowledge of printer troubleshooting or anything like that. No, this is a very pure book that explains, in uncompromisingly non-technical terms, how computers achieve their magic.

Each chapter covers a broad but real-world relevant topic, such as web security, movie CGI, or mapping. After some background on each topic, Spraul sketches out the most important pieces of the algorithmic puzzle needed to produce the “everyday” results we now take for granted in movies, on the web, and in our smartphone apps. This might include a walkthrough of the logic behind a trapdoor function, of the sort that that makes public key encryption possible (which in turn makes internet shopping practical). Or perhaps the step-by-step process by which a rendering program builds up a realistic virtual scene in a movie, through ray tracing.

The writing is very clear and non-technical, almost without exception, and assumes very little prior knowledge. You do not need a technical background to understand this book, but you’ll want to spend some time to follow the examples and ruminate on them a little to really get everything. The examples themselves are plentiful, and include step-by-step illustrations of simplified situations that, when linked together, demonstrate how each algorithm works as a whole.

Given that this is a book on software, it’s slightly disappointing that the presentation is completely “dead-tree traditional”. By this, I mean that there’s no supplementary material in the form of working code snippets that one could play with, or interactive demonstrations. This feels like a missed opportunity, at least for those of us who learn best by tinkering (c.f. the excellent W3Schools “Try It Yourself” tutorials). It’d also turn the book into a more direct educational tool, perhaps something that a class could be based on – and there are enough simple web-based programming systems out there to remove much of the burden of having to “teach” programming in the first place. This is more of a wishlist item than a crucially missing piece, however.

Another minor criticism is the length of the book. It would have been nice to see a few more topics covered, or perhaps a little more detail in the final chapters. The material on searching could go into more detail in explaining how web search works, for example, including things like how robots/crawlers and ranking algorithms (e.g. PageRank) actually do their thing. As it is, it feels like the author ran out of steam before getting to the real crux of this topic.

All in all, it’s a very nice book, and I learned a lot about some interesting, highly-relevant techniques that I was only dimly aware existed. The material on encryption in particular outlines a clever and essentially mathematical topic that will speak to those of you who enjoy logic puzzles, for example. I’m not quite sure who the intended audience is for the book as a whole, but it’s definitely something to keep in mind for an aspiring techie – a teenager who’s still reading the manuals, perhaps, and is ready to have their horizons broadened. The mechanically-minded, those with a fundamental curiosity about how things work, will also enjoy.

About Phil Bull

I'm a Lecturer in Cosmology at Queen Mary University of London. My research focuses on the effects of inhomogeneities on the evolution of the Universe and how we measure it. I'm also keen on stochastic processes, scientific computing, the philosophy of science, and open source stuff. View all posts by Phil Bull

Leave a comment