[SciPy-Dev] scipy.stats

Matthew Brett matthew.brett@gmail....
Wed Jun 2 18:34:34 CDT 2010


> The other thing that helped reconcile me to this style of development
> was figuring out how to make testing less of a chore. Personally, I
> can't deal with TDD -- I don't understand how people know what the API
> should look like (to write the test) until they've written the
> implementation!

I just thought I'd pitch in with this one, because there can be
confusion between writing code with tests, and
test-driven-development.    My understanding is that there is good
objective evidence that test-driven-development improves code quality,
but it takes a lot of discipline until you are used to it.  In my
experience it's most important precisely for defining the API,
because, in writing the tests, you start defining what the API will
look like, and then I find that my API is pretty bad and I change it
before I've written the code.

But - if TDD is an ideal - it is of course a matter of personal
practice.  But - having tests for your code - developed before, after,
or during your code - that's really important for having maintainable
code - as I'm sure we all agree.  And - yes - absolutely - if you are
doing _any_ kind of testing when developing, please do check that in,
even if that's all you've got - at least it's something,

Thanks a lot,


More information about the SciPy-Dev mailing list