agile_otter on Nostr: I like to say "TDD is continuous design by refactoring." I know that's not ...
I like to say "TDD is continuous design by refactoring."
I know that's not necessarily the image you have in your head, but think about it this way:
A test specifies some invariant.
Any solution that satisfies the invariants is roughly equivalent.
As long as I keep the tests running "green" I can change anything.
I will change the design to be working, unique, simple, clear, easy, developed, and brief.
Since I have tests, I can start refactoring the second the first test turns green - I don't have to wait until I'm finished.
Does this make sense to you?
I know that's not necessarily the image you have in your head, but think about it this way:
A test specifies some invariant.
Any solution that satisfies the invariants is roughly equivalent.
As long as I keep the tests running "green" I can change anything.
I will change the design to be working, unique, simple, clear, easy, developed, and brief.
Since I have tests, I can start refactoring the second the first test turns green - I don't have to wait until I'm finished.
Does this make sense to you?