Dr. Dobb's Journal May 2002
If you were to judge by shelfspace, you'd think that computing was awash with useful information about exciting new technologies. In fact, many of the dead trees in your local bookstore just rehash vendors' documentation, or are the dozen'th "me too" presentation of this week's hot topic.
It is therefore a pleasure to review a couple of books that are both original and useful. The first is Richard Hightower and Nicholas Lesiecki's Java Tools for Extreme Programming, which describes five new Open-Source Java programming tools. One of these, Ant, replaces UNIX's venerable tab-indented makefiles with an XML description of how files depend on each other, and what to do to rebuild them. While Ant doesn't address Make's biggest weaknesses (its poor readability, and lack of a debugger), it is more flexible and makes it easy for programmers to process build descriptions in other ways.
The other four tools support various kinds of testing, from simple unit tests (JUnit) to full-blown integration and performance testing (Cactus, HttpUnit, and JMeter). As well as being useful in their own right, these tools are proof that Open Source is outgrowing its naïve "fix what you find" attitude, and taking quality assurance seriously.
Java Tools is readable and well organized, although you'd better know your way around Enterprise JavaBeans and related technologies before you crack the covers. As a bonus, the authors show how to use these tools together; for example, how to automate reexecution of JUnit tests using Ant. They also include lots of pointers to online resources, and comment on such things as which IDEs these tools are integrated with. My only real criticism is with the book's production: Several of the examples are missing a line or two, and some of the diagrams are fuzzy.
The second of this month's winners is David Bourg's Physics for Game Developers. As the title suggests, the book summarizes those bits of freshman and sophomore physics that are relevant to the design of action games. Want to know what happens when a hovercraft glances off the side of a building? Bourg explains the physics involved, and provides chunks of well-commented code to get your simulation started. Need to figure out the stall speed for a small plane? Bourg analyzes some simple approximations, along with their associated fudge factors. While it is definitely not for the math averse (the first integral sign appears on page 6), PGD is clear, concise, and beautifully produced.
Last, and unfortunately least, is Matt Telles and Yuan Hsieh's The Science of Debugging. At first glance, I expected to enjoy it at least as much as I enjoyed Java Tools. Like most professional programmers, I spend more time finding and fixing bugs than I do writing new code. And, like most of my peers, I had to teach myself how to do this on my own: There was no "Debugging 101" when I was an undergraduate, and none of the books I've read on compilers, graphics, or network programming talk in any detail about how to diagnose and fix errors. I therefore hoped that The Science of Debugging would be something I could give to junior developers so that they wouldn't have to recapitulate my trials and errors.
Unfortunately, The Science of Debugging isn't that book. It does contain some useful information, such as famous bugs in history, a taxonomy of debugging techniques, and what you should do after you've fixed the bug. (Answer: Look for more like it.) However, much of the presentation is couched in very general terms, so that if you don't already know what they're talking about, you'll have a hard time relating what they say to your day-to-day work.
My single biggest complaint about this book is what it doesn't cover. On page 195, the authors say:
Using the debugger is not really an appropriate topic for this book. Individual debuggers include directions for using them, and you will certainly find a plethora of books that discuss how to use various debuggers on various platforms to do your job.
Huh? I can understand the authors not wanting to write a reference manual for GDB, but symbolic debuggers are the most effective bug-bashing tools around. Knowing how to use them properly is one of the things that distinguishes amateur programmers from professionals, and is certainly an appropriate topic for a book on this subject.
DDJ