Techniques for tackling legacy code

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

Topic 6 of 22

Published Oct 14, 2024 · Clip 17:34–20:04 (2:30)

Michael outlines his core approach: figure out exactly where changes are needed and move outward, evaluating what tests would be needed at each candidate location and crawling the dependency tree upward. Since untested code often can't accommodate tests, dependency-breaking work is required—which is the main content of his book. At the macro level, he stresses you'll never have complete tests unless you started that way; living in a limbo of uneven coverage is normal, and tests placed where you change now pay off quickly later.