Rick Measham rickm at isite.net.au
Sun Jan 25 05:21:41 CST 2004

At 11:50 am +1100 2004-01-24, Andrew Savige wrote:
>If you want a competition with more objective judging criteria,
>you could provide a test program, built with Ton Hospel's
>excellent golf test harness, say:
>   http://www.xs4all.nl/~thospel/golf/gentest.pl
>The rules would be simply that any program that passes all tests
>in the test harness may be entered. Prizes may be awarded for the
>shortest entry (golf), fastest entry (100 metre dash), most
>unorthodox or amusing entry, etc. (I have found a test program to
>be essential for such competitions because there is too much room
>for ambiguity in a written description of a problem).

This sounds good .. also feels a little 'Australian' in that 
orthodoxy is not required. All we want is something that passes a 
given (published) test. So to win you must:
1. Understand the test.
2. Write something that outputs the expected result.

The unorthodoxy of this non-complicated test comes from the fact that 
the test might have a section:

is( pythagoras(3, 4), 5);

But the code could contains:

sub pythagoras { 5 }

Which would work. The fun for the 'unorthodox' entry would be that 
the test would actually contain

is( pythagoras(3, 4), 5);
is( pythagoras(7, 9), sqrt(130) );

which make the 'cheating/unorthodox' entry all the harder.



             There are 10 kinds of people:
   those that understand binary, and those that don't.
   The day Microsoft makes something that doesn't suck
     is the day they start selling vacuum cleaners
"Write a wise proverb and your name will live forever."
    -- Anonymous

More information about the Melbourne-pm mailing list