How Messing Around With the Facebook and Flickr APIs Got Me an iPod and a Job

"Mom, I accidentally a job." I was excited, and articles of speech were only slowing me down. "HubSpot. They me a job." Who needed verbs anymore? I got a job at HubSpot. Sure it was only an internship with me still being in school and all, but still. How did I find myself in this awesome position, you ask? Well it's simple. I made a web app.

I got an email from a CS academic adviser explaining that The HubSpot Web App Challenge was now open to all CS majors. The challenge was a simple idea: have a user connect to their Facebook account, and use their profile information to show them some pictures on Flickr that are somehow relevant. At first I thought it was pretty straightforward. Grab a bunch of interests from their info (movies, music, activities, etc.), and then search for pictures of those items on Flickr. Then I thought about what’s in my info: Tay Zonday, Internets, Ben Folds, and “samy is my hero.” I realized that I don’t really want to see pictures of any of that, and tried thinking of something a little more clever, resulting in a headache and no new ideas. So I did what anyone does when they’re trying to get something done; I went on Facebook. But the headache was making all those annoying words all over my news feed really hard to handle. If only it could be displayed to me as a series of pictures instead.

The two real challenges that came up in making TL;DR were finding which phrases in each post to try mapping into an image, and dealing with the Facebook API. I only had a limited time to get this thing working and then look halfway decent, so I wasn’t going to be recreating Watson to pick out important phrases. I just needed something that looked sort of intelligent about it most of the time. Almost right away I found that using each individual word was pretty much useless, both in terms of latency and quality of results. After a lot of trial and error, I eventually settled with splitting posts on any punctuation or instance of a word from a defined set, like “the” or “and” using a regexp. It isn’t the best way to get very accurate chunks of meaning, but then again Flickr’s tags generally give you nothing related to what you searched for anyway. The whole thing quickly turned from making a legitimate tool to “hey this could be pretty funny” when I saw it take “happy birthday pope” and replace it with a picture of a small child dressed as the Pope standing alone in a hallway looking sad. After getting over the frustration of Facebook’s Graph API not handling the offset and limit parameters as promised (or sometimes just not at all) and creating a function to manually pull the “Next Page” URL out of the API call data, I finally had a working app.

The two real challenges that came up in making TL;DR were finding which phrases in each post to try mapping into an image, and dealing with the Facebook API. I only had a limited time to get this thing working and then look halfway decent, so I wasn’t going to be recreating Watson to pick out important phrases. I just needed something that looked sort of intelligent about it most of the time. Almost right away I found that using each individual word was pretty much useless, both in terms of latency and quality of results. After a lot of trial and error, I eventually settled with splitting posts on any punctuation or instance of a word from a defined set, like “the” or “and” using a regexp. It isn’t the best way to get very accurate chunks of meaning, but then again Flickr’s tags generally give you nothing related to what you searched for anyway. The whole thing quickly turned from making a legitimate tool to “hey this could be pretty funny” when I saw it take “happy birthday pope” and replace it with a picture of a small child dressed as the Pope standing alone in a hallway looking sad. After getting over the frustration of Facebook’s Graph API not handling the offset and limit parameters as promised (or sometimes just not at all) and creating a function to manually pull the “Next Page” URL out of the API call data, I finally had a working app.

header small resized 600


I submitted it to the competition, showed it to some of my friends, and went to sleep, thinking it was going to be another toy I made that sits forever in my projects folder with no one to love it. Imagine my surprise when I got an email from Mr. Tim Downs himself congratulating me on my second place win and asking when I could come in to pick up my prize: a new iPod touch. I left HubSpot the next Friday with a new iPod, a pile of swag, and an invitation to send in my resume, and a few days after that I had an internship offer in my inbox.

It’s a fantastic opportunity that I never would have had if I hadn’t entered a competition that I never thought I could win. Sure, I didn’t actually win, but I think overall I did. So my advice to all the developers out there looking for an opportunity, as a semi-contest-winner, just try to do it anyway, whether you think you have a shot in hell or not. Your high school guidance counselor may have beaten the idea to death, but it doesn’t make it any less true: You never know what’ll happen unless you try. I thought I might get a few hits to my site and something to add to my portfolio, but instead I ended up with a new iPod and a job. 

so-hiring
Nick Pettazzoni

Written by Nick Pettazzoni

Subscribe for updates

    New Call-to-action