With conventional TDD, you write a failing test, get it to pass, then refactor.
Then run the tests again to make sure your refactoring didn't break anything.
But what if it did break something?
Kent Beck has been recommending to commit your code to revision control after every green test run.
Oddmund Strømme suggested a symmetrical idea to go ahead and revert the code when a test fails.
Kent writes that he hated the idea, but had to try it.
Then wrote about it last September.
And now we have TCR, "(test && commit) || revert".
What's it feel like to actually do this?
Well, Thomas Deniffel has been using it since about a month after that article came out.
In this episode, we'll hear from Thomas about his experience with it.
It's a fascinating idea. Have a listen and let me know what you think.
Special Guest: Thomas Deniffel.
Sponsored By:
- PyCharm Professional: Try PyCharm Pro for an extended 4 month trial before deciding which version you need. If you value your time, you owe it to yourself to try PyCharm. Promo Code: TESTANDCODE22
Links:
- test && commit || revert — Kent Beck's original article
- TCR: (test && commit || revert). How to use? Alternative to TDD? — Thomas Deniffel's article
- TCR Variants (test && commit || revert)
- TCR: A pulverizer for coding tasks — Another interesting opinion from someone else trying TCR - Jason Crawford
- (test && commit || revert) Questions Answered — Written after this interview.
03/13/19 • 38 min
Generate a badge
Get a badge for your website that links back to this episode
<a href="https://goodpods.com/podcasts/test-and-code-41514/68-test-and-and-commit-revert-tcr-thomas-deniffel-1949929"> <img src="https://storage.googleapis.com/goodpods-images-bucket/badges/generic-badge-1.svg" alt="listen to 68: test && commit || revert (tcr) - thomas deniffel on goodpods" style="width: 225px" /> </a>
Copy