TDD is BS?

w0rp devw0rp at gmail.com
Thu Jun 20 00:27:31 PDT 2013


The only time I ever did TDD was when I had to implement a really
specific set of number and date format strings for a company,
because the users were used to them. It was pretty natural for
that. This format string x must take number y, and yield the
string result z. Write a bunch of tests for those, take a step
back, implement the format strings how you think they should
work, and see if the tests pass.

Unless I'm doing really specific "this input yields precisely
this output" stuff, I won't ever bother with TDD. I often end up
with "Test a little bit after" design.

I think his point in the talk about objects taking on roles might
map nicely to the way ranges were implemented. A object doesn't
behave as a range because it inherits an interface, it behaves
that way because it has the right stuff for it. Essentially, I
think he's getting close to saying "statically-checked duck
typing." Like all things, this is good *some of the time.*


More information about the Digitalmars-d mailing list