Ruby Hackery

I’ve had an idea for a quick one-off project that I can do easily with Ruby and deploy to my VPS server without much fuss. It involves looking at my friends and followers on Twitter, and showing me a list of people who follow me but I do not yet follow. I would implement it by using Net::HTTP to fetch the data and REXML to parse the XML feed (I could use json, but I am an XML guy and I totally love the REXML library now that I know how to use it effectively).

The idea is to help find people who are interesting in my Twitter social neighborhood that might be good to befriend. The problem with looking at just the unrequited followers is that a lot of those people are twitter spammers–people wanting me to follow them and click on their links. What an abuse!

So my idea is to look at my current friends, and get their friends list. Then I can compile a single list of say the top 10 people who show up on a majority of my friends’ lists that are not currently on mine. I can then show both lists along with their profile image, current status, and a link to their profile. Then I can choose to friend them or not. Each time I add a friend I would get better results!

I’d also like to take it a step further and find brand new people. I could try something with Twitter’s tracking feature where you get notified when someone posts a status update based on a certain keyword, but that gets spammy really quick and isn’t always the best way to find someone with similar interests. I’ll have to think about this particular problem for a while.

The only problem I see with this option is fetching the data for each user. The more friends lists I pull, the longer it takes, and the closer I come to exceeding Twitter’s rate limit. Ideally I could fetch all of my friend’s friends in one call, but right now as the API stands I would have to make one call per friends list. This means it will be hard to aggregate this data into something useful for this purpose. It’s just a small engineering problem that I’m sure I will resolve, even if I have to ask the Twitter guys for help or suggestions.


Leave a Reply

You must be logged in to post a comment.