TDD is BS?
Szymon Gatner
noemail at gmail.com
Wed Jun 19 15:55:20 PDT 2013
On Wednesday, 19 June 2013 at 22:35:11 UTC, Jonathan M Davis
wrote:
> On Thursday, June 20, 2013 00:15:50 Szymon Gatner wrote:
>> Writing the test before writing the function is exactly the
>> point
>> of TDD.
>
> And that's precisely what I disagree with. I will _never_
> function that way.
>
>> It forces you to think about parameters it should take
>> and value(s) it should return first.
>
> Which you should be doing anyway. That's part of designing the
> class of
> function. I don't need tests to do that. The tests are to
> verify that what I
> wrote work correctly. That's it.
Thing is TDD enforces such thinking. You are experienced
programmer and you probably can figure out good API and proper
implementation fast but young programmers can't. TDD forces them
to came up with simple designs because otherwise they would not
be able to pass own test!
Truth is it is not only about young inexperienced programmers.
There are awesome implementation programmers out there. They will
squeeze last bit of power from the cpu in tight loop but just
can't seem to organize their code so that it is reusable. TDD is
suppose to help them too.
>
> So, I think that it's clear that I will never agree with TDD.
> If someone else
> wants to code that way, and it works for them, great, but it's
> not how I want
> to function.
>
Anyway perfectly understandable POV. TDD is just a methodology. I
myself not too long ago though it was *eghm* stupid to say the
least. Why would I write the code entirely other way I was doing
it until now? I am new to TDD but I must say I think it works for
me. I am not ashamed to admit I am not to good in designing high
level pieces of code. I know how to implement stuff but
weeks/months later when requirements change I am always
struggling with what i've done. Finally I see reusable pieces of
code that I know I will be using in other possibly completely
unrelated projects. Maybe TDD is just for stupid ppl like me? :P
More information about the Digitalmars-d
mailing list