POV-Ray : Newsgroups : povray.off-topic : TDD vs PbC : Re: TDD vs PbC Server Time
6 Sep 2024 03:16:25 EDT (-0400)
  Re: TDD vs PbC  
From: clipka
Date: 1 Mar 2009 23:25:00
Message: <web.49ab5f803af223f8d7e11e890@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Not TDD. TDD is "the test is the specification." If it passes the test, you
> don't change anything, and if it doesn't, it's broken by definition.

To me, that seems like a *very* stupid way to design your code.

I'm really a fan of PbC; when I need to implement some rather complex unit, I
seem to be automatically going for this approach - and it leads me to very
robust interfaces, because in addition to how each side *must* or *may* behave,
I start thinking separately about how the other side may actually *expect* it to
behave. Thus, between one side's obligations and the other side's expectations I
get some room for maneuver for later changes or fault-tolerance.

I have found that in complex systems, it's all about well-defined interfaces. If
your interfaces are poor, the best unit implementations will get you nowhere.
You will get all kinds of poorly understood errors, because of race conditions
or deadlocks between units, or other such crap, often being sporadic and
timing-dependent, and therefore both hard to notice in the first place, and
hard to hunt down.

Yeah, module testing is a good thing, but specifying interfaces by virtue of
test cases... yuck!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.