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.
Pingback: Dew Drop - September 21, 2008 | Alvin Ashcraft's Morning Dew