This week, I wrote my first twitterbot.
For a while, I’ve been interested in Twitter robots – not spambots that auto-follow everyone who mentions Justin Bieber, but those that do something interesting with language or online data, such as Metaphor-a-minute, which uses the Wordnik API to generate random metaphors, or Library of Aleph, which tweets captions (without the photos) from the Library of Congress’s photo collection.
I’ve wanted to create a twitterbot, but didn’t think of an idea until this week while listening to one of my favorite songs, Elvis Costello’s “(What’s So Funny ’Bout) Peace, Love, and Understanding?”, and about to tweet (for the 2nd time) my favorite lines:
So where are the strong?
And who are the trusted?
It struck me that questions found in song lyrics could make a good Twitter account. Questions in song alternate between the profound:
Who knows where the time goes?
— Lyrical Questions (@LyricalQs) April 5, 2014
– and the ridiculous:
Who put the bomp in the bomp, bomp, bomp?
— Lyrical Questions (@LyricalQs) April 4, 2014
A single line from a song can also be rich in memories and connotations. I now had my idea for my twitterbot.
How I Wrote It
There are a ton of “how to” options online. Because I want to learn more about Node.js, I chose this tutorial from Christian Paulsen to create the basic structure and functionality of the twitterbot.
Next, I needed questions. I put out a call on Facebook for my friends’ favorite questions from songs and ended up receiving more than 150 suggestions. I put all these into a text file and created a script that selects a random line and posts it on Twitter. If you’re interested in this sort of thing, I put the script on Github.
To automate posting the questions to Twitter, I downloaded LaunchControl, a small utility that lets you create and edit automated tasks on a Mac. Technically, LaunchControl just provides a GUI for Mac’s
launchd process – see more here – but it makes
launchd’s fairly confusing format much more readable. I have the script scheduled to run every three hours at the moment.
This process isn’t perfect – it runs whenever our computer is being used, but not if it’s asleep or off. So one of my next steps is to convert an old Mac into an always-on home server that can (among other things) run the Twitterbot 24–7. I’d also like to make the posting a bit less random by avoiding repeated questions too frequently or grouping some multiline questions together.
Overall, the project was very fast (started on Thursday night, finished by Saturday morning) and tremendous fun, and I’m collecting ideas for other bots. I’d like to try pulling texts from an API or a public domain source (Book of Common Prayer, perhaps?) for my next one.
Oh, and be sure to follow Lyrical Questions on Twitter.
Disclaimer: I take comic strips very seriously. Just ask my wife.
I’m a fan of the comic strip Dilbert by Scott Adams. Last year, it provided some much needed humor during an awful work situation. But yesterday and the day before, Adams decided to turn his mockery toward the long-term unemployed. He has introduced an unnamed character who has been “out of work for such a long time.” First, he’s depicted as falling out of a chair, because he can’t figure out how it works. In the second strip, he’s told that the corporate policy manual is kept “in the cloud,” so he looks up to the sky to find it. Basically, the guy is stupid, incompetent, and ignorant of anything resembling recent technology (if “the cloud” can still be considered “recent.”)
Hilarious. Adams manages to reinforce all of the worst stereotypes about long-term unemployment through a couple of not-very-funny jokes.
Recently, I was underemployed for about six months, working part time for a former employer and doing several freelance projects to make ends meet. During this period, I met many people who had been unemployed or underemployed for far longer. Several of them had been actively searching for work for years. I met most of them at a local organization called the Job Search Focus Group, which I highly recommend for anyone in Greater Cincinnati looking for a new job.
The long-term unemployed fell into a few different groups:
- The largest, by far, were people in their 50s and 60s who were far OVERqualified for the positions they were applying for. They kept losing out to folks in their 20s and 30s who, because they had much less experience, were much less expensive to hire.
- For others, their entire industry had imploded because of structural changes in the economy. They were struggling, not to learn new skills, but to communicate how their already-polished skills transferred to other fields.
- Finally, there were those who had been out of the workforce because of non-job-related issues, such as taking care of their family or dealing with an illness. In a few cases, illness had left the person unable to continue in their former line of work, so they were in the midst of reinventing their entire career. It takes most of us 20 or so years to prepare for our first career, so you might see how starting a second career might take some time.
According to Adams, such people can’t even be trusted to sit in a chair.
Most of Adams’ humor is directed toward people in power, such as managers and CEOs, toward annoying office habits that all of us encounter (and have been guilt of), or towards absurd figures like talking animals who want to take over the world. Here, Adams has chosen to laugh at someone facing an extremely difficult personal transition, one which our society regards as shameful, and emphasize that his shame is deserved because he is too stupid to hold down a job.
Adams began Dilbert while working at Pacific Bell in the 80s and early 90s, and he’s had a long relationship with United Media. Telecom and journalism have both been through major upheavals since the 1980s. How many people has Adams worked with who have faced long-term unemployment?
You might reply that Dilbert is a comic strip and that it shouldn’t be taken too seriously. I’m not so sure about that latter part. One of the strengths of humor is its ability to “speak truth to power.” Dilbert’s caricatures of clueless manager and selfish CEOs have resonated with millions because those are the people with the power. Posting a Dilbert comic on your office cubicle is a small, harmless way to coping with the absurdities of American office life. Humor exposes truths that are too difficult to talk about with a straight face.
In this case, instead of “speaking truth to power,” Adams has chosen to “speak mockery to the powerless.” And that’s not funny.
When I was a kid, some of my favorite shows went off the air before I was even born: Gilligan’s Island, The Addams Family, Leave It to Beaver, The Brady Bunch. Not only were there fewer channels on the television, but the channels that did exist had a much smaller back catalog of shows they could show. The two superstations on our local cable — WGN out of Chicago and TBS out of Atlanta — showed these old sitcoms on regular rotation.
Since there are now hundreds of channels, and a seemingly endless supply of new shows to choose from, I worried that my kids would be deprived of “vintage” programming as they developed their own tastes.
I shouldn’t have worried. Through Netflix, they’ve discovered plenty of classic shows — well, “classic” shows anyway. My 7- and 4-year-olds are currently obsessed with Mighty Morphin Power Rangers, but I have introduced them to The Addams Family, Leave It to Beaver, and even newer programs like The Cosby Show.
And they don’t have to suffer through any Cubs games to get to the good stuff.