Fear, Courage and Tests
During our end-of-iteration meeting today, we discussed a task I’m working on, say, for the 3rd or 4th iteration now. Originally I paired on this task, then worked alone, then paired again with another person. This was not done continuously, obviously. (By the way, I’ve managed to progress much better with a pair). And the task is complex. Luckily we have lots of tests to see if things get broken when we try to insert a new component in. And the last couple of times I went back there was to make sure all of the tests pass.
So how come we’re not finished yet?
Could it be fear?
Lior suggested that as an option today. Fear of fiddling with the code too much. "But what are your tests for?" you may say and you would be correct. Tests supply a safety net, and a confidence builder. Which is great, because without this feedback, we wouldn’t know where we stand.
But let’s look at it another way: most of time spent on this task is fixing a couple of tests, watch them pass, and then watch others fail. It is very exhausting mentally as time goes by. We see progress, but convergence towards stability is slow. And I admit to losing confidence in changing code, just because it may break tests that are now passing.
Tests should give us courage. We need to remember that they are not there to cripple our progress, but help us move forward.
And Lior’s courage is going to be tested next, since he’s my next (and, hopefully, last ) pair for the task.