ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib 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 1949 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:
Computer Science A Structured Approach Using C++
Author:
Behrouz A. Forouzan&Richard F. Gilberg
ISBN:
0-534-37480-8
Publisher:
Thomson
Pages:
1020pp
Price:
£36-99
Reviewer:
Frank Antonsen
Subject:
beginner's c++
Appeared in:
17-1
The aim of this book is to teach C++ as a first language. Often C++ is considered too complicated for this and Java is used instead. But although C++ is a very powerful language that allows you to do all sorts of complicated things, you can also do quite simple things in a simple and consistent manner.

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.