The Art of Unix Programming - Eric S. Raymond

I'd been holding off reading this for some time, until I could happily read it in PDF form on an e-reader, as I wanted to avoid feeding money to the noted nutcase ESR. In retrospect, this is perhaps a little harsh.

I really rather enjoyed the book. The historical part was a mixture of the well-known and the uninteresting, the Open Source sales pitch was pretty much as you'd expect from him. When it comes to design, language choice and file/protocol format stuff, it's actually all straightforward... but that's exactly his point of what the Unix way is!

Although there's pretty little that's new in theory to me, after years working on Win32, it was nice to have a reminder that everything needn't be multithreaded OO with lots of components and binary protocols. Indeed, it rather makes me wish we had more decoupled, simple, debuggable design going on, and has inspired me to push a little more in that direction.

The details of file format and protocol design were rather nice, since it points you at specific examples to ape, massively reducing the thought required in this area, and giving you an existing vocabulary to work with. Almost a 'Design Patterns' of textual interfacing.

The section on programming language choices was realistic, but dire, making me think this is an area where the Unix world is losing its battles. The 'modern' choices, once you'd got over C/C++, sh, Tcl and Perl were Python and Java. Mmmm... depressing.

Outside his area of expertise, Mr. Raymond is willing to talk authoritatively on things he doesn't understand. He rightly complains about the Windows registry, but fails to see that the core Win32 is mostly pretty neatly designed, with a fundamental 'waitable object' approach that works well. Having said that, it's not exactly an uncommon failing for Unix developers to complain about this API without understanding it. (And yes, there are things wrong with it, but we're not even talking that level of understanding).

Otherwise, he initially sells Unix as being superior to many other OSes in the features it supports, despite the fact that Unix is designed to be as dumb as practical, and only wins by being compared to a set of hobbled competitors. Fortunately the end of the book is rather more honest about where it stands compared to more advanced systems.

In the colophon, ESR explains how he wrote the book using nothing but free software. It's a pretty dire sales pitch, and Knuth should really go round and beat him up, since half the section headings seem to appear right at the bottom of pages, with no body text following them. TeX can do better than that. I have no idea if this is a PDF-only problem.

For all that, I really enjoyed this book. In a world of UML, business objects and enterprise software, it's nice to have something akin to a manifesto for genuine maintinable simplicity. I'm tempted to buy a copy so that I can throw it at some of the worst design criminals. I wouldn't even begrudge the money going to ESR. He'd probably just spend it on guns and moustache maintenance.

Posted 2010-04-04.