The Art of Writing Automatic Tweets

I’m a coder, by which I mean, I like solving problems with code. The more elegant the code, the better. Being also trained in the humanities, I have a aesthetic sensibility, particularly around language. Having wanted to write a Twitter bot for a while, I finally took the time to deploy one (you can see it here). Focusing on how the code worked, I forgot to pay enough attention to what the code was outputting.

Honestly, it wasn’t bad:

It just wasn’t good. The language is confusing and the metrics weren’t well explained. Expressing something within 140 characters is a lot harder than it may seem. How do I be clear and concise?

So I made some changes and redeployed:

It was better, but still not the best. At the same time, I developed a script to tweet out the values for each borough. Originally, I was going to cycle through the boroughs, tweeting one at a time. This ran as a separate script and interspersed the borough tweets with the overall NYC tweets.

The language was slightly different and as I looked through the tweets, I realized there is a hypnotic effect to automatically generated tweets. As the tweets built up and I scanned down, there was an odd emotional effect from seeing them all stacked up. I was annoyed at the borough tweets because they broke the flow of the rising numbers as it got later.

So I went back and refactored my code to include the borough totals with the overall total:

Much better, but at this point, I realized another truth: the lifeblood of Twitter is hashtags. Without them, I might as well be shouting into a pillow for all that others will see my tweets. So I went back and added some basic tags:

In coming up with the tweets, I checked to make sure they would be 140 characters or less, especially since I haven’t implemented a length checker just yet (it’s in my issue list).

So to summarize:

  • Be clear and concise
  • Focus on key elements
  • Pay attention to the flow of tweets and minimize difference between tweets for all but the key pieces of information
  • Check for length limits (140 or less)
  • Don’t forget the hashtags

Have fun building your bot army!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s