4 ms·
No. I have inherited code that is very difficult to understand, though. What typically happens is that it is mostly left alone. As the years go by, small chang
by hnruss 8y ago
No. I have inherited code that is very difficult to understand, though.
What typically happens is that it is mostly left alone. As the years go by, small changes are be made, only making the situation worse. Developers occasionally offer to management to take the time to refactor it, but management refuses to prioritize that work.
Eventually, new requirements are drafted that the existing code simply cannot meet without first refactoring it. At this point, the development team has the unfortunate responsibility to inform management that making the existing code meet the new requirements will actually take more time than rewriting the whole thing from scratch. The technical debt is now due.
The development team then hopes that the situation provided a learning experience for management regarding code maintenance.
- ironmagma 8y agoInteresting that this is the conclusion you've come to, because I've heard from some colleagues that this is actually the correct approach for management to take. Their argument would be that either way, to accommodate the new functionality, the codebase would have to be refactored. And if it is refactored proactively, well that will probably be in a way not compatible with the future design, because you can't anticipate something you know nothing about. So it's a matter of 1 vs 2 refactors, and the management chose one by delaying as long as possible.