I recently learned some lessons from the first Twitter bot I made: @CoinForTechConf.

This bot was built due to laziness - I didn't want to keep running the same Twitter search queries to discover scholarships for tech conferences. I wanted to build something that would find scholarships for me, notify me, and share the opportunities with other folks looking for funds.

The intention was to be helpful to students studying programming and entering the tech industry.

A harmless search, right?

I tested a bunch of different queries to see which ones would lasso the most relevant tweets. Stuff like:
conference OR conf apply OR win tech OR technology scholarship

The bot runs on a scheduled basis, uses Twitter's API to run several keyword searches then retweets the matching posts. I set my mobile device to receive notifications whenever something new was shared, that way I could simultaneously monitor the posts for irrelevant / inappropriate content and also get the jump on some funding.

And it seemed to work! Well, for a few months anyway.

Then something awkward happened

Sometime in early May, the scholarship decisions for WWDC (Apple's huge annual dev conference) came out. People who weren't selected as recipients were understandably upset, and they tweeted about it.

However, I didn't anticipate @CoinForTechConf to pick up these tweets and amplify them.

Oh no!

What about monitoring?

Unfortunately, I didn't catch these unintended retweets right away. Why? My iPhone bit the dust right before May, and so I replaced my phone. However, I didn't remember to configure my bot notification settings on my new Android's Twitter app. So I wasn't receiving live updates anymore.

I hadn't set up a logging service because 1) it was an early class project so I didn't know about logging and 2) I figured monitoring my notifications would be enough - IF I configured it properly. So these tweets continued to trickle in.

Thinking about the emotional and social impacts

One day I was sitting around and thought, Huh, I haven't heard from @CoinForTechConf in a while!

When I checked the feed and initially discovered these tweets, I was kinda horrified.

Yeah, these were public posts, but if I tweeted about losing a scholarship, I probably wouldn't want some bot spreading the news.

One series of tweets left me the most conflicted. Unfortunately, they were deleted / protected soon after appearing, so I don't have a screenshot handy. A user who identified having a strong academic record tweeted at the bot saying thanks after @CoinForTechConf retweeted news about their scholarship rejection. Perhaps they wanted the news to get out there, to raise visibility about the scholarships decision process. I wasn't sure.

However, I also thought about my intended audience - seeing these tweets on @CoinForTechConf might discourage people from applying to scholarships in the first place. This was my primary concern, so I decided to filter my results for the time being.

Adding filters

To decrease the likelihood of picking up unintended tweets, I filtered out negative contractions and pieces of their long forms.

For example:
-didn -not removes posts with "didn't" and "didnt" (in case someone removes the apostrophe from the tweet to save precious character space). This should omit tweets like, "I didn't win...." or "I didnt apply..."

Removing posts with "not" ensures that "I did not win..." is not retweeted, while "Did you apply...?" gets through.

A work in progress

It would have been difficult to predict these retweets until an event like WWDC happened.

In modifying @CoinForTechConf to filter out scholarship losses, I had a few important lessons reiterated to me: It's really hard to capture intentions programatically.

There are pattern edge cases that might surface over time, in unique circumstances, and these can be very hard to predict. Bot maintenance may be a continual process of tweaking bot behaviors so that they don't negatively impact people.