Recently at a developer lunch someone brought up the recent article about virtual monkeys. A programmer set up a simulation with millions of virtual monkeys that randomly typed in text, and after a while they eventually produced a work of Shakespeare. Now computing power is expensive so we thought how about we just get some real monkeys to type it up.
Shown: preferred typing monkey
Unfortunately the preferred type of monkey is endangered and it would be rather expensive to get a million of them too. But we thought why not a slightly cheaper animal, surely a dog can type just as well as a monkey.
Shown Arthistory Sapiens
After thorough research we found ourselves with the cheapest solution, the art history major. Not just cheap but free. We estimated in Boulder, Colorado there was approximately 10 million art history majors.
Now what does this all have to do with unit testing? Well recently we have had a lack of interns for doing testing for us and needed a solution. But at the lunch meeting we suddenly realized what if our mentioned army of Arthistory Sapiens wrote unit tests instead of Shakespeare.
A couple of calls later and we had 20,000 Arthistory Sapiens willing to work for free as long as we gave them a recommendation. This would be our first initial test run. We purchased a small plot of land in north Boulder and an old Cray mainframe with 20,000 terminals.
We decided to use Perl as our language, as we thought Perl had the most likely combinations of valid unit tests possible. This would prove to be the best decision.
After only 2 hours one of the Arthistory Sapiens produced this code. This one piece of code gave 50% code coverage for our entire product.
This first test run was a huge success. Our only costs were a grand for the land, a six pack for the Cray and the terminals, and a homeless Perl expert we paid in food to verify the unit tests. We now have 500 acres of land in North boulder and over a million Arthistory Sapiens typing at any one time. We consistently have great code coverage and quite possibly the fewest bugs in production code ever. This is the future of testing.