ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Google+ ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1918 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
Effective STL
Author:
Scott Meyers
ISBN:
0 201 74962 9
Publisher:
Addison-Wesley
Pages:
260pp
Price:
£30-99
Reviewer:
Alan Bellingham
Subject:
advanced c++
Appeared in:
13-4
There are already several books dealing with that portion of the C++ Standard Library commonly known as the Standard Template Library. Some of these have been highly recommended in previous accu reviews, and rightly so. So the question must be, for whom is this book written, and why?

Let me first tell you what it isn't. It's not a tutorial - if you don't already know something about how to use the STL, then this is not the book to learn it from. It's not a reference trying to cover every corner of the STL - for that, I'd recommend the pairing of Nicolai Josuttis's"The C++ Standard Library" with Klaus Kreft& Angelika Langer's"Standard C++ IOStreams and Locales", both reviewed elsewhere. Nor is it the advanced template code that Andrei Alexandrescu has shown us in"Modern C++ Design". However, if you have been using the STL for a while, if you can see the way that the triad of containers, iterators and algorithms fit together, and if you are beginning to enjoy the expressive power available while knowing that there is still so much that you can learn, then this book is for you. Its ambition is explained in the subtitle:"50 Specific Ways to Improve Your Use of the Standard Template Library".

Like his previous booksEffective C++andMore Effective C++, it is organised as a set of short, concise articles that, although in cases mentioning other items, are each complete. They are organised into seven chapters: Containers; vector and string; Associative Containers; Iterators; Algorithms; Functors, Functor Classes, Functions, etc.; and Programming with the STL. Each chapter has a short introduction - half a page or so - and the rest consists of articles from a usual two to three pages up to a dozen or more when he explains something in more depth.

Even in the simplest articles, such as"Item 44: Prefer member functions to algorithms with the same names.", he is careful to explain why he gives the advice, and when not to take it. This isn't a set of rules to follow blindly: he would rather you understood why he says what he says, and for you to work out when not to follow, which is the difference between a true teacher and a mere instructor. Indeed, I found his attitude towards the C++ standard refreshing - it's one of respect while still pointing out the poorer decisions in the STL's design.

As for presentation, it's well laid out, and a nice touch is that he makes a sparing use of colour to indicate specific points in code. All too often, the general furniture of a code example obscures what you're supposed to be looking at. Here, that point will appear in red. This lends clarity without becoming garish, and I feel other books should follow this example.

There are a couple of typos - the introduction in Chapter 1 has an 'of' when 'or' would make sense. The author's surname is miss-spelt in the Library of Congress cataloguing data (copy editors rarely get to proof read the preliminary text in a book). But I didn't spot any slips in the code samples, and that initial pair of mistakes is not typical of the general quality of the text - it is telling that neither of those mistakes is in the actual body of one of the articles, which have been technically reviewed by the experts.

Also, there are subjects that don't really get covered - books on the STL tend to avoid the iostreams, for example - but perhaps that merely means that there is"More Effective STL" to come. I certainly hope so - this book has already made me go back and re-examine my STL use.

To conclude - if you are using the STL on a day-to-day basis, and if you want to use it better, then I strongly recommend that you go out and get a copy of Effective STL now. If you don't yet believe me, go tohttp://cseng.aw.com/book/backcover/0,3828,0201749629,00.htmland check some of the items for yourself.