In One Sentence --------------- Use JAPHs to test Perl. Synopsis -------- Testing code is often contrived and incomplete. Its often optimistic, simplistic and doesn't stress the program as much as real world code will. It would be best to use real world code in our regression tests, but unfortunately it is difficult to collect code which is itself simple to test. So it would be wonderful to have a set of real world code which stresses all the features of Perl, but is also easy to test. Fortunately we do. JAPHs! Hundreds and hundreds and hundreds of freely available small bits of test code using almost the entire range of Perl and all with the same output! Process ------- The process for using a JAPH as a test is straight forward. 1) Collection. 2) Security Auditing. 3) Auditing for features. 4) Add the JAPH to the tests. The collection of JAPHs is very simple. We simply steal Abigail's and Randal's hard drives. More can be grabbed from places like comp.lang.perl.misc and the backs of business cards, bar napkins, etc... Once collected the code must be audited for two things. First, we have to make sure we're not running code which is going to do naughty things to the testing machine. Unfortunately, due to the eclectic nature of JAPHs I don't think we can get away with using something like Safe, so human auditing is necessary. The other thing we're auditing for is if the JAPHs uses documented Perl features as opposed to coincidental Perl features and/or bugs. Obviously we only want JAPHs which use the former. A simple testing harness will be written to run the JAPHs and make sure they print out "Just Another Perl Hacker\n". Simple. Stupid. Each JAPH can simply be stored as a file in a directory and looped through. Problems -------- Due to the obfuscated nature of JAPHs, the auditors will have to be experts. This severely limits our available set of auditors. This is a problem, but not a crippling one since I believe even having a set of testing JAPHs growing slowly over time will still be an extremely valuable testing tool. To alieviate the problem a little, we can encourage JAPH authors to do their own auditing and post expanded versions of their JAPHs along with explainations. A JART submissions mailing list could be established with guidelines to submit a new JAPH for the JART. Corellaries ----------- The JART doesn't have to be limited to JAPHs. Other eclectic code can be included, Obfuscated Perl Contest entries come immediately to mind. Spin-offs --------- A pleasent consequence of gathering lots of JAPHs is that we're gathering lots of JAPHs! This can be spun off into a nice annotated JAPH archive for people who's lives aren't already weird enough. Things To Do NOW ---------------- - I would like to ask Abigial and Randal (and whoever else) to send in a dozen or so audited JAPHs ASAP to seed the JART and practice auditing. They should make notes about the auditing process and eventually work up some sort of instructions on how to audit a JAPH. - I will handle writing the JART testing harness (unless anyone is BURNING to do it). - JART will be offered as a patch to perl5. This should both improve perl5 and have the JART concept ready and waiting for working perl6 code. Blame ----- All blame for JART can be transfered to Michael G Schwern <schwern@pobox.com>. -- Michael G Schwern http://www.pobox.com/~schwern/ schwern@pobox.com Just Another Stupid Consultant Perl6 Kwalitee Ashuranse But why? It's such a well designed cesspool of C++ code. Why wouldn't you want to hack mozilla? -- ZiggyThread Next