Difficulty Tapping into the Stream

Twitterbots! It was really cool to get programming in Python “out in the wild” and actually see things happening as a result. There’s some childlike glee in seeing lines of code transformed into action, and that seems to be amplified when the output is coming from twitter rather than a simple printout. In addition to getting the bot to walk through lines of text, I also was able to get it to post photos randomly selected from some I’d downloaded to my computer, which took a little more finagling. What I would really love to do is get it set up so that it’s watching the twitter stream and responds whenever somebody tweets at it or uses a certain hashtag, but that turned out to be a whole new can of worms when I tried to get started during our workshop, especially since my hasty google search didn’t find any useful implementations of tweepy along those lines.

Overall, I think that’s the one thing that really stuck out to me: the frustrations in sifting through tweepy’s documentation trying to figure out how to do things. I’m thankful to have a library to take care of calls to the twitter API for me, but nothing sucks quite so much as knowing there’s a function defined in a class and not being able to figure out how to call it. Another option would be to just write a program that searches for the things I’m trying to respond to whenever I run it, but that’s not nearly as fun as having it actively monitor the stream live. I’ll probably play around with both implementations a bit and see if I can get either one working; all of the ideas I could come up with for bots were pretty lame, but I definitely like the idea of having it be responsive rather than just chunking out lines from a text file. Here’s hoping that instinctive excitement at writing a program and watching it tweet helps me power through the torrent of error messages that are sure to be coming my way…

One thought on “Difficulty Tapping into the Stream

  1. Hi Java,

    I agree that the troubleshooting process could use some serious optimization. I also had trouble working through errors. This was mainly because my error codes were broad enough that they covered a wide variety of possible problems, and even worse, I had to sift through several poorly organized forums to find an effective fix. Seems like bug-hunting would lend itself to streamlined, centralized problem resolution flowcharts, and I’m surprised that no computationally inclined mind has created those yet. Hey, I think I have a startup idea…

    Ada

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*
Website