|
 |
Chambers wrote:
> Personally, I prefer PbC, as it minimizes side-effects.
>
> With TDD, the whole point of programming is to get it to pass the tests.
> When I first read about it, they even gave this example (pseudocode):
>
> Test:
> add(3,5)=8
>
> add(a,b)
> return 8
>
> It passes the test, so TDD assumes that the function is correct. This,
That's really pathetic.
I've never read a book on it, so I don't know if a true believer really
would do that. What I've read is that the first task after writing the
test (and yes, they did encourage multiple cases) is to write a
_correct_ algorithm, but not worry about efficiency. Once it is correct
(i.e. passes all test cases), you can start optimizing it - running the
tests each time you optimize to make sure you didn't break something.
--
Dopeler effect: The tendency of stupid ideas to seem smarter when they
come at you rapidly.
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawaz org<<<<<<
anl
Post a reply to this message
|
 |