I would have thought it patently obvious that debugging a program is
directly analogous to scientific experimentation:

        1. Create an hypothesis about the bug
        2. Design a data/test framework in which to extract information
        3. Execute constructed test and obtain data
        4. Relate new data to hypothesis to create information (or not)
        5. Decide whether bug is fixed
        6. Goto 1 if necessary.

Unit test approaches (see for example Extreme Programming) almost
certainly help.  Although there is way too much hype surrounding Extreme
Programming, the core idea they espouse of evolutionary development and
unit testing are spot on in my view and experience.

It was always one of my biggest concerns when I was an academic how
woefully inadequate the training of computer science students was on
this issue.  Almost no courses in this country expose computer science
students to scientific method and debugging even though it probably
accounts for by far the largest amount of time of a programmers life. 
Possibly this is one of the factors why Physics/Chemistry/Biology
students who have been on a conversion MSc generally are generally good
at this sort of thing.

Some computer science courses try and use introductions to logic as ways
of inculcating in students a structure to their thinking and reasoning
and sometimes this helps.  However, far too many people teaching logic
are mathematicians rather than programmers and can't program properly
even in Prolog.

I guess I should have said <flame on> and <flame off> around the above.

-- 
Russel.
====================================================================
Dr Russel Winder                    Chief Technology Officer
OneEighty Software Ltd              Tel: +44 20 8680 8712
Cygnet House                        Fax: +44 20 8680 8453
12-14 Sydenham Road                 [EMAIL PROTECTED]
Croydon, Surrey CR9 2ET, UK         http://www.180sw.com           
====================================================================
Under the Regulation of Investigatory Powers (RIP) Act 2000 together
with any and all Regulations in force pursuant to the Act One Eighty
Software Ltd reserves the right to monitor any or all incoming or
outgoing communications as provided for under the Act

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to