I would start by spending a week or two wrapping the application in Acceptance tests (cucumber/capybara) just so when you do make a change you are able to quickly find out to a semi decent level of confidence things are ok.
I would also recommend Working Effectively with Legacy Code By Robert C. Martin.
Can't agree more with this. The way you reduce risk when migrating code (especially code you don't fully understand) is to build strong integration and end to end tests.
This will allow you to be more aggressive when replacing crap code with new functionality.
Given this huge mound of code, this process will be quite a drag, but it will pay off in spades in the long run. Trust us.
Comments
I would start by spending a week or two wrapping the application in Acceptance tests (cucumber/capybara) just so when you do make a change you are able to quickly find out to a semi decent level of confidence things are ok.
I would also recommend Working Effectively with Legacy Code By Robert C. Martin.
Good luck!
"Working Effectively with Legacy Code" is by Michael Feathers. http://www.amazon.com/Working-Effectively-Legacy-Michael-Fea...
Can't agree more with this. The way you reduce risk when migrating code (especially code you don't fully understand) is to build strong integration and end to end tests.
This will allow you to be more aggressive when replacing crap code with new functionality.
Given this huge mound of code, this process will be quite a drag, but it will pay off in spades in the long run. Trust us.