I stumbled over a new concept the other day. As it was conceived by Kent Beck, that inspired and thought me a lot in the past, I got interesting.
I have updated this to modern tools here
[UPDATED]
I read Kent’s blog post a bit too fast and missed that this idea was actually proposed by Oddmund Strømmer. Very sorry that I missed that in my writeup, Oddmund. Thanks for correcting me, Raquel.
And after some even more research the origins seems to be traced back to a group of people that took a workshop with Kent Beck. Not only Oddmund Strømmer but also Lars Barlindhaug and Ole Tjensvoll Johannessen. Those Norwegians… always a few steps ahead of me.
[BACK TO THE OLD TEXT]
When I read his blog post I got to this quote:
I hated the idea so I had to try it.
I felt the same actually and now I’ve tried it. I was so provoked by it so I had to try it.
The idea is pretty simple:
The full command then is test && commit || revert. If the tests fail, then the code goes back to the state where the tests last passed.
In this blog post, I have documented my complete workflow in getting this up and running and trying it out on a simple kata. The post became pretty long but is hopefully easy to follow.