Friday, January 12, 2007

Review: Working Effectively with Legacy Code

I originally posted this review to Amazon. Thought I'd repeat it here. The author, Michael Feathers, is from Object Mentor. Check out their blogs, there's a lot of interesting noise being made over there. (They recently moved the blog from their old site, but the new site has a link to the old stuff.)

Here's a link directly to the book where you can read other reviews. Oh, and I didn't mention it originally in my review, but another big plus to this book is that it's language-agnostic, which is a big deal when legacy code is your issue.

Anywho, here's the review. The punchline is: READ THIS BOOK! It's really excellent.

A more accurate title for this book would have been "Unit Testing and Refactoring is How To Work Effectively with Legacy Code" The book operates entirely from that premise, and only spends a little time trying to sell you on the concept. If you're still struggling with that debate, this book may rub you the wrong way. However, I found it to be intensely practical and found the author repeatedly speaking about scenarios that I run into quite often.

I would describe myself as someone who finds the whole fascination with design patterns a little optimistic and certainly hype-laden. Useful to be familiar with, but nothing to preach about. Feathers' treatment of patterns is exactly what they should be, however -- from the trenches, and goal-oriented. He describes the patterns he uses with the very immediate goal of how they will help you "get code under test" as he would put it, and slowly unwind the spaghetti we all run into.

Although the world didn't need yet another book about unit testing, refactoring, and patterns, there are few books that offer practical advice for the ugly side of software development. To get the most out of this book, you'll need to have slightly better than intermediate experience with object-oriented development, but this is not a hypothetical-scenario type book targeted at gurus. And most importantly, it acknowledges and embraces the fact that we have all inherited reams of code that has either abused and ignored OO principles, or wasn't even OO to begin with. It is quite readable and accessible, and doesn't overwhelm. I found a lot of valuable techniques in here that I have not found anywhere else.

I highly recommend this book, and I'm going to be shoving it down my coworkers' throats. :)

0 comments: