Code Smell 54 - Anchor Boats
Code is there. Just in case. We might need it soon.
Remove dead code.
Leave covered and real tested code.
Using some mutation testing variants we can remove the dead code and see it test fails.
We need to have good coverage to rely on this solution.
Dead code is always a problem.
We can use modern development techniques like TDD to ensure all code is alive.
Thanks to Apoorv Tyagi for pointing this out.
It is very hard to predict, especially the future.
This article is part of the CodeSmell Series.