In a short lightning interview that Ward Cunningham did with with Ron Jeffries and Chet Hendrickson, Chet has this to say about Technical Debt (emphasis mine):
“Our experience has been that by the time you start to notice that the code needs to be cleaned up, you’ve already lost a lot of time because of it, and it’s almost impossible to ever get back to where you were. We actually believe that you can never be as clean by going back a month or a week later and cleaning up than you could if you just cleaned up as you went.”
“By the time you start to notice” is a challenge. You either have to be so clean in your coding practices that you never present yourself with the need to notice problems, or you have to develop your ability to notice problems so that you can spot them sooner. I’ve never seen a team—even one doing TDD and refactoring in earnest—manage to stay completely clean, so it would seem that developing noticing skills, and helping teams develop willpower, is the way to go.