Reputation: 4298
Let's say you're the lucky programmer who inherited a code that is close to software rot. Software rot as defined in Pragmatic Programmer is code that is too ugly (in this case, unrefactored code) it is compared to a broken window that no one wants to fix it and in turn can damage a house and can cause criminals to thrive in that city.
But it is the same code that Joel Spolsky in JoelOnSoftware values in such a way that it contains valuable patches which have been debugged throughout its lifetime (which can look unstructured and ugly).
How would you maintain this?
Upvotes: 2
Views: 416
Reputation: 29657
Welc is a great book. You should certainly check it out. If you don't want to wait for the book arrive, I can summarise the bits I think are important
Upvotes: 2
Reputation: 2275
First, make sure that you have a robust test procedure for it, and that it will actually be tested again in depth, by several people (you, QA, ...).
Then, take some time, day after day, to improve the small parts you have to modify. The key is to have a management that understands "why it takes longer as expected". Explain that you have to do refactoring and that it is important for both short and long term, ask other developers to review the existing code and confirm your arguments.
Upvotes: 0
Reputation: 5685
You can do a few things:
Upvotes: 1
Reputation: 6677
Have a look at Working Effectively with Legacy Code by Michael Feathers. Lots of good advice there.
Upvotes: 6