Heartened by the glowing reviews I bough this book from Amazon. After --reading-- the first half of the book, and studying the examples, I was disappointed at the hastily written, and unproofed examples such as :
Page 18
<list>
<product> (Content deleted ....)
<product> <--------- This should be </product>
<list> <---------- This should be </list>
At first I thought an editor had 'corrected' these examples, however there are other places: Chapter 5 Page 115, QuadTreeViewer.Java
// Ask the creator to make a quadtree out of an XML file
try {
Quadtree myTree = myDirector.readFromXMLFile("filename");
}
catch (CreationException e){
System.out.println ("Unable to create quadtree from " +
filename);
}
Note readFromXMLFile("filename") is clearly a bug. If I can't trust an author to check to make sure a program is correct, how can I trust that he has verified that what he says is correct? I checked on his CD and the source code was the same. There are automated tools out there for making sure programs inside of document compile, and are tested,so there are just no excuses. One author I rely on is Bruce Eckel. He has an engaging writing style and automated tools to assure that code compiles, and JUnit tested. There are other gripes like missing files on the CD, etc.
The author did have a good section about good design patterns to use when working with SAX, and common pitfalls.
Since the author doesn't credit anyone in the introduction I assume that it had very little technical review, and it shows. I will continue using this book as a occasional reference. Also note that the webb site listed for errants has been deactivated.
70% of the work is completed in 30% of the time. Because of the may mistakes in the examples, I wouldn't recommend this book for beginners, look else where. For the intermediate programmer who can quickly spot the many code/technical mistakes I would say go to your local book store and personally browse this book BEFORE buying it.