“I mostly write comments for code I haven’t written yet”

“I mostly write comments for code I haven’t written yet” – @KentBeck

This strikes me as having many of the benefits of TDD without taking so much time or being a distraction from the flow of coding.

It might be very effective to include in these comments notes about how a section of code should be unit tested, almost like tests in pseudocode. If when you write code to handle a corner case, you write pseudotests for it in a comment, you can’t forget to cover those cases in the real tests.