gnu-arch-users
[Top][All Lists]
Advanced

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

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


From: Thomas Zander
Subject: Re: [Gnu-arch-users] more on the merge-fest
Date: Wed, 26 Nov 2003 13:31:19 +0100
User-agent: KMail/1.5.4

You miss two points from unit testing in your story below;

1) unit testing is smaller (always); it is about testing if your method does 
the right thing just as much as how it handles arguments and how it handles 
'objects' it gets.
You would not always just test the method signature; but also parts that are 
done in the method itself.
In short; testing is about failing fast.  As soon as the bug is executed 
your test is suppost to fail.

2) testing is done while programming to test helper methods just as much as 
API methods.  Testing makes you program faster and with more certainty (the 
bug has to be in this code, not due to some sideeffect elsewhere).

Many programmers state that testing does not work for them because they do 
not understand how it _can_ work.  There are testing methods (mock objects 
is a good example) that provide ways of testing stuff that before seemed 
impossible to test at all.

If you feel testing can't work (for you) please read the documents on best 
practices. google for junit, "mock objects" and other terms found in this 
thread.

In the end, you are free to program the way you want to, but be prepared to 
get questions on job-interviews that have to do with testing.

Cheers!

On Wednesday 26 November 2003 11:40, Mark Thomas wrote:
> On Wed, 26 Nov 2003, Thomas Zander wrote:
> > On Wednesday 26 November 2003 04:40, Andrew Suffield wrote:
> > > False. I know one very important thing about your experience: it
> > > leads you to the conclusion you made. From this piece of data I can
> > > conclude all kinds of things.
> >
> > Cool; since the conclusions are wrong, his methods must be wrong! Are
> > you sure you are a programmer? This is more something a politician
> > would say.
>
> Uh.. if I conclude that 1 + 1 = 3, then my method is wrong.  Surely
> that's the essence of testing (a wrong result [conclusion] indicates
> wrong code [method]).
>
> What Andrew is trying to say is that saying "You know nothing about me"
> on a public mailing list is nearly always wrong.  Andrew knows your
> opinions (you just told them to him, in an email, on a public mailing
> list).  From that, Andrew can derive *some* information about you (it may
> not be much, it may not include your gender, but it is *not* nothing).
> \not\forall \not= \not\exists
>
> > Oh; your emails that 'prove' testing to be faulty will not convince
> > anyone who has actually done testing based programming.  That should
> > send a message to you.
>
> But testing *is* faulty.  Even people who use test-based programming
> produce programs that fail occasionally (sure, far less often than not
> using test-based programming or some other equally good technique, but
> there is always the possibility that there might be just another bug that
> your tests failed to catch).  To assume "I use technique X, therefore my
> code is bulletproof" is just arrogance.
>
> Regards,
>
>   Mark.

-- 
Thomas Zander




reply via email to

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