December 14, 2004

Conversation with a student

Student:

So how come I didn't get good marks for my programming assignment? The program works, and a third of the marks are for the implementation alone!

Lecturer:

One of the problems is your testing of the program.

Student:

But I tested it! I ran the program with several large files!

Lecturer:
Testing isn't simply running the program with some input files. You have to actually check whether the program produces the results you expect it to, in all kinds of situations.


Student looks unconvinced.

Lecturer:

Look, suppose you were taking a flight in an aeroplane, and the software that was flying the aircraft had only been tested by running it a few times and seeing that the program didn't crash. Suppose no-one had actually checked to see whether the program was doing what it was supposed to. Would you be happy to fly in that plane?

Student:

Er, no.

Lecturer:

Of course. You'd want to know they'd tested it thoroughly, wouldn't you? You would want to know that they'd tested it in all kinds of different situations and checked to make very sure that it was flying the plane how it was supposed to do, yes?

Student:

Yes.

Lecturer:
Ok! So you have to bear in mind that same sort of idea when testing your own programs.


Student wears thoughtful expression and stops complaining about the assignment grade.

0 Comments:

Post a Comment

<< Home