I am not longer just Elizabeth. I’m also a Twitter bot. Yeah, you read that right!
These past two weeks, I have been creating a bot for Twitter. It’s been a process, that’s for sure!
When I was trying to come up with a topic for my bot, I had a bit of a tough time. I read through plenty of examples, and then I remembered that some of my Twitter accounts are those that Tweet out things that are relatable while also being funny. I have those moments where I want to ask “Am I the only one?” Typically, especially after reading these Tweets, I learn I am not! I wanted to add to this. I will admit that I needed Google to help me out in order to come up with about 100 different scenarios. The project started with me just having one origin statement that was “That moment when…” After reading the assignment more carefully, I learned that we needed our bots to iterate our codes 100,000 times. I definitely was worried that I was going to need to start over completely. I really didn’t want to because I loved the idea of my relatable bot.
I decided that I would still hold on to my original code in case I was able to figure out a way to revive it. In the mean time, I made a silly bot that would tweet out really random compliments. Some of the possible Tweets included “Excuse me! Your niece is empathetic and intuitive!” and “Hey you! Yeah you! Your mom’s cousin’s daughter-in-law’s dog is ambitious and beautiful.” I wasn’t as crazy about this one even though it would be pretty funny (maybe?), I couldn’t shake the idea of my That Moment When… bot. I decided to return to it after working on the compliment bot. I decided to make more relatable scenarios, different endings, and more origin statements.
The next day, we had an in-class workshop. My group looked at all of my code and was sure I had plenty. I was worried, though, because we weren’t completely sure we did the math correctly. After talking to Dr. Whalen, I realized that I could put multiple scenarios in one sentence/Tweet! A lightbulb exploded in my mind! I hadn’t even thought of that!
As I am writing this, I have just about finished my code. I decided to include 12 origin statements that each scenario could choose from. Then, I decided to add a few scenarios to the list of #alternatives1# and then decided to create a whole new list of scenarios. I added the list #alternatives2# and by the end, both lists contained around 50 scenarios in each. I thought about combining all of them into one long, exhaustive list, but then decided that I didn’t want two of the same scenarios showing up in one Tweet, even though I can see some hilarity in that situation. Lastly, I edited and added some endings that would be added to the… ENDING! You guessed it! I added some statements/words/expressions that would be added to the end of a Tweet to add to the comedy aspect I am trying to convey.
280 characters is also an interesting element of this project. I wanted to ramble on in some of the scenarios, but then I remembered that I had a limit and if I wanted to include EVERYTHING that I wanted to, I needed to be brief and a little more vague than I wanted. However, no one wants to read a Tweet that is paragraphs long. The whole point of Twitter is to to have short bursts of commentary and/or jokes.
If you want to find my Twitter bot, it’s username is @_too_relatable.
Some of the Tweets that have already been published include:
I love it when you walk into a spider web and you become a black belt karate master or when you wake up and you can tell you slept really well because of all the lines on your face, legs, and arms from your sheets. You're not alone.
— That Moment When… (@_too_relatable) September 6, 2018
I hate it when you put your music on shuffle but you skip every song until you get to the song you wanted to listen to most. Oh, just me? Oops.
— That Moment When… (@_too_relatable) September 5, 2018
If you would like to view my code, you can find it on Cheap Bots, Done Quick!
Here’s a little taste!
"origin": ["That moment when #alternatives1# or when #alternatives2#. #ending#", "I hate it when #alternatives1# or when #alternatives2#. #ending#", "I love it when #alternatives1# or when #alternatives2#. #ending#", "That awkward time when #alternatives1# or when #alternatives2#. #ending#"... "alternatives1" : ["certain people call my phone and I have to wait for it to stop ringing so I can use my phone again", "you stub your toe and you see your life flash before your eyes", "you walk into the kitchen and you have no idea why you decided to come in there", "you literally say in your head 'Wed-nes-day' when trying to spell Wednesday"... "alternatives2" : ["you realize sleeping is the only thing you have done perfectly in your life", "you raise your hand to answer a question but another person shouts the answer out", "you make eye contact with someone through that little crack in the bathroom stall", "you throw something to your friend but it hits someone else in the head", "you wake up and you can tell you slept really well because of all the lines on your face, legs, and arms from your sheets", "you're listening to a song and every word explains your life perfectly", "you see someone you don't like so you pretend to be on your phone"... "ending" : ["Period.", "Oh, just me? Oops.", "Anybody else?"...
I am very happy with how this bot has turned out. I created it on the free website Cheap Bots, Done Quick! It was a very user-friendly tool to use, especially for someone (like me) who is not the most excelled coder. There are also no limits to how many lines you can use, words you can use, and it connects directly to your Twitter so I don’t have to stay on top of it and how many Tweets I send out. Right now, I have it Tweeting out every 6 hours as to not create spam, but still be something that stays relevant and visible on Twitter users dashboards. Who knows, maybe my Twitter bot will go viral! Please let me know what you think!
How do I know that there will be 100,000+ variations?
There are 12 origin statements. Each one either uses all three lists (alternatives 1, alternatives 2, ending) or just two of the lists (alternatives 1 OR alternatives 2, and ending). There are about 50 alternatives in each “alternatives” list. There are 7 items in the “ending” list. Each statement will be unique because of the 12 origins. Each origin will be able to pick from the same 50 #alternatives1#, 50 #alternatives2#, and 7 #ending# lists or from the same 50 #alternatives1# and 7 #ending# OR the same 50#alternatives2# and the 7 #ending#.
The math equation I calculated looks like this:
(50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 50 * 7) + (50 * 7) + (50 * 7) + (50 * 7) + (50 * 7) = 141,400
I know it is very confusing/overwhelming when you first see it, but on paper I broke it down to be much easier. This problem illustrates the choices for each of the 12 origin statements.