Joshua Wood Web Developer

October 12th, 2020

test && commit || revert

test && commit || revert (TCR) is a new programming workflow introduced by Kent Beck in 2018. In a normal TDD (Test-driven Development) workflow, the goal is to write a failing test before writing the code to make it pass. TCR flips the TDD paradigm upside down, with a twist:

Not only must your tests always pass (on every file save, no less), but if they don’t pass, your code is automatically reverted.

I must admit: when I learned about TCR, I hated the idea. Coming from a TDD background, it’s so counter-intuitive. It’s funny, though, the more I think about my initial reaction, the more I want to try it.