Re: TDD and private classes/usercontrols

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Simon Woods" <simonjwoods@xxxxxxxxxxx> wrote in message
news:uxOzUMQfIHA.5164@xxxxxxxxxxxxxxxxxxxxxxx
Steve Gerrard wrote:
Ralph wrote:
Adherents to TDD would violently disagree with "For many tasks,
though, there is no independent test of the results." <g>

I'm sure they would. Doesn't make it any less true, though. :)

The whole point is that you are writing something because you need to
supply a result. So whether a programmer formally states the Business
Rules or keeps them in mind (assuming it is "obvious"), the
programmer has a checklist of what is a correct result or what is not
a correct result. Therefore, there is no such thing as "no test".
Only more complicated ones. <g>

The question is, can you write a test that will verify the result is
correct,
for any reasonable range of input? For a sorted list, you can verify
that the
items are in order. How would you verify that the area of a triangle has
been
calculated correctly, without calculating the area of the triangle?

... yes, you have to calculate the area of a triangle in order to know
whether the function is working properly and if you don't know how to in
the first place, then you're pretty much stuffed. ;-)

But I didn't think TDD is supposed to identify this kind of stuff. AIUI
the benefit comes when refactoring and making modifications and knowing
what gets broken by the changes you make. The greater the code coverage
the more effective this gets.

I came across this (what I thought was interesting) blog recently
paralleling tdd (okay unit testing) and the compiler
http://www.mindview.net/WebLog/log-0025.

(But I'm new to TDD so this may well be rubbish!)


No, no, no, don't let us talk you out of it. TDD can be called many things,
especially by those who first start playing with it (usually with words that
shouldn't be printed <g>), but it is definitely NOT rubbish.

Like many things that have come out of extreme or agile programming there is
great merit there whether you merely dabble or go at it whole hog. We would
all produce better products if we designed our "testing" upfront, or at
minimum along side our "implementing".

[As a side note, if you study what the gurus do, you will find that with any
useful new "best practice" technology, while they don't formalize it, and
often are unaware of it, it turns out they have been doing something along
those lines for years. <g>]

-ralph


.



Relevant Pages

  • Re: Test Tools
    ... Extreme programming guys seems to be proponent to this practice. ... TDD works for Acceptance Tests and Unit Tests. ... Debugging is boring. ... a lot the way the programmer does his job, and therefore, the way ...
    (comp.software.testing)
  • Re: A quick newbie question on TOP.
    ... lose your job to a more 'pragmatic' programmer. ... Well, the Pragmatic Programmers are totally behind TDD, and they are ... Could it be because they are open-source, ... A year from now, when the customer asks for a new feature, you ...
    (comp.object)
  • Re: The Override Problem
    ... Andrew McDonagh wrote or quoted: ... > Any (Java) programmer who can't TDD will soon find their resumes ...
    (comp.lang.java.programmer)
  • Re: rant -> your religion gets bashed here ... [long]
    ... that he is not a fashionable chap using XML. ... I concluded, as a consequence of that thread, that TDD has nothing to ... programmed in a more usable language. ... It allows the C programmer to fantasize that he is a "real" ...
    (comp.programming)
  • Re: TDD and private classes/usercontrols
    ... So whether a programmer formally states the Business ... But I didn't think TDD is supposed to identify this kind of stuff. ... but it is definitely NOT rubbish. ...
    (microsoft.public.vb.general.discussion)