The perfect UNIX programming book made better

analysis
Jun 26, 20053 mins

On my desk, you'll find a small group of sacred works set between old-fashioned metal bookends with cork bottoms. All of these advanced books have rare qualities in common: They do not tutor, they are not encyclopedic, and in presentation, they are clinical and succinct. Nothing typifies this most uncommon and essential of genres better than Advanced Programming in the UNIX Environment, written by W. Richard Ste

On my desk, you’ll find a small group of sacred works set between old-fashioned metal bookends with cork bottoms. All of these advanced books have rare qualities in common: They do not tutor, they are not encyclopedic, and in presentation, they are clinical and succinct.

Nothing typifies this most uncommon and essential of genres better than Advanced Programming in the UNIX Environment, written by W. Richard Stevens (now deceased). Recently re-released by Addison-Wesley as a second edition, this book’s inestimable relevance has been genuinely improved–a feat I thought impossible–by Stephen A. Rago.

I prize this second edition even more than the first. The first edition focused on System V UNIX, entirely appropriate for the early 90s. Rago modernizes the content by adding material related to Apple OS X, FreeBSD 5.x and Linux 2.4. Rago does this admirably, without disrupting Stevens’ inimitable balance between concise and complete. Rago does this in places with annotations (flowed-in and indented as opposed to footnoted), elsewhere with tables that expose distinctions among variants of UNIX and Linux, and throughout with text that’s interwoven with Stevens’ original writing. The best measure of Rago’s successful modernization of the first edition is that the new material does not lower the original’s bar.

That’s not to say that Rago hasn’t expanded the audience for this book. He has done so in the best possible way, by allowing those who are already lead-level developers in any commercial UNIX or Linux to migrate their skills or port their code to a less familiar OS. In each narrowly-defined section of the book, Rago addresses differences in implementation, their potential impact and, in many places, workarounds for missing or flawed features. Rago greatly extends the mission of Advanced Programming in the UNIX Environment by making it the book to crack open when your ported project won’t compile.

Every answer is in this book, but it’s up to you to know where to find it and to make sense of the answer. In this regard, Advanced Programming in the UNIX Environment, Second Edition, has the welcome and necessary side effect of accurately identifying its readers’ place on the scale between journeyman and master.

Exercises at the end of each section, and its $75 retail price, frame Advanced Programming in the UNIX Environment, Second Edition, as a textbook. I have never used the first edition in that role. Effective use of this book outside academia requires either a generous blend of free time and will, or the qualifications that transform this volume from a textbook to a shop manual. I consider this book without peer in its category.

I had only two disappointments that do not diminish the worth of the book, but which deserve note. The first edition’s familiar and appropriately austere blue-on-white cover has been reworked such that the cover’s dominant elements are now a garish red “New! Improved!” slug and a three-panel Dilbert comic. The second edition also dates itself in ways that Stevens’ work did not. It editorializes on the present state of UNIX and frequently refers to features promised for future releases of OSes. Stevens’ rock solid classic has been relocated to a rolling platform, something I consider inappropriate for a cornerstone work.

Nevertheless, Advanced Programming in the UNIX Environment, Second Edition is, as was its predecessor, a book that clears the bookcases of the advanced developers who buy it. I have placed this second edition where the first edition stood, and that’s no small thing.

It’s fitting that the book on UNIX development reminds everyone how the name of the real thing is set in type. Copy editors please note.

——–