Competent programmers can maintain other people's code, those who cannot want to re-write everything. Train wreck in progress. Run from these people, or fire them if you're in a position to do so.
Competent programmers can maintain other people's code, those who cannot want to re-write everything. Train wreck in progress. Run from these people, or fire them if you're in a position to do so.
I'm talking 40, 2000 LoC files that all called the database whenever they felt like it, all echoed out data and modifed each other in wierd ways.
I spent about two weeks trying to untangle the mess and threw the towerl in at day 15. We just rewrote it using a PHP framework that not only let us query the database using a sane ORM, but also gave the project STRUCTURE and added mantainability value.
Sometimes a rewrite is the best cure. ;)
Probably why most big companies have such a horrible time getting good people to work for them: who really wants to work in a place like that if you have options somewhere else?
But then again, sometimes, the problem is just that the legacy code is shit. In a project last year, for instance, I had to rewrite every class I touched; the whole thing was so fragile that it was impossible to change anything without the rest breaking. So, I did this “incrementally” rather than all at once, and factored this into the cost of the features I was implementing for the client.
Legacy systems have gone through so many fixes and shifts that it's almost impossible to recreate them without deep understanding of the business demands it meets.
The business part, I would say, is critical to being able to maintain (or re-write) a project.