This nicely describes the process and some advantages of TDD. I think it skates over what repels some programmers: the amount of ceremony and typing in that process. If you want to hack something up quick you aren't going to start by typing up
object MiddleOutNumberSorterSpec extends Specification with ScalaCheck {
"MiddleOutNumberSorter" should {
"reject even number counts and throw an exception" in { }
"return a list of the same length as the count specified" in { }
"produce 3 numbers in the correct order" in { }
"produce 5 numbers in the correct order" in { }
"produce 15 numbers in the correct order" in { }
}
}
A friend of mine basically quit his job over this issue at a TDD-only startup, so he said. I need to write up a post about what I do instead.
(To be fair, in classical TDD you only write one test to start.)