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.
All that is bad but the biggest indicator is that the only C++ specifics in his code are an ifstream instance, an ofstream instance, four uses of new and one use of delete and a scattering of uses of fstream member functions. He isn't even consistent. Sometimes he uses memset() and sometimes he iterates through an array of int setting each to zero. He does this in a loop that iterates 884736 times and he is writing about optimisation. Granted that the gain may be small but why did he do it that way in side a time critical section and used memset() elsewhere. We will never know. Perhaps a good optimising compiler identifiers what is happening and sets memory anyway.
The other problem that I have is the very concept that underlies the book. Too many programmers waste inordinate amounts of time hand optimising. To give the author credit, he does advise you to think before starting to work. If you run your tax program once a year, halving it execution time is unlikely to ever repay the programming effort involved in making the change.
However the most expensive resources in most programming projects are the human ones and the coding style that permeates this book does nothing to optimise use of that resource. In truth I think your time could be put to better advantage than in reading this book.
By the way, the author seems to think this is his third edition of this book. I think he means that it is derived from an earlier book that was itself derived from a book in C. In my opinion this is still a book in C with a light sprinkling of C++ (he even uses some smart pointers, but he forgets toprovide a destructor for class that owns dynamic resources.) In conclusion, there are a few interesting ideas scattered through this book but not enough to repay time spent studying it.