Why do you need to delete unused code?
Why do you need to delete unused code?
For anyone new working on a project, they not only have to understand the working code, they have to understand unused material also. This is wasted time and creates confusion. There is a danger that at sometime someone will make a change which inadvertently involve the ‘dormant’ code and can introduce bugs.
What happens when unused code is added to the codebase?
What happens over time is that more and more old unused code is added to the codebase. This increases the confusion, potential misunderstanding and administrative overhead. The chances that the unused code will ever be used again is very unlikely. With time that possibility of re-use diminishes.
What are the pros and cons of deleting code?
This increases the confusion, potential misunderstanding and administrative overhead. The chances that the unused code will ever be used again is very unlikely. With time that possibility of re-use diminishes. If code is to be removed and is considered important enough then the code can be branched off and documented.
For anyone new working on a project, they not only have to understand the working code, they have to understand unused material also. This is wasted time and creates confusion. There is a danger that at sometime someone will make a change which inadvertently involve the ‘dormant’ code and can introduce bugs.
What happens over time is that more and more old unused code is added to the codebase. This increases the confusion, potential misunderstanding and administrative overhead. The chances that the unused code will ever be used again is very unlikely. With time that possibility of re-use diminishes.
This increases the confusion, potential misunderstanding and administrative overhead. The chances that the unused code will ever be used again is very unlikely. With time that possibility of re-use diminishes. If code is to be removed and is considered important enough then the code can be branched off and documented.