A Noncoder’s Attempt to Make the Twitterbot of His Dreams
On Twitter, bots are hot. Marketers, artists, news organizations, and general-purpose wiseacres have found all kinds of uses for Twitter accounts that pump out or react to tweets under the guidance of pure code, rather than a carbon-based life form.
For example: @QuakesToday auto-tweets based on real-time machine reading of earthquake data. @congressedits is a bot that shares Wikipedia edits made from IP addresses associated with congressional offices as they happen. @big_ben_clock alerts followers to the new hour, in the form of tweeted “bongs.”
Other Twitterbots are not so much useful as purely amusing or entertaining — see, for instance, this list of silly but lovable Twitterbots.
Much like the guy who is certain he can create a hit song — if only he could read music and play an instrument — I like to believe that my ideas for silly Twitterbots are as good as anybody’s. If only I had the slightest understanding of code!
Then again, about 35 years ago I wrote a BASIC program that caused a ball-like digital object to bounce across the screen of my Commodore 64. Surely I could figure out how to make a Twitterbot, right?
Here’s what I learned by attempting to participate in the hotness of bots.
Up and running in five minutes (or, uh, not)
My (possibly stupid!) idea: a bot that would identify top Twitter trends and, several times a day, tweet references to them, appending useless observations such as “Speechless!” or “Don’t know what to say!”
This idea sprang from my experience of dabbling in the culture of live-tweeting around TV broadcasts of watercooler-worthy shows like Breaking Bad — I was amused to learn that people felt compelled to express the fact that they had no insight about the event. So why not extend that sentiment to whatever is trending?
I would call my bot “Trending Raconteur.”
Yes, that is partly a smart-ass comment on the frequent banality of Twitter — but it’s arguably also useful, to the extent that it prods followers to take regular note of what’s hot on the social network.
Anyway, I started by reaching out to a few web-creativity wizards for whom whipping up a Twitterbot is about as challenging as preparing a PB&J. Writer and developer Mike Lacher — known for online projects like The World’s Most Exclusive Website, The Geocitiesizer, and other brilliantly absurd exploits documented at MikeLacher.com — generously responded with a quick overview of how I would need to proceed.
And he sent a link to a tutorial that promised: “Writing a Twitter bot is easy and you can get one up and running in 5 minutes.”
But of course it turned out to be more complicated. In fact it took me many (cough) days, during which I read or watched a blizzard of tutorials — and did an even-more-than-normal amount of cursing at my computer, out loud.
To leap ahead a bit, here’s the essence of what I eventually figured out.