
AI for legacy code understanding

Working Effectively with Legacy Code and AI Coding Assistant - Michael Feathers
Topic 10 of 22
Published Oct 14, 2024 · Clip 27:53–32:48 (4:55)
Michael discusses using AI for legacy code: despite hallucination, AI is valuable for exploring alternatives—asking for three ways of doing something and comparing them—and for easily verifiable tasks like API questions. He describes his 'lensing' technique of interrogating a giant class about its responsibilities and scaling the list up and down to understand it and get refactoring ideas. He addresses whether AI creates more legacy code, citing the GitClear report on increased code churn, and notes AI shifts the balance toward writing being easier than understanding. He sees AI-written characterization tests as powerful since passing tests document real behavior, and says tests can be disposable and temporary.