Re: TDD and private classes/usercontrols
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Mon, 3 Mar 2008 09:13:41 -0600
"Simon Woods" <simonjwoods@xxxxxxxxxxx> wrote in message
news:uxOzUMQfIHA.5164@xxxxxxxxxxxxxxxxxxxxxxx
Steve Gerrard wrote:correct,
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
that thefor any reasonable range of input? For a sorted list, you can verify
beenitems are in order. How would you verify that the area of a triangle has
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
.
- Follow-Ups:
- Re: TDD and private classes/usercontrols
- From: Simon Woods
- Re: TDD and private classes/usercontrols
- References:
- TDD and private classes/usercontrols
- From: Simon Woods
- Re: TDD and private classes/usercontrols
- From: Ralph
- Re: TDD and private classes/usercontrols
- From: Simon Woods
- Re: TDD and private classes/usercontrols
- From: Steve Gerrard
- Re: TDD and private classes/usercontrols
- From: Ralph
- Re: TDD and private classes/usercontrols
- From: Steve Gerrard
- Re: TDD and private classes/usercontrols
- From: Simon Woods
- TDD and private classes/usercontrols
- Prev by Date: Re: Showing Excel Taskbar while useform is open
- Next by Date: Re: TDD and private classes/usercontrols
- Previous by thread: Re: TDD and private classes/usercontrols
- Next by thread: Re: TDD and private classes/usercontrols
- Index(es):
Relevant Pages
|