Changing rarely-touched code

Working Effectively with Legacy Code and AI Coding Assistant - Michael Feathers

Topic 9 of 22

Published Oct 14, 2024 · Clip 26:12–27:53 (1:42)

Michael advises favoring test-supported changes even for code that seems unlikely to change, since its continued existence means it has value and you don't want to make it worse. He acknowledges pragmatism depending on workload but says even attempting to write tests for hard code is a valuable exercise—it builds appreciation for how bad the situation is. He compares the investment decision to how businesses allocate between current and new lines of business, noting there are no easy answers.