Hi there, Matt here.
Coding can feel like magic. You’re literally conjuring; type the right words in the right order, and you can do all sorts of superhuman things. Of course, getting those words right is no small feat, but that adds to the sense of accomplishment when you get it right.
Recently I went down a deep rabbit hole in pursuit of a silly idea: what if my website could make generative art for every essay I wrote? Then, I wrote an essay about the journey. So that’s what I’m sharing today. It’s definitely going to make more sense if you have some experience writing javascript, or at least have a passing interest in doing so; if you’re not into code, feel free to skip this episode. I have a very non-technical essay coming out in a week or two!
But first, some tunes. Alvvays has been in my frequent rotation since their 2014 self-titled debut. But their new record Blue Rev goes to a decidedly more dream-pop/shoegaze place, and it couldn’t be more to my taste. Buried on the b side is “Pomeranian Spinster,” a solid 3-minutes of bright fuzzy pop. Give it a listen!
Now, on to the essay. As always, you can skip to the jump and read it on my website.
I like writing and sharing essays on twitter. I especially like the way the link previews look when they have images that stand out in the timeline. In the past, I’ve created illustrations for each of my posts. But I have two problems: 1. Creating illustrations takes time, and 2. I’m not good at it.
Fortunately, Zach Leatherman wrote up a potential solution to my problems: his site automatically generates nice-looking images that include the title, date, and site name. But I’m a glutton for punishment. I wanted to take it one step further. A terrible idea stuck itself in my brain:
What if each preview image was a piece of generative art?
Slowly and painfully, over the course of a month, I hacked away until I’d shipped this terrible idea. My website now makes nice pieces of generative art for each post, so I can share them with my friends on Twitter.
So that I didn’t suffer in vain, I thought I’d write up my process and share the code, in case you’re also interested in unnecessary complex solutions to first-world website problems.
Let’s go!