POV-Ray : Newsgroups : povray.off-topic : TDD vs PbC : Re: TDD vs PbC Server Time
6 Sep 2024 09:18:10 EDT (-0400)
  Re: TDD vs PbC  
From: Mueen Nawaz
Date: 2 Mar 2009 11:43:05
Message: <49ac0c99@news.povray.org>
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] nawazorg<<<<<<
                                   anl


Post a reply to this message

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