Thump Thump Thump Thump. Red Green Refactor Integrate.
Those of you who’ve experienced the Industrial Logic eLearning series have even heard me intone those words, with appropriate gravitas, as a voice-over. (It was my debut screencast, you know. Shouts out to my IL peeps!)
The Four-Beat Cycle
The microtesting cycle is absolutely fundamental, so much so I’m going to repeat the four parts, even though I’m sure everyone who’s reading this blog already knows them:
- RED: We write a microtest that fails because the code isn’t (yet) there to make it pass.
- GREEN: We put the code in that makes it pass.
- REFACTOR: We change the design until it is as simple and clear as we can make it.
- INTEGRATE: We commit our changes, including the new microtest(s), to the source vault.
Is Four Beats Enough?
No. And also, yes.
The four beats are an overarching structure. That structure can contain a thousand thousand variations.
In the clip below, the rather gifted jack of all trades, Ruben Blades, sings the lovely song Patria, which has a very fine lyric. The video is just a standard “pretend it’s fair use mp3 by having a video” video. Just close your eyes and listen to the rhythms. High quality sound system recommended.
So Why Does Rhythm Matter?
I don’t know. It just does.
The interwebs is a very large collection of tubes, and you can browse for days before you run out of either definitions of rhythm or explanations of its significance. I got tired.
Anyway, my best explanation is in the sounds above.
A Part Of TDD’s Magic Is That It Beats A Rhythm
(Extra credit: How does today’s magic, rhythm, relate
to yesterday’s magic, profluence. Show your work.)