Feeling masochistic? Want a tactical way to learn how to make frequent & smaller changes to your code base with confidence? Kent Beck of XP fame has a technique he’s tried called test && commit || revert. It’s nuts and horrible. I have to try it.
Here’s how it works:
- write some code and commit it
- if the tests pass, your commit can live
- if the tests fail, your commit is reverted; all the code you wrote is deleted forever and you have to try again.