DEV Community

Discussion on: How To Feel Good Deleting “Dead Code”

Collapse
 
dtamai profile image
Daniel Tamai

Once a month, in the last eight months, I've spending the whole day deleting unused code from an ~8 years old codebase. It is an opportunity to learn what makes code easy to change and what makes it really hard to change.

In this case the most helpful tool is metrics: for web stuff I check NewRelic for request count, just to be sure it is zero. I also send a notification to an error tracker when a piece of code that I believe is dead is used.

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

Wonderful! I’m glad to see that other teams are taking a metric-based approach to this. I also use New Relic at work.