Vladimir_Nesov comments on Coding Rationally - Test Driven Development - Less Wrong

25 Post author: DSimon 01 October 2010 03:20PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (82)

You are viewing a single comment's thread. Show more comments above.

Comment author: Vladimir_Nesov 03 October 2010 01:36:21PM *  1 point [-]

I agree with this argument, but note that you could write some tests as instructions for human testers. If it's the style of development that's the more important output of TDD for you and not regression tests, you could run those human tests yourself, and discard them afterwards. The discipline is still useful.

Comment author: Morendil 03 October 2010 04:18:32PM 1 point [-]

You're both losing me, I'm afraid. I wasn't parsing cousin_it's argument as saying "it's the style of development that's the more important output of TDD". How do you get that?

I'll agree that a style of development can be useful in and of itself. The style of development that tends to be useful is one where complex behaviour is composed out of smaller and simpler elements of behaviour, in such a way that it is easy to ascertain the correctness not only of the components but also of the whole.

So we have one question here amenable to empirical inquiry: does the approach known as TDD in fact lead to the style of development outlined above?

But it also seems to me that a suite of tests is a useful thing to have in many circumstances. The empirical question here is, does having a comprehensive test suite in fact yield a practical benefit, if so on which dimensions, and at what cost?

If the tests are of the kind that can be automated, then I see little benefit in having human testers manually follow the same instructions. The outcome is the same - possibly detecting a new defect - but the cost is a million times the cost of computer execution. The main cost of automation is the cost of thinking about the tests, not the cost of typing them in so a computer can run them. So ex hypothesi that cost is incurred anyway.