Updates

Latest Tweet



What's New?

Check out for latest innovation, a computer based training video collection


Like this Page

Software Exorcism: A Handbook for Debugging and Optimizing Legacy Code Review by J. Leahy

A good book, but not a great one.

Bill Blunden is clearly an experienced maintenance programmer. He is also someone who has clearly worked in the snake-pit of the commercial world. He has a lot to say on how to approach the maintenance of legacy code. He is right on the money when comparing the debugging process to the use of the scientific method, although I think, for the benefit of those new to the idea, he could have gone into greater depth on how experiments should be constructed. (Basically, you've got to know what the results mean BEFORE you run the experiment.) Also, he is correct in his advice on when to optimize software: only after you've used a profiling tool to identify the bottlenecks. In my experience, humans are bad at guessing where the bottlenecks are; let the computer do it.

If you've been sensing a "but" coming, here it is: he seems to have stopped paying attention to developments in C++ sometime in the mid-90's. Of the sins committed in his C++ examples (of fixes, not of bad code) are: failure to use the C++ standard library, throwing pointers to exceptions, not deriving exceptions from std::exception and failing to use the built-in bool type in favor of C-style TRUE and FALSE. Also, most of the techniques he mentions in he section on CPU optimization are things that optimizing compilers have done since the early 80's (or earlier).

The strength of this book is in the sections on debugging and dealing with legacy code. He deals well with the political side of this profession. I have not seen this dealt with elsewhere. Less useful are the sections on the techniques of optimization.

He calls software engineering a "young man's game" because the efforts required to keep up with the latest fads in software becomes prohibitive after a while; all those new kids just out of school will already know this stuff and will work for less to boot. I am a professional software engineer. I have a long experience with software maintenance. Like any professional, I feel that it's part of the job to keep up with current practice. Does that mean following every fad? No. It does mean learning about those things that have survived fad-dom. That's why I bought this book.