Jack Archibald, a developer advocate for Google Chrome, then wondered if paint smeared on a wall could somehow be turned into valid Perl code. The gag here is that the notoriously messy programming language can sometimes resemble something like a Jackson Pollock painting, but a software engineer and former Googler named Colin McMillen decided to take Archibald’s idea and run with it.

Advertisement
Advertisement

McMillen discovered that when random paint splatters were processed by OCR software—character-scanning tools that are typically used to turn analog words into digital text—it resulted in valid Perl code 93 percent of the time. Not necessarily useful Perl code, but code that still properly executes.

The results were published by McMillen (and a fictional co-author named Tim Toady) in a joke-filled white paper available here, but far more interesting is the online art gallery of paint splatters showing which ones generated valid code (plus the results of that code) and which did not. McMillen writes that much of the time, the results worked simply because Perl can parse unquoted character strings as text that other programming languages would reject outright. There doesn’t seem to be a specific pattern or criteria for splatter techniques that will definitely generate Perl code, and different approaches to the OCR process could very well produce results from one splatter that another doesn’t.

Advertisement

So is the takeaway that letting your kids run wild with a can of paint the surest path to a lucrative career in Silicon Valley one day? Doubtful. Maybe it’s somewhere in the middle. Let your kids be kids, but make sure they’re exposed to all kinds of activities as they grow up.

[Colin McMillen via BoingBoing]