Book Review - Computing for Numerical Methods using Visual C++
Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah Abu Bakar
Reviewed for the ACM Special Interest Group on Software Engineering, August 2009 by Craig Henderson
Computing for Numerical Methods using Visual C++ is written by Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah Abu Bakar, and published by Wiley-Interscience (December 14, 2007), © 2007, 0470127953, 448 pp., $116.95.
I was attracted to this book by the publisher’s claims on the back cover that it fills the need for a complete, authoritative book on the visual solutions to problems in numerical methods using C++. My expectation was set that I was to be presented with numerical methods theory followed by practical C++ implementations of graphical visualisations in a feature-rich interactive graphical user interface.
Alas, my expectations were dashed within minutes of downloading the accompanying code from the publisher’s website, running the pre-built samples and being presented with a somewhat rudimentary user interface. I am, after all, a computer scientist and engineer – a typical representation of the book’s intended audience – so of course I was going to download and run the samples before reading any of the book!
With mild disappoint put to a side, I read the book without further interaction with the downloaded samples and my impression of the book began to increase.
The book content and the authors’ attempt to bridge a gap between mathematics and computer science is sometimes confused and lacks focus and accuracy. A C++ history seems unnecessary in a book such as this and the brief one presented is flawed, confusing Language with library implementations; "... in the early 1990s, C++ was reshaped to tackle the extensive demand of Windows programming and this brings about the release of the Microsoft Foundation Classed (MFC) library ... based on C++". There is no acknowledgement that any other operating systems or C++ implementations exists, and suggests that C++ is a Microsoft language designed only for writing Windows programs. Further inaccurate assertions such as "Code3A is the simplest program that can be created to run on Windows" undermine the author’s integrity and question their authority in the subject on which they write. The purpose of Chapter 3 Numerical Interface Design is unclear; it introduces the MFC library, very briefly (and unnecessarily) touches on .Net and yet contains no substance in anything. I assume it to be a precursor to developing GUIs for visualisation, but it falls a long way short of adding enough knowledge for an inexperienced developer to begin to develop GUIs. A better approach would be to introduce the GUI concepts within the visualisation chapter as they become relevant to the discussion.
Mathematical problems and techniques are clearly described in theory with a very detailed step-by-step worked example; with the exception of Chapter 9 where the examples are not clear and do not follow the same detail. There are many examples, sometimes called case studies, throughout the book. Each example is first described in detail, then reduced to compact terms and then implemented in C++. The O complexity is often stated – although there is inconsistency in whether it is or not and an explanation of O complexity would be beneficial to the reader. It is common for the authors to use terminology, notation or C++ elements without introduction or explanation, which is frustrating for the reader.
The authors talk of the importance of good programming strategies for mathematically intensive operations on massive data, which is indeed a very important message. It was disappointing, then, not to see this in the design and quality of the presented code and accompanying examples. Code is repeated a number of times through the book and code for matrix properties such as tridiagonal, diagonally-dominant, positive definite, etc. are all present, but buried inside other code which makes it difficult for the reader to use in their own applications. Algorithms are implemented within the user interface code, which again makes reusability and maintenance very difficult. A preferred alternative is to have a software development thread running through the book whereby a matrix class is created step-by-step, implementing each algorithm or property-test as they are introduced through each chapter. This approach would reinforce the author’s good programming mantra and can be used to introduce pre-condition error handling such as throwing an exception (or simply returning false) in the Jacob method if the matrix is not positive definite. Repetition of code necessarily requires repetition in the text, which is good for clarity and easy reference, but becomes a little tedious when the book is read in its entirety.
Conclusion
Computing for Numerical Methods using Visual C++ is a good mathematical theory book that is let down by its practical aspects of software development. The authors are expert mathematicians but their C++ implementation and discussion is poor in places. A revision of the book would benefit from teaming up with an expert in C++ to bring the standard of code up to that of the mathematics.
I reviewed this book including the 2008 published Errata sheet and found many more mistakes. I have sent an errata list containing eleven items to the authors who have confirmed that each one is a mistake that will be corrected in a future revision of the book.