On March 1st, Mylan Pharmaceuticals had their first ever hackathon. Since our team has been having monthly hack days in the office for a few months I thought it would be fun to try one outside the office. We read the rules and decided what we were going to build before we drove to the event to save us time at the event.
We arrived at the Mylan building in Southpointe at just before 8:00 am. The event was far more elaborate than I expected. They had branded sweatshirts, gift bags, and a fancy spread of food and drinks to start the day. The registration desk told is 23 teams in all signed up for the event. At 9:00 am we went into a large meeting room and listened to about 20 minutes of Mylan propaganda and some basic directions on what we were supposed to do. Since the directions said the event started at 9:00 am we wasted no time and started working. Jack
set up a Github repo and configured Azure for deployments. I set up a project kickstarter based on the AliaSQL Demo
and brought in some Nuget packages. By 9:30 am we had an environment set up and all 5 of us were working from the same codebase.
The plan was to build a tool to analyze Tweets over time. Since Twitter search doesn't do a great job of showing older data we planned on storing tweets in our own database and allowing analysis of this data over a selectable range of time. The theory was that you could track a word like "pharma" and see what words people were saying in tweets connected to "pharma". The thinking was that if there was a big IPO or discovery related to "pharma" it would be discovered in the data.
Divide and Conquer
There was a ton of work to be done so we split the tasks up as best as we could. Here is the rundown as I can recall:
- Set up the database & models
- Write data repositories
- Develop admin screens to create searches
- Develop interface to pull tweets from Twitter
- Automate the Twitter searches to run behind the scenes
- Build an algorithm to count words in a range of tweets and rank them by frequency
- Build graphs to show the word usage over time
- Build a way to show tweets related to a specific word
- Design a logo, and design concept for the product
- Put together a presentation to talk about the project
Putting it all together
We made decent progress the first few hours but the room was a bit loud and the table we were at was low enough that we were all hunched over. Around 12:30 we went out to get some food and thankfully discovered an open private conference room ripe for the taking. From this point, things picked up as we could talk aloud more comfortably. We hit some snags along the way... The word count algorithm was dismally slow with a large volume of tweets. Graphing out the data with the sliders and having this play along with knockout.js was challenging. Somewhere in here we got the idea to have another graph to track sentiment over time. This was done with an algorithm to weight tweets that contained positive words and negative words to get a sense of what people were tweeting during a given timespan. Somehow we finished up the final bits at around 4:50 pm - just minutes before the deadline.
The presentations and afterparty was held at Latitude 40 in Robinson - about 30 minutes from the Mylan building. We drew numbers for the order of the presentations which placed us 2 from the end. In a moment of serendipity we noticed that the sentiment graph for the "#mylanhacksummit" hashtag spiked positive as soon as coding ended at 5:00 pm and again at 7:00 pm when presentations began. This made for a good demo moment during our presentation. I went throught the demo a bit faster than I should have. It was my first presentation where someone else was "driving" and I had to just stand there and talk. Thankfully everything went well and the demo drew some applause.
In the end we placed 2nd overall. I would have liked to have won but after starting the day hoping we wouldn't come in last place it was a pretty good day. After the demos there was fancy food, a DJ, an open bar, and bowling. For a first ever event it was surprisingly organized and well thought out. The team at Mylan did a great job with this event. Congrats to "Team SOLE" (Jack, Marko, Shawn, Peter, and me) on a job well done.
Total word usage over a 4 hour span
Word usage over time
Sentiment over time