Cultivating the Habit of Deleting Code

#56 - Refactoring–The Discipline for Writing Good Code - Christian Clausen

Topic 14 of 18

Published Sep 20, 2021 · Clip 37:02–40:10 (3:08)

Christian argues codebases grow unboundedly with no good solution for removal, making deletion an active but hard-to-justify investment. He links microservices' success to shrinking the 'full code base' each developer faces, and advocates constantly cutting anything not pulling its own weight — documentation, bad tests, even underused features. For deleting others' code, he suggests wrapping legacy systems in a monitoring class to measure usage, using the type system to find call sites, and relying on editors/CI and version control for safety; he deletes comments and dead code constantly after verifying safety.