One Stilt At A Time
10 May 2013Jon Reid writes in a comment:
“Either you’re coding to get a new test to pass, or you’re refactoring. But don’t do both at the same time. We’re basically walking on stilts: Lift one, or the other, but not both. By keeping one foot grounded, so to speak, we reduce the risk of falling over.”
I wrote the other day that I have previously used “CDD” - “commit driven development” or “change driven development” and I often found that I had feature or bug fix code in with refactoring code to support it. And when git came along I could use GitX very easily to separate that code in the commits. So I’m yet to change my style to be able to stop, refactor as required, and then continue with the feature code. And it seems that that is only really feasible when you’re actually coding just one test at a time, as in this kata.
I’m not there yet, but I’ll press on.