Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Over time it’s common for applications and libraries to accrete code which is not exercised as part of the application. This is what we call dead code.

It’s important from a quality and maintenance standpoint to eliminate dead code. Code which isn’t actually used obfuscates what code is a valid part of the application and so it increases the cognitive load for other programmers to read and understand how our applications work.

Dead code is much more likely to happen if attention isn’t given to separation of concerns. If lots of functions get lumped into large files with lots of code it becomes much harder to spot code which is not being used. Breaking code into smaller files makes it easier to find relevant code and spot code which isn’t being used. Code that can be removed then makes it easier for everyone in the team to understand and read the code by not wasting time on code which isn’t used.


  • No labels