Slow Feedback Cycles

In his keynote ‘Fast Feedback Teams’ Ola Ellnestam (at the Agile Testing Days 2012) talked about the importance of fast feedback and how to shorten the cycle durations. To me, there seems to be a trend in focussing on getting feedback in shorter and shorter cycles.

While I completely agree that in many cases it takes too long to notice the effect of a change made earlier, I am also a little bit worried that we (as software developing teams and companies) might forget about  slow feedback cycles. Let me explain.

Feedback loops

Let’s look at aspects of feedback loops. There is an actor to change the system operation as well as a sensor that reads some information. In order to actually be a feedback loop, the sensor is driving the actor.

Note that most systems allow data to be read at any time and (essentially) any frequency. However systems usually also do not immediately respond to changed input. Here’s an example: You could read a thermometer in your room as often as you like. And you can also turn the control of the heater up or down pretty often and yet the room temperature will not change immediately.

Usually there is no point in acting a whole lot faster than the system can react. If it takes ½ an hour for the room temperature to adapt to a newly set value, reading the thermometer and changing the control every minute doesn’t make much sense.

Some waste and some risk

Now, with the focus on short time scales and a high frequency of the measurements (no matter wether they are qualitative or quantitative), I can imagine two undesirable outcomes:

  1. In a situation where the system reacts slowly to changing parameters, measuring often is waste. This is because the system couldn’t possibly yield another outcome (yet).
  2. If we only measure with a rather coarse-grained way (e.g. only the values red, yellow, green), we might miss a slow trend. (I guess this is the reason we often suddenly must buy winter tires, even though we clearly noticed that the temperatures decreased over the past weeks and we’re wearing our long sleeved shirts and anoraks too.)

That said, if the system reacts fast on a change and we can get the feedback quickly, it’s very likely a good idea to actually get that feedback. A good example for this case: Having fast unit tests in programming. 🙂

TDD and Manually Solving Tasks

Uncle Bob Martin recently wrote “Why is estimating so hard?”. Among other things, the article explains the difference between manually doing a task (in this case breaking a text into lines of a certain maximum length) and actually writing the program to do it.

The way (many) humans do this is by trial & error, as Uncle Bob says:

Why was it so hard to write down the procedure for doing something so basic and intuitive?

Answer: Because when we do it manually, we don’t follow a procedure. What we do instead it continuously evaluate the output and adjust it until it’s right.

In an earlier article (on of before 7. Oct. 2005) “The Three Laws of TDD” Uncle Bob described three rules (or laws) of TDD:

Over the years I have come to describe Test Driven Development in terms of three simple rules. They are:

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

The similarity between these three rules and the non-procedural way used for manual tasks surprises me: Is it possible that the TDD-way of writing software works so well, because it models the way we approach manually solving problems? Thinking of it, my first reaction is this: Sure, writing code (whether test-driven or not) is the manual work of solving some problem. So far, there’s not much news here.

But then, there seems to be more to it… To me, it is fascinating to think about the ‘meta level’ of what we’re looking at: Code writing is the manual, sapient way of creating a procedure to solve some problem. It is neither automated nor do we have a process or procedure for this kind of work.

To me TDD is an aid, a technique to help me write code in a more methodical and disciplined way. It is not at all a step to make software development more mechanical or predictable.

This brings me back to the starting point of this post: Estimating. It’s hard to predict a complex system like software development, where humans do creative work on hard problems, trying to find the solutions to problems they have not solved before. This is hard (and to me fun) work.

Should it ever turn out that there’s an easy way to (reasonably) correctly estimate it, I will be very surprised.

%d bloggers like this: