[TIP] testing: why bother?
C. Titus Brown
ctb at msu.edu
Wed Mar 23 09:15:29 PDT 2011
On Wed, Mar 23, 2011 at 11:14:16AM -0500, Kumar McMillan wrote:
> On Wed, Mar 23, 2011 at 10:16 AM, Michael Foord
> <michael at voidspace.org.uk> wrote:
> > TDD isn't really that hard. It does require, impose, a change in thinking
> > (which is why Titus is so suspicious) but the actual process is simple
> > enough.
> >
> > The "Advantages" section of Jonathan Hartley's excellent presentation on TDD
> > provide some good pithy reasons to test (particularly but not solely reasons
> > to do TDD):
>
> I have tried TDD but it feels more natural for me to commence most
> *new* projects or *hard* problems with a prototyping phase where I
> hack code without any tests just to get it to work. Afterwards, I
> usually throw away a lot of that code and rewrite/restructure using a
> TDD approach. For small changes, bug fixes, or easy problems I always
> use TDD. The prototyping phase is risky but it's faster, easier, and
> less wasteful (for example, you don't have irrelevant tests laying
> around).
"Accumulating technical debt" is a perfectly viable strategy sometimes :).
(At least neither you nor I has deployed mock in production code, Kumar.)
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the testing-in-python
mailing list