on 6 July 2010
90% mindless filler, 10% plagiarized.
Much of this book is verbatim quotes of huge amounts of raw data generated by Mathematica (e.g. listing every chemical element on p.507). Most of the rest is devoted to trivial concepts repeated over and over. The variance in code quality is enormous but a little digging quickly shows that the high-quality content was stolen from other authors, e.g. the Rabbit-Fox sample on p.520 was stolen from Wilfried Gabriel's "Predator-Prey Dynamics with Type-Two Functional Response". Mr Mangano tried to boil the code down but screwed it up, hardcoding magic numbers specific to the problem at multiple locations (rendering it impossible to reuse) and replacing the accurate solution of the underlying differential equations with a poor-quality integrator of his own invention.
Complete waste of money.
on 9 July 2010
This book contains a few interesting examples but none were created by this author and they were all already freely available to Mathematica users (primarily from Wolfram Demonstrations and The Mathematica Book).
But it loses stars in my rating mainly because the information density is so incredibly low. Many pages are filled with useless output (dozens of triples on page 15, page 58 lists hundreds of numbers but the text does not even describe their significance, page 205 lists all of the words with a subset of the letters "thanksgiv", page 226 is raw XML data, pages 264-265 are solid code that renders a snowman with circles and some dots for snow (all in black and white), pages 303-304 are two more pages of code to plot a snowman in 3D, page 321 lists all of the properties in Mathematica's polyhedron database and page 322 draws 20 polyhedra before page 324 enumerates exactly the same polyhedron properties again, pages 334-335 enumerate image data numerically (three times), page 359 displays quadrant swapping with 25x more matrix elements than necessary, page 360 is the Fourier transform of an image and page 361 is an apparently identical one, page 507 lists every chemical element and page 571 lists every property of them, page 553 lists every property available for financial data and page 554 lists them all over again, and so on). Many pages are devoted to TreeForm plots of trees that convey no useful information, e.g. the one on red-black trees is not a red-black tree (would have been nice to see red and black colored nodes). In particular, half of page 115 is a TreeForm view so badly laid out by Mathematica that it is unreadable.
There are also some problems with the technical content itself. For example, the section on red-black trees copies Okasaki's excellent book "Purely functional data structures" but this book adds the missing "remove" function to remove an element from a tree. Unfortunately, the implementation given in this book that was written by its author, Sal Mangano, is wrong in at least two different ways and, consequently, it corrupts trees. The graph on page 572 is empty. The advice about optimizing code within Mathematica is sound but compiled languages are typically orders of magnitude faster than Mathematica so it is generally best to avoid Mathematica when performance is at all important (e.g. the americanPutCompiled function from page 583 is supposed to be performance critical but it is 64x faster when rewritten in F#). The chapter on parallelism will only be of use to anyone to have been stupid enough to write a lot of legacy code in Mathematica.
There are several multi-page program listings written as plain Mathematica code with embedded comments that are difficult to read (they are not even spaced out, let alone properly typeset!) instead of prose.
Unless you have money to burn, read the Wolfram Demonstrations instead...
on 13 July 2010
Mathematica Cookbook is a good refresher guide and provides valuable update information about the many powerful new functions introduced in Versions 6 & 7 of Mathematica. It is very enjoyable, and densely packed with useful and relevant information. It is engagingly and clearly written. The e-book version (which can be bought for a small additional fee) is available in Mathematica notebook format - all of the code therein is fully functional. All of the notebooks tried to date work well and the coding seems elegant and easy to re-use in real-life applications: there seem to be relatively few bugs or typos - the very few whioh I have found are already documented on the book's errata web-page.
The book succeeds well on three levels:
* It includes a useful range of algorithms and functional programming techniques which can be adopted and adapted for use in practical applications in the fields of e.g. image processing and cryptography;
* It provides some very helpful and deep insights into the use of Mathematica's vast library of functions: e.g. which to select and which to avoid for certain purposes. It is particularly helpful in the areas of data structures and pattern matching; and
* It includes a rich collection of cross-references to helpful material available in other books, in articles and/or in the Wolfram Demonstrations Project.
It avoids duplicating the excellent help system and virtual book which is built into Mathematica. Indeed, this book is a useful tool in helping to navigate that vast resource.
Mathematica Cookbook well fulfills its stated objectives, and is a useful addition to any collection of Mathematica books. However, as it clearly stated on the back cover, some previous experience of Mathematica is recommended.