2

It’s Fun To Write Software That Serves No Serious Purpose

 2 years ago
source link: https://clivethompson.medium.com/its-fun-to-write-software-that-serves-no-serious-purpose-6617cb789392
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

It’s Fun To Write Software That Serves No Serious Purpose

Doodling, sketching, and mucking around with computers has weird and deep pleasures

1*8BO11i_tFe3HC_B31s3xHw.png

When I started teaching myself to code seven years ago, I initially figured I’d use the skills to create useful stuff: Bits of data-analysis for my work as a journalist, or web-scrapers to automatically collect info.

And sure, I built those things! It felt great to write code that solved real, practical problems for myself.

But over time, I found that what gave me the most satisfaction were the projects that were much weirder — and which served no practical purpose at all.

I loved making chatbots that composed haiku-like poetry, or simulations of the physics of thousands of bouncing balls, or little drawing-tools for doodling with right-angle lines.

When I get the itch to make one of these things, I get totally obsessed. I’ll spend hours absorbed as I code them into being, often ignoring my actual paid work (as a journalist).

What exactly is the allure? What’s so much fun about making utterly non-utilitarian software — code that exists not to solve a real-world problem, but to do something fanciful, or silly, or pretty?

Part of it is the joy of using computers to do artistic things. I say “to do artistic things” rather than “to make art”, in part because I’m not sure the things I’m making are intentional — or dimensional enough — to be called “art”. There definitely are amazing computational artists out there, though, and in screwing around with these little bits of fun code I can feel some of the pleasure that computational artists have in taking high-end silicon processors — designed to crunch numbers or work spreadsheets or do military-industrial tasks — and coax them into doing something that’s visually gorgeous. It feels a bit rebellious.

There’s also an aesthetic fabric to computation that’s fun to simply touch and wield. Computers are very good at Xtreme repetition with unerring accuracy, in a way that humans are decidedly not. Being able to use those alien powers for arty things is fabulous, for the same reason that Spirographs are so enchanting: A tool that lets a human do something with inhuman precision.

Then on top of that, computers are also good at doing things randomly! They’re only pseudo-random, of course, but that’s good enough when you’re asking a computer to generate something pretty or weird. We humans are very bad at doing things randomly, so having a machine that can constantly surprise with odd moves (if you ask it to give you odd moves) is truly delightful.

These are very old pleasures, of course. Vera Molnar was an early pioneer, beginning in the 1960s, of using computers for art. The early hackers of MIT in 70s were entranced by cellular automata — like Conway’s “Game of Life” — because of how it seemed to merge computer logic with an eerily organic, unpredictable evolution of digital life-forms. And today there’s a massive community of digital artists, and languages/frameworks like P5, designed specifically for doing interactive cool sh!t.

Which brings me to my latest piece of totally purposeless software: “The Gardener”.

While I was on vacation last week I got the idea to generate random chunky-pixelated flowers. At first, I was thinking of making a little tool that would let me plunk flowers down on a grid, except that every click would generate a random design for the flower. It’d pick from one of four possible shapes for the inside of the flower, one of seven possible shapes for the petals, and have a few dozen possible colors to pick from for each. Doing some quick math I figured there’d be roughly 26,000 possible flowers.

I quickly got the flower-generating code working, and the first few flowers looked like this …

1*Vt-vftHechmcn1SDEWKNYA.png

And of course, the fun would be the pseudorandomness: Not knowing exactly what you’d get each time you clicked “plant”.

But then decided to lean even harder into the randomness, and realized I wanted to have the software just plant the flowers itself. So I wrote code for a little “gardener” — a single blue pixel that would wander the grid planting a flower every 10 seconds or so. It would change direction randomly, so there wouldn’t be any particular pattern to the planting.

In a sense I was drifting towards something so totally uninteractive that it was like a distant cousin of the screensaver. It’d be (hopefully) pretty to stare at, but you wouldn’t do anything yourself. You’d just … look.

After an evening of cranking away I finally had the gardener working. I also wrote a little piece of trippy music to loop eternally as the gardener worked.

When I set it running, the garden started off pretty sparsely. This is what it looked like after maybe five minutes …

1*aJvToijJi7U0crWXYneWTw.png

… then five minutes later it got busier …

1*xvuxWjROn6MdJGrt1mheMw.png

…. and so on …

1*8BO11i_tFe3HC_B31s3xHw.png

… and so on …

1*WzKKrgnOSHQMj4ylcaxT4w.png

… until after about 45 minutes the screen is a weird riot of blocky pixels, like so.

1*8eEoFg2YYjGHb5H4gG2HHA.png

At that point, it sort of disintegrates somewhat; the original heuristic of a “garden” is only partially tenable, because the flowers are so often layered on top of one another — a casualty of the gardener’s random walk — that they have no flower-ness any more. There are only a handful that still stand alone enough that they seem like lil’ flowers. The rest is like … colorful digital noise?

1*cMhuXzUYYg1KUIFBadCzbA.png

I still can’t tell you entirely why I made this. I do find it oddly soothing to watch; I’ll often set the garden running in separate browser, then do work or email in another browser, with the garden peeking out from behind. (You actually need to have it peeking out partially; if it isn’t somewhat visible, the app seems to halt — the music keeps playing but the gardener doesn’t plant any more.) It was fun to flip over every few minutes and watch the garden evolve, while hearing the Minecraft-like “crunch” of flowers being planted every ten seconds. Sometimes I’d just sit there watching the gardener work for five solid minutes. It could be oddly meditative. I’d think about stuff — work, ideas for pieces — while staring at this weird pixelated life form.

Though I also suspect a lot of people would find the gardener super boring. It doesn’t … do much? And the planting is verrrrry slow.

But check it out if you want! It’s online here.

For literally no reason.

(Oh, and! The project is hosted on Glitch, so if you want to see the code or remix it yourself, go for it — it’s right here.)

(Enjoyed this one? Why then grab that trackpad click the hell out of the “clap” button. It can handle 50 clicks per reader!)

Clive Thompson publishes on Medium three times a week; subscribe here to get his posts in your email— and if you’re not a Medium member, you can join here!

Clive is a contributing writer for the New York Times Magazine, a columnist for Wired and Smithsonian magazines, and a regular contributor to Mother Jones. He’s the author of Coders: The Making of a New Tribe and the Remaking of the World, and Smarter Than You Think: How Technology is Changing our Minds for the Better. He’s @pomeranian99 on Twitter and Instagram.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK