[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] more on the merge-fest

From: Samuel A. Falvo II
Subject: Re: [Gnu-arch-users] more on the merge-fest
Date: Tue, 25 Nov 2003 19:47:30 -0800
User-agent: KMail/1.5

On Tuesday 25 November 2003 07:37 pm, Andrew Suffield wrote:
> Uhh, no. It's got absolutely nothing to do with the granularity of the
> tests. It's entirely to do with the proximity of the cause and effect.
> If cause and effect are separated by 500 lines of code, then no amount
> of testing in 20-line chunks is going to demonstrate the problem.

Uhh, yes.  Because those intervening 500 lines of code must, themselves, 
also be unit-tested.

> Tests just find problems. They don't (and can't) indicate their
> cause. At best you can hope to spot it by inspection, which only
> happens when a) the cause is nearby, and b) you're lucky.

The experiences of thousands of other programmers elect to disagree with 
you, myself included.

Of course, you're correct to say that unit tests only find problems.  But 
it is the existance of a *problem* that *causes* a bug (causes don't 
create problems; consider that the -lack- of a problem -causes- a 
program to run flawlessly), and with a fine-enough granularity of 
testing, you can isolate the location of problems down to less than 20 
lines, thus making trivial *inspection*-based diagnosis quite effective.

Samuel A. Falvo II

reply via email to

[Prev in Thread] Current Thread [Next in Thread]