Working Effectively with Legacy Code, by Michael Feathers, is still my go-to reference, even though it's now ten years old. https://cmdev.com/isbn/0131177052
Michael Feathers' book, Working Effectively with Legacy Code, is highly recommended.
In that book he explains that you can choose between two approaches: Change and pray, or Cover and modify. Then he provides dozens of different strategies to "cover" the existing legacy codes before you make the changes.
I am not sure the above idea is mentioned by Michael Feathers in his amaze book "Working Effectively with Legacy Code" but it is a great idea, and combined with the things that Michael does cover will do you a lot of good!
Reply to bcobb:
I agree that Working Effectively with Legacy Code is great. It's been as revolutionary for our team as The Art of Agile Development.
The big piece that we're missing is how to apply agile practices consistently when our velocity varies so significantly because of legacy code. Feathers' book gave us a long-term path to getting out of that issue, but we're struggling with the planning and communication side of things in the meantime.
Feathers defines legacy code as code without accompanying tests in "Working Effectively with Legacy Code". Even to the point where someone he knows said of a particular shop, "they're writing legacy code, man!"
reply