Also, quite a few great books on the STL and on generic programming have come out over the last three years. As a result, the C++ programmer's list of must-read books (also known here at Zephyr Associates as the list of books which if you haven't read them we won't hire you) has grown. The classics are still there: you're not going anywhere if you haven't read Scott Meyers' first two books [2], the design patterns book [3], and Herb Sutter's two books [4]. In addition to that, you must now learn about the STL from an introductory book. There are several choices, and you should shop around, but I think it's fair to say that Nicolai Josuttis' STL book [5] is emerging as the standard introduction to the subject. If you really want to use the STL efficiently (and using it inefficiently is often worse than not using it at all), you can't stop there. You also need to read Scott Meyers' third book, Effective STL [6].
By the time you've gotten that far, you've been looking at a lot of template error messages [7], and you've been exposed to advanced generic programming concepts such as traits. Now, at the latest, is the time to pick up the ultimate book on C++ templates and their application in generic programming: David Vandevoorde's and Nicolai Josuttis' recent C++ Templates [8]. This is really two books in one. On the one hand, it is an incredibly authoritative, comprehensive, and well-written reference book that answers pretty much every question you could possibly have on C++ templates. On the other hand, it is organized in such a way that during a first pass, you can easily skip some of the gory details and save them for later. If you read just Part I and your picks from Parts III and IV, you get a great tutorial about templates and their applications that will go a long way in your daily work.
C++ Templates is also a prequel. It is the prequel to the ultimate book on creative generic programming, namely, Andrei Alexandrescu's Modern C++ Design [9]. You really need the kind of understanding of templates that David Vandevoorde and Nicolai Josuttis give you before you can attempt Andrei's book, but this guy is so ahead of the pack that his book came out two years before the first textbook that has the prerequisites. Andrei is the Jimi Hendrix of generic programming. He's got a six-string guitar, an amplifier and a few effects at his disposal, just like everybody else, but what he does with them just leaves you slack-jawed. Read his book and his ongoing column on the CUJ website [10].
Another great source of information and inspiration on C++ programming in general and generic programming in particular is the C++ seminar [11], which is now in its third year and pretty much set to become a regular event.
I never write about anything or teach anything unless I have not only good knowledge of the subject, but also solid practical experience with it. So how come I could claim solid practical experience with the STL in early 2000? That I owe to one guy whom I have to thank more than anybody else, and that's Aaron Moore. In 1997, when we started work on the Zephyr StyleAdvisor program, there were just the two of us. Had we had official titles, mine would have been "The Mad Mathematician," and his would have been "The Smarter Of The Two Of Us." Six years later, Aaron is CTO of Zephyr Associates, StyleAdvisor is standard software in the money management industry, and I'm still a mad mathematician (albeit one with a bank account). There are certainly many reasons for this remarkable success story, but one of the most important ones was Aaron's decision to make the STL and STL-style generic programming one of the cornerstones of our code design. If you were around in 1997, then you can appreciate what a visionary and bold decision that was. In 1997, it was not clear where things were going to go with the STL. In particular, it was not clear whether Microsoft's support for the STL would ever improve (or even continue, for that matter). In fact, that was not decided until 2002, when Microsoft finally made the wise decision to avail itself of Herb Sutter's advice and throw its weight behind C++ Standard conformance, including, of course, the STL [12].
There is a lesson here. To be a good engineer, you need, of course, knowledge and experience in your field. But there is one other thing that you need to be a truly excellent and successful engineer, and that's instinct. Sometimes, there just isn't enough information to make a decision based on reason alone. You have to just feel it in your guts which is the right way to go, and then have the courage to go with your instinct. The important thing is to recognize that kind of instinct and courage when you see it. If you don't find it in yourself, that's no big deal. Find a person who has it, then trust that person. Just don't pretend that you have it when you don't. There's too many people like that in the industry already.
[2] Scott Meyers, Effective C++, Addison Wesley 1992, and More Effective C++, Addison Wesley 1996
[3] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, Design Patterns, Addison-Wesley 1994
[4] Herb Sutter, Exceptional C++, Addison Wesley 2000, and More Exceptional C++, Addison Wesley 2002
[5] Nicolai M. Josuttis, The C++ Standard Library: A Tutorial and Reference, Addison Wesley 1999
[6] Scott Meyers, Effective STL, Addison Wesley 2001
[7] You can make those mysterious STL template error messages much more understandable by using Leor Zolman's STL Filter tool <http://www.bdsoft.com/tools/stlfilt.html>
[8] David Vandevoorde and Nicolai M. Josuttis, C++ Templates: The Complete Guide, Addison Wesley 2002
[9] Andrei Alexandrescu, Modern C++ Design, Addison Wesley 2001
[10] <www.cuj.com/experts>
[11] <www.thecppseminar.com>
[12] I have been playing with Microsoft's VC++ 7.1 beta, and I am very impressed with their template support.