Recommended Books: Working Effectively With Legacy Code

2 commentsWritten on September 20th, 2008 by
Categories: Books

Just finished reading Michael Feathers' Working Effectively With Legacy Code. The book's main purpose is to teach you a lot of tricks on how to improve the testability of legacy code. As Feathers himself says, this book will not teach you how to go from bad legacy code to beautiful code in one go. That's not even possible anyway, unless you start rewriting the legacy code. Instead, this book shows how you can take small incremental steps to get your code into a solid test harness which will then allow you to start refactoring to good code more safely.

The book is divided in 3 parts. The first discusses the mechanics of making changes in code. The second part consists of very conveniently titled chapters that discuss common problems when changing legacy code. Chapters with titles like "I don't have much time and i have to change it", "How do I add a feature", "I need to make a change, what methods should I test?", "Dependencies on libraries are killing me", etc... You can quickly look at the table of contents and find the right chapter to help you with the problem you're facing at that time. The third part of the book contains a series of dependency breaking techniques that are referenced throughout the book.

If you are working on a legacy code base, do yourself a favor and get this book. Put it next to your keyboard, and use it everyday. You won't regret it.

  • http://grantpalin.com Grant Palin

    I’m still partway through this book, but it is a good read so far. The techniques presented make sense, and I know some of them will be useful for one of my “legacy” projects – Extract Interface in particular. I agree that the chapter titles are themselves very useful, as it’s a way to quickly get an idea of what is covered. I have also flipped through the reference section at the back, and think it will be used often.

  • Pingback: Dew Drop - September 21, 2008 | Alvin Ashcraft's Morning Dew