[Purdue-pm] perl quotw

Joe Kline gizmo at purdue.edu
Wed Mar 24 08:04:12 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Senn wrote:
>   Rick Westerman <westerman at purdue.edu> wrote Wed, 24 Mar 2010 09:05:04 -0400
>   > Yes, that is a good one.  Let's use it for the April challenge.  I
>   > am not sure how we will judge the quality of the programs.  It seems
>   > to me (without actually having written the program) that the run time
>   > will be in the seconds (or less).   Perhaps we can judge on (a)
>   > "beauty" of the code and (b) robustness -- I have a couple ideas in
>   > regards to difficult or invalid input.   In any case this is suppose
>   > to be a learning exercise for all and not a "my code is better than
>   > your code" contest.
>   > 
>   > See you April 20th!
> 
> I'm not sure how we will judge the quality of the programs either.
> The specs at
>     http://perl.plover.com/qotw/r/006
> are too loose.  Are only positive integers allowed?  Will format_number_list
> input always use numbers instead of strings so wo don't have to worry
> about positive integers specified as, for example, '--42'?  Will the input
> to the functions always be in sorted order?  What should happen with no input?
> What should expand_number_list do with zero length input?  And so on.
> 
> I suggest we use
>     YES (is checked before function is called, smallest number used is 1,
>         largest 1000---for extra credit, smallest number used is 1,
>         largest a google (1 followed by 100 zeroes))
>     YES (is checked before function is called)
>     YES (so any sorting won't have to be part of any "Big O" discussions,
>          sorted order checking is done before the functions are called)
>     CAN'T HAPPEN (is checked by other code before the functions are called)
>     CAN'T HAPPEN (is checked by other code before the functions are called)
>     Other questions assume the simple case of specified input like the
>     example with no other complications.
> 

- From a brief look at the qotw discussion archive stuff like this left to
the implementer.

If your program can handle negative numbers so much the better.

If mine barfs on null input...well that sucks.

Constraining the problem constrains the coder. :-)

This is Perl after all, TIMTOWTDI.

joe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFLqinsb0mzA2gRTpkRAlMfAKCd1y0x9QRQ9FSuiZdCoR/qfA18VQCgi5EQ
0E4Ru0qjF/VNJErLE/603SA=
=RMbg
-----END PGP SIGNATURE-----


More information about the Purdue-pm mailing list