How (and Why) I Wrote My First Twitterbot

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:

– and the ridiculous:

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.

Hey Dilbert: Don’t make fun of the unemployed.

Disclaimer: I take comic strips very seriously. Just ask my wife.

Dilbert (character)

Dilbert (Photo credit: Wikipedia)

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:

  1. 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.
  2. 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.
  3. 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.

Recent Writing: Breaking Bad, Asher Lev, and More

Here are some of my publications from the past few months.

ThinkChristian.net

Emerging Scholars Blog

Adding Mars Hill Audio to iTunes Match

If you — like me — are both a loyal subscriber to Mars Hill Audio and a user of iTunes Match, you might have found — as I did this morning — that your MHA tracks (distributed via mp3) are listed “Ineligible” for iCloud. Ineligible tracks won’t be synced with iCloud, which means that you won’t be able to listen to them on your iPhone.

Fortunately, there’s an easy solution.

  1. Select the Mars Hill Audio tracks in iTunes.
  2. From the “Advanced” menu, choose “Create AAC Version.”
  3. Then update iTunes Match. (Store -> Update iTunes Match)

Ken Myers’ soothing voice will now be available to you on your iPhone. Enjoy!

True Images of Kentucky?

I have very mixed feelings about this [beautiful photo gallery](http://www.nytimes.com/interactive/2011/11/13/opinion/sunday/20111113_Opinion_Exposures.html) by [Shelby Lee Adams](http://en.wikipedia.org/wiki/Shelby_Lee_Adams) in today’s NY Times Sunday Review. The photos, without question, show true aspects of Kentucky life: Appalachian Gothic, shirtless men and boys, hunting trophies, haphazard piles of junk, families who seem at once welcoming and off-putting. Flannery O’Connor and William Faulkner come to mind, even though they were writers of the [Deep South](http://en.wikipedia.org/wiki/Deep_South), which should never be confused with the [Upland South](http://en.wikipedia.org/wiki/Upland_South). The photos are both beautiful and disturbing.

However, since this photo gallery appears in the **New York** Times, will the primary audience see anything *besides* rednecks and hillbillies? Won’t this gallery simply reinforce existing stereotypes of Kentucky among the East Coast elites? Will they have any insight at all as to how to interpret this quote from Adams that accompanies the gallery?

> When I was young, I couldn’t wait to leave Kentucky. Now, as I get older, I value every day when I return.

Many people know about Kentucky author and farmer **Wendell Berry**, but I wish more people knew about [Harlan Hubbard](http://www.harlanhubbard.com/), classically trained painter and musician, an essayist who inspired Berry and who, like Berry, chose to live off the land in rural Kentucky rather than among the cultural elite. Hubbard is someone who gets you a bit closer to the paradoxical land that is Kentucky.