Even Random Paint Splatters Can Be Valid Computer Code (If You’re Using Perl)

Even Random Paint Splatters Can Be Valid Computer Code (If You’re Using Perl)

As technology becomes more central to our lives, kids are increasingly being steered towards careers in programming with things like toys that promote coding.

Is there still room for the arts in a world run by apps, AI, and computers? It turns out there might be a closer connection between the two than you’d think, as a software engineer discovered that random paint splatters are actually valid Perl code in disguise.

It started with a tweet from Adrienne Porter Felt, a developer on the Google Chrome team who lamented that kids were being groomed for future careers at such a young age now, when they should just be free to jump in mud puddles and smear paint all over the walls.

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.

McMillen discovered that when random paint splatters were processed by OCR software — character-scanning tools that are typically used to turn analogue words into digital text — it resulted in valid Perl code 93 per cent 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.

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]


The Cheapest NBN 50 Plans

It’s the most popular NBN speed in Australia for a reason. Here are the cheapest plans available.

At Gizmodo, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.