It seems like when people talk about inheriting a bad codebase people often mention: spaghetti code, not making use of language patterns like inheritance/interfaces/modules/etc, no or bad documentation.
To be honest, besides the documentation thing idgaf about stuff like this. If the code works it works and I can still fix or improve it slowly over time incrementally. What I care about instead:
- Obscure libraries or dependencies. I have seen this so often that old code uses obscure dependencies without updates since 5y when it could have used apache or pandas or stuff. When there are bugs or security problems here refactoring
- No or few unit tests. Refactoring code is hard when I can't be sure about all cases and exceptions. If you work on something with inexperienced or bad programmers - please tell them to write more effing tests instead of "pretty" code
- Non-migratable custom stuff. If your program absolutely needs a custom build pipeline (I hate this concept in general but idk not here to judge, maybe you need it) at least choose something that can be migrated to a new technology in 10 years. e.g. Javascript build script or bash yes - some weird building.xml file that only works in eclipse no no no
What are your thoughts on this subject? Ever inherited a 10yo codebase that seemed like a black hole? Ever had to refactor spaghetti code? Disagree with me which of these is the worst or doesn't matter?