Writing Scientific Software: A Guide To Good Style Paperback – 7 Sep 2006
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Customers who bought this item also bought
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Would you like to tell us about a lower price?
If you are a seller for this product, would you like to suggest updates through seller support?
'Writing Scientific Software bridges the chasm that too often separates numerical analysis from real scientific computing. It is full of tips, tricks, and just plain interesting information. The reader will learn how to write code that takes advantage of many hidden features in modern computer architectures, programming languages, and compilers. This is a book that is full of good sense.' William H. Press, author of Numerical Recipes
'The book is a useful tool working in the filed of scientific computations…' Zentralblatt MATH
This manual of scientific computing style will prove to be an essential addition to the bookshelf and lab of everyone who writes numerical software. Scientists, engineers and computer scientists who follow its advice will learn how to write good software, and how to test it for bugs, accuracy and performance.See all Product description
Top customer reviews
Most helpful customer reviews on Amazon.com
The Good: Oliveira and Stewart provide a nice introduction to the IEEE floating-point standard, as well as wider issues having to do with numerical accuracy and stability. They also include a lot of material on coding and design, using Fortran 90/2003, C, and C++. They show a modicum of Java, though this doesn't seem to serve much of a purpose (they could have included Python instead, see below). Given that they address a community which to a large extent still interacts with Fortran 77, the authors should be commended for advocating fundamental things like avoiding global variables, knowing how to allocate memory dynamically, and using object-oriented as well as generic programming. Similarly, they introduce a number of lessons learned in mainstream software engineering on the importance of good and up-to-date documentation, as well as on the significance of testing. A strong point of the book is a (somewhat scattered) collection of useful tricks. A few examples: on numerical accuracy: add terms in a Taylor series in reverse order (p. 41); on Unix tools: use grep or sed to produce external documentation (p. 81); on debugging: use the __LINE__ macro and also print out the addresses associated with pointers, checking for null values or repeated values, or values that are too close together (pp. 121, 123); on architecture-related issues: avoid if statements inside short inner loops (p. 162). (Of course, the material on architecture and efficiency is far from timeless: even though the book was published in 2006, the authors refer to 64-bit CPUs as to a thing of the future.) Most of the positive aspects of the book are not ground-breaking, but they weren't supposed to be: this is intended as a condensation of knowledge and experience in the areas of numerics, coding, and computer architecture. Covering all that in under 300 pages -- which means that one can read this book cover-to-cover in a short amount of time -- is nothing to sneeze at.
The Bad: the authors provide a list of errata on their website, but these barely scratch the surface. In too many places, the English is awkward (to say the least). A few examples: "Suppose that you are wanting [sic] to solve an ordinary differential equations [sic]" (p. 39); "The most natural way of handling the environment problem goes to object-oriented languages." [?] (p. 103); "Many discrete algorithms do not have efficient algorithms." (p. 152). The uncatalogued errors extend beyond language issues: there are many technical inaccuracies, though it's difficult to tell where the typos end and the true mistakes begin. Here are a few examples, all taken from Part II: the authors fail to distinguish between Fortran subroutines and functions (p. 49); they say that writing *b++ = *a++ is obscure (p. 62), though this is a common idiom in C; they imply that Java's classes predate Fortran's derived data types (p. 90); they think they're overriding a const pure virtual function with a non-const member function (p. 105); they engage in bad programming practice by showing a function defined in a friend declaration (pp. 110-111); they assume that using the inline keyword will inline a function (p. 112), though in reality the keyword is just a request to the compiler; they show a linear combination of C++ and Java and call it C++ (pp. 143-144). On a different note, the authors leave out a number of things: for example, the boost libraries are mentioned only in passing, so there's nothing on multi_array, or on boost (soon to be std::) array, etc. In the whole book, the authors devote one sentence to Python (p. 230). Finally, given that this is a text on scientific software I was surprised by the fact that it contains essentially no mention of multithreading or distributed memory programming.
The people who would have the most to gain by reading this book are probably beginning graduate students, but it is precisely the readers who lack much experience that would have been better served by a more accurate text. (A final example: section 12.8 is called "Basic Linear Algebra Software (BLAS)". By section 16.2, "Software" has morphed into "Subroutines". Both are wrong, however: the "S" in BLAS stands for "Subprograms".) In a nutshell, I think that this volume deserves four stars for its overall choice of material and the authors' generally good advice, and two stars for its slipshod production quality. Overall, three stars.
This isn't a cookbook for writing the best scientific programs. Sure, there are a few examples, but the underlying principles are what to take away. Despite all my experience, I learned a few tips. I have to say, this book would be better if the authors 1) didn't plug their program at every turn, 2) sat down and narrowed the scope of the book/chapters and critically asked themselves what a given example brings to the discussion, and 3) didn't try to be experts on programming languages. Don't read too deeply into the example implementations. C is my language of choice- I can call them out on many things. I know enough fortran to raise eyebrows at some of the content. The proofreader and technical editor need to be shot- typos and blatant errors are rampant throughout the book (seriously- run spell checker before you hit the "print" button).
Diane C. Donovan
Look for similar items by category
- Books > Computing & Internet > Computer Science > Architecture & Microprocessors
- Books > Computing & Internet > Digital Lifestyle > Online Shopping > Amazon
- Books > Computing & Internet > Programming > Compilers
- Books > Computing & Internet > Programming > Languages & Tools
- Books > Computing & Internet > Software & Graphics
- Books > Science & Nature > Mathematics > Calculus & Mathematical Analysis
- Books > Scientific, Technical & Medical > Mathematics > Calculus & Mathematical Analysis