Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
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.
So let me start by saying what I like about this book. First, it begins by using streams and manipulators to provide a nice looking output in the very first chapter. All too often, this is moved to an advanced chapter near the end of the book. Secondly, it shows you how to write your own I/O manipulator and handle binary files. There is an appendix on the STL, and they introduce templates relatively early on. Finally, each chapter concludes with a broader section on general software design techniques and methodology. However, alas, this also shows the limitations of the book. They cite very few books, which is not a problem, but all of them are from the seventies or eighties. Many things have happened since.
In fact, the authors spend a lot of time discussing structure diagrams and give much good advice on how to factor functions. However, they barely touch UML, and there is not a single word on when to factor classes. In other words, they teach is procedural programming, with just hint of object orientation. All the advice they give on writing functions remain valid of course, but it takes on quite a different meaning in the context of classes.
The first part of the book shows signs of being just a quick update of the original book (I don't know when that appeared). For instance, it warns against using the bool type, because not all compilers provide it. In 2004, if a compiler does not provide bool, do not use it! Fortunately, the authors ignore their own advice for most of the book so this is not a big problem. The same holds for their advice on where to define variables inside functions; the first chapters recommends putting all variable definitions at the top before any executable code, that is in the old-fashioned C-style. Again, the authors ignore their own advice in the rest of the book and comply with modern practice of defining a variable as close as possible to where it is used.
The book has 1000+ pages, so inevitably a number of typos must show up. There are a few places where the code is clearly wrong, but these are usually obvious and should not confuse the novice too much. What is more serious is the old-fashioned style. There is a long (actually quite good) discussion on pointers and the use of the this pointer, but no mention of auto_ptr. They use characters instead of standard strings until the end of the book, where a chapter on strings has been tagged on. Even though templates are introduced in chapter 13, they are not used in the remaining 4 chapters, not even in the final chapter where a linked list class is designed. Exceptions are only introduced at the very end; all previous code relies on the older style of having functions returning an invalid number or calling exit with an error-code.
It is really a pity. The authors do quite a good job at explaining things, but for a book published in 2004 it is far too old-fashioned. This becomes clearer as one reads the later chapters where most of what has happened to C++ since the late eighties has been quickly tagged on.