Kent Beck’s Novel Approach to Software Quality: test && commit || revert

Home » Blog » Software » Kent Beck’s Novel Approach to Software Quality: test && commit || revert

Leider ist der Eintrag nur auf English verfügbar.

In a Hanselminutes episode from December last year I heard preeminent programmer and agile advocate Kent Beck talk about his intriguing approach to creating working, high-quality code. In line with the steps this approach involves he calls it test && commit || revert.

In lieu of the TDD circle of life (write test – test fails – write code – test passes – refactor – test fails …) test && commit || revert has you commit each time when after a code change your unit tests still pass. If they don’t you have to revert your changes and start afresh.

While this idea might sound counterintuitive at first, it not only helps with making sure that you only ever commit working code but in a “Zen mind, beginner’s mind.” it can provide the additional benefit of urging you to discard preconceived notions and approach the problem at hand from a fresh perspective. Additionally, this technique will motivate you to work in smaller increments, which is beneficial to both faster delivery and reducing the impact and therefore risk a particular code change has.

About the author: Bjoern
Independent IT consultant, entrepreneur

Leave a Comment

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)