Stephen R. Davis, C++ for Dummies (IDG, 1994)
[originally posted 24Jan2002]
One of the main problems (from my perspective) with the vast majority of C++ books on the market is that they’re written for C programmers who want to migrate. What’s a person to do who knows very little about C and wants to learn C++? The obvious answer is that he gets on an insanely steep learning curve, unless he wants to go back and learn C before tackling the plethora of C++ how-to- books on the market.
Davis’ book is no exception, despite being from the much-vaunted (by everyone except the programming community) for Dummies line of books. To be fair, the cover does say that the book’s perfect for C programmers who want to learn C++. And it would be hard to fault a 1994 book for not taking Windows programming into account, another common failing of C++ manuals (if you want Windows programming, you either get a platform-specific book [and most commercial C++ programming platforms hide the Windows programming internals] or you’re stuck with the unintelligible reference books from Microsoft itself). So my two main complaints with the book are really not complaints I can complain about in great detail.
That doesn’t make the book perfect. One of the common complaints about the for Dummies books relating to C++ is that the authors of those books tend to ignore the ANSI standard for C++ (Michael Hyman actually touches on some of the more egregious discrepancies in Visual C++2 for Dummies and gives the justification the authors used, but that doesn’t make it any less annoying for those who like to see good code), leading to legions of coders who believe that ‘void main()’ is a perfectly acceptable statement. At the very least, if you’re going to use the for Dummies books on C++, find a resource that lists out the discrepancies (or that’s closer to the standard, e.g. the comp.lang.c++ FAQ or Bruce Eckel’s Thinking in C++ books) and make the changes in your copy of the book when you find them. Your co-workers will thank you.
All that said, C++ for Dummies was my first major C++ reference after one comp sci course that touched on C back in my college days, and despite that learning curve, it did give me enough of a basis in C++ that after two or three re-reads I’d pretty much figured out most of what Davis was on about. Eight years on, it’s hard to separate what he should have taken more time to cover with what wasn’t standardized yet, but I think I’m pretty safe in faulting him for not taking a lot more time covering templates, and I know that I’ve read a number of descriptions of pointers that make a whole lot more sense. As any C++ programmer will tell you, the proficiency of his colleagues lives and dies with an understanding of pointers. This particular book took a lot more re-reads and a lot of outside references before I figured out pointers, and I’m still not completely comfortable with them.
I should point out a few of the good things about the book, if only to justify the rating I’m giving it, shouldn’t I? Despite the whole ANSI standard controversy mentioned earlier, Davis does give us some excellent rudimentary tools many programmers would be wise to adopt (most notably the signature fields he introduces towards the end of the book, which are wonderful tools for figuring out pointer errors). The concept has been built upon and done better since, but for its time it was an excellent concept, and it’s much easier for the beginner to handle than some of the more complex run-time error-checking routines that have appeared since. Signature fields alone may be worth the price of admission for the beginning user.
In short, there’s definitely a decent skeleton here, but it could use (and may have gotten after eight years) a lot of work. ** ½