Programmers are often a very poor judge of productivity. I've seen many Java programmers say they've had a productive day, but then I find they've typed 1001 getters/setters and intricately JavaDoc'd them. This is productive typing practice, but little more. In a similar vein, it's easy to feel productive if you're doing refactoring all day, but what has this actually achieved?
One aspect of TDD that isn't often quoted is that it helps get a concrete measure of productivity (and it's one of the themes of Beck's book). If you can see that today you've knocked out 100 tests, that's some measure of progress. It's a running theme through agile-processes. Small iterations / stories / code changes with measurable outcomes.
Then again writing tests can be just as unproductive as writing getters and setters. Maybe that is one reason that it has become so popular (makes you feel more productive)?
I think the hope is you write one test then write the code to make it pass. In theory the code and tests grow at a similar rate. If one treats the two activities as separate then i think it would be very easy to get caught up in the productive feeling that writing tests gives without receiving a good portion of the benefits.
It seems to me that people's measure of productivity is relative. For a Java programmer, typing in 1001 getters and setters might be quite productive, at least compared to their typical day. For more sophisticated programmers, sure, it sounds like a waste of time, but perhaps that's because they have a higher average productivity.
Maybe writing the JavaDoc helped them think out some design issues? Some of my most productive programming time has been sitting in a park with paper and a pencil. (Not billable, though, sigh.)
One aspect of TDD that isn't often quoted is that it helps get a concrete measure of productivity (and it's one of the themes of Beck's book). If you can see that today you've knocked out 100 tests, that's some measure of progress. It's a running theme through agile-processes. Small iterations / stories / code changes with measurable outcomes.