New: Book Report: Working Effectively with Legacy Code

This book is a classic amongst computer programmers. Well, it's a four-year old classic. It captures the, uhm, zeitg^W movement towards unit testing and refactoring. It shares a problem with other classics: you've already heard its message, heard it from other sources.

Legacy code is scary. Within it lurk strange pieces of code. You look at a piece of code, a piece of code that had a purpose once. But that code has been changed over the years; now it has three purposes, each of which it kinda half-does by working with some other pieces of code which you wouldn't expect to be related. One way to deal with this is by surrounding the strange code with unit tests. Now if someone changes some code that alters behavior, you get an early warning. Blah blah blah.

He also lists a bunch of refactorings useful for making code quickly & easily testable. The first few of these in the list--I'd already heard of them. So I kinda zoned out for the rest of this part of the book.

Labels: , ,

Posted 2008-12-21

 Robert Konigsberg said...

Having read this book as part of a reading group, I sympathize. We all felt it was interesting to a point, that it didn't generate much in the way of conversation, and discussions eventually devolved to arguing about the version control system.

21 December, 2008 16:17