The Essence of Scrum And Test Driven Development

Lately, I asked myself why I like Scrum most. I’m a big fan of Scrum because of a lot of things. So I asked myself: “What is the root cause of all these”.

I tracked it down to two main things:

  1. Focus
  2. Feedback

I’ll come back to that later.

I’m also a big fan of Test Driven Development. Guess what,  I performed a root cause analysis on TDD, too. And once again:

  1. Focus
  2. Feedback

After that, I asked myself: “Are there other things I like with these root causes?”.

Yes there are:

  • Playing Volleyball and Gaming in general: focus on playing (one round after another), feedback (you win or lose)
  • Playing Saxophone: focus on playing (I forget everything else while playing, believe me), feedback (you hear what you play and you either like it or or you try harder)

So it seems, I’m addicted to the Focus-Feedback drug :-O

Okay then let’s have a look at the why and how:

Focus

Scrum gets you focused because during the short period of a sprint, you focus on a very small subset of required features. Only the features selected to be in the sprint backlog are imported now, the rest can wait. Even further, when you pick up a task from the story board then you focus on this task only.

In TDD, you write or modify a single tests and then you focus on get that test working – a very narrow focus.

To keep your focus, you need to be prevented from outside and inside disruption. Scrum gives you that because it does not allow that the sprint backlog is changed during the sprint. If new things come up that have to be done sometime, just put them in the product backlog and go back to your task. In TDD, every time something crosses your mind that would get you lose your focus, write it on the TODO list and forget about it, until later.

Once you can work with a high focus, it gets fun. You will write your code faster, with better external quality (less defects), internal quality (habitability of your code, better design, …) and you’ll be really motivated (remember I’m a focus addict).

Feedback

Scrum establishes several feedback loops:

  • from customer back to the team (Sprint Review, to product increment of sprint)
  • from “tester” to “developer” on every finished story from day one of the project
  • from team member to team member (every day in the Daily Scrum and all the time due to co-location)
  • from team to itself (Sprint Retrospective)

For short: a lot of feedback in short cycles.

TDD gives you some feedback loops, too:

  • is the test green (every time you run the test suite, about every 2 minutes)
  • is it possible to use the code I wrote (you use it yourself in your test code)
  • do I like the interface of my code (you use it yourself in your test code)

Very imported for both Scrum and TDD is that the feedback loops are very short. Only short cycles allow you to improve the way you work without a lot of cost and pain. And only a short feedback loop enables a learning effect.

Finally, the benefit of all these feedback loops is quite simple: you get your project running quicker, with higher quality and keep on track to the goal.

Enough for now, I’ve to get some focus and feedback…

About the author

Urs Enzler

2 comments

By Urs Enzler

Recent Posts