The ACE Programmer's Guide - Huston, Johnson and Syyid

This book has been called 'The Annoying Blue Book' at work, and with good reason. Let's start at the top. ACE is a C++ platform-independent library for networking-related stuff. It's a pretty good fit for the kind of work we wish to do, in that it provides reasonable abstraction from platform details, better type safety than most C interfaces, etc. So, I get to read up on it, and read this book.

The downside is, this book sucks. I mean, it basically does its job, as a bit of a guide, but it provides little motivation for most of the design decisions. Moreover, the example code it provides generally makes horrendous misuse of the very features it's trying to illustrate, and occasionally the authors really do reveal some shocking ignorance. Stupid thing.

The problem with this is that I'm trying to stop this book from colouring my view of ACE, which does appear to be a useful cross-platform library. As it is, ACE is pretty much what we want, but has a number of serious mis-features which make it irritating. For example, it tries to be a modern C++ library, but it shies away from namespaces or exceptions, making code that uses it butt-ugly in the process. It avoids the STL, to the extent of adding its own container classes. It tries very hard to attain platform-independence, but then gives up and shows platform-dependent details when you least expect it (this is a little harsh, given the differences in underyling platforms, but hey, this is a rant). And finally, it may just be the book, but I don't like the feel of the framework part. I find the lifetime management of objects to be remarkably unclear, and get unpleasant feelings from any library that makes you subclass existing implementation objects, overriding select parts. Subclassing is pretty darn tight coupling to do with someone's library. But maybe that's just my Java-y view of C++ objects coming out.

So: the book's crap, but the library is probably ok (time will tell). Shame it's not written with particularly pleasant-to-use idioms.

Posted 2006-02-07.