What can you do to a legacy codebase that will have the greatest impact on improving the quality?

前端 未结 11 1286
既然无缘
既然无缘 2021-01-30 06:51

As you work in a legacy codebase what will have the greatest impact over time that will improve the quality of the codebase?

  • Remove unused code
  • Remove dup
11条回答
  •  执念已碎
    2021-01-30 07:34

    I'd say it largely depends on what you want to do with the legacy code...

    If it will indefinitely remain in maintenance mode and it's working fine, doing nothing at all is your best bet. "If it ain't broke, don't fix it."

    If it's not working fine, removing the unused code and refactoring the duplicate code will make debugging a lot easier. However, I would only make these changes on the erring code.

    If you plan on version 2.0, add unit tests and clean up the code you will bring forward

提交回复
热议问题