Content-Type: RST .. figure :: http://blog.opensourcenerd.com/upload/twitter-bird-small I know I sound stupid mentioning Twitter_ barely now, but let's try to put that aside. I know about Twitter, and I have a Twitter account_, I really haven't seen a use for it before. I have considered and taken up (for 1 or 2 tweets) the habit of tweeting every little aspect of my life. However, that seemed like I was intruding on my own privacy, akin to how I don't put a neon sign outside my window that reads "24/7 Filip watch". (I know some of you want to watch me while I sleep, but I'm sorry, my dorm is on the 4th floor and that's impossible.) .. _Twitter: http://www.twitter.com .. _account: http://www.twitter.com/fsufitch .. figure :: http://blog.opensourcenerd.com/upload/free-candy-van I have plenty of Swedish Fish in my room, thank you very much. However, more recently I've been reconsidering my decision to not use Twitter. No, I don't think my mundane life should be more public, but I do think that Twitter would facilitate sharing of cool stuff with people even more than my blog does. See, there's so many things I see that people might like that I can't post about all of them here (and keep up the quality of the writing, bad as it may be). Besides of them, many speak for themselves, and really don't deserve more than a plain one-liner and a link. Yeah, I know, I'm being vague. Here's some examples of tweets that you'd find if I used my Twitter more often: - http://www.youtube.com/watch?v=IUDTlvagjJA Absolutely awesome. - http://www.facebook.com/photo.php?pid=3596280&l=3668f32906&id=722986201 - From my first look at this, it looks super-useful: http://code.google.com/p/python-twitter/ I'm pretty sure my Facebook friends would be happy if I posted all this on Twitter instead of spamming their news, too. So, what do y'all think? (of note, a "poll" blog feature is also on its way :) ) --------------------------- Now, on the implementation of this, if I were to use it. Since Twitter messages are small, I could just put a widget on the side of the blog. However, I will *not* use Twitter's Flash "widget" thing. This is an open source blog, and Flash is closed source. Not that I boycott it, but I'm trying to avoid it especially in what I write. Then what? If you look in the nice list of cool stuff I posted above, you'll see that I have a link to python-twitter. Here's how easy it is to install: .. sourcecode :: bash fsufitch@ubuntu:~$ sudo easy_install python-twitter And here's how easy it is to use: .. sourcecode :: python >>> import twitter >>> api = twitter.Api() >>> api.getUser('fsufitch').status.text "Maybe I should use Twitter more, but for posting cool stuff!" python-twitter is a wrapper around the API that Twitter itself provides to developers in order to make using it more "Pythonic". I could use this to make a page such as http://blog.opensourcenerd.com/twitstat (doesn't actually work currently) to display some simple HTML for rendering it, or nothing if the blog server isn't configured with someone's Twitter. My blog page could then fetch the Twitter status using AJAX. The reason I don't want to just have it embedded in the page by default is that getting the status itself is a HTTP request, which has its own builtin delay time. If I were to make my server fetch the status upon page load, it would be slower in returning the page. This way, it can return the page with AJAX on it, then your (the viewer's) computer can do the waiting for the status, with a request to my server that's exclusively for the Twitter status. It is a general piece of web development wisdom to dump whatever work or idling onto the user's computer instead of keeping it happening on the server, if possible. Chances are your computer is much more powerful than my server, and if it's something that's not vital to be present on the page upon load, and it can be rendered in Javascript, then let it be so. By the way, yes, this also means that you meanies using NoScript or the likes will not be able to see the Twitter status if/when I implement it. Hmph.