If you’re a Twitter user you’ve probably faced the common scenario where you’re trying to write something but can’t quite fit it into the limit of 140 characters of a single tweet. As such you’ve probably resorted to reducing words down into shortened forms like text messaging or IM speak. There’s a big difference of opinion when it comes to use of text speak in general – people either love it or hate it – but on Twitter it’s very hard to avoid having to write using it or trying to translate what someone else has written!
Out of this common scenario came the idea for a little Twitter web app project I started a few months ago. Twitterative‘s purpose initially was to reduce tweets down by translating ordinary english language words into text speak (or should I say ‘txt spk’), but just recently I launched a new version (technically v1.1) of Twitterative which now attempts to enlarge tweets written in txt spk back in to a more understandable form. 1.1 also refines the user interface a bit and adding a few subtle effects hiding / showing the Post to Twitter button where appropriate. You can see a comparison of the old and new interfaces over at my Twitterative Flickr set.
Technical overview
In case anyone’s interested here’s a basic technical overview of how Twitterative works. The jQuery javascript framework is used throughout, a JSON text file containing word pairings of short and long forms such as ‘your / ur’ is loaded via an AJAX request when the site is first loaded.
These pairings are then pushed into a couple of arrays either of which are then compared to the text being pasted or typed into the text field on the left, depending on whether you are in Shrink or Enlarge mode. Each keystroke triggers the comparison so conversion is done in realtime in the browser as you type with no calls to the server or waiting around.
In Shrink mode once you have a tweet that you’re happy with you can click the ‘Post to Twitter’ button which will open the Twitter website in a new browser window where you can post the tweet directly from the web interface. I’ve used this method so far as there’s no requirement to use the Twitter API and no cause for concern with the user about having to enter their Twitter credentials to post. Just quick and easy tweeting!
I’m reasonably happy with how it’s working so far although there are a few issues with enlarging text speak back to ordinary language due to some of the characters used clashing with the syntax of the regular expressions used.
Future features / improvements?
There’s definitely room for improvement with the conversion process, I’m happy for people to tweet me feedback, just go to Twitterative and use the ‘Tweet me feedback’ link at the bottom of the page.
Asides from bug fixes and tweaking current features I’m also planning to add support for shrinking and enlarging URLs which will obviously help reduce the size of tweets containing URLs – at the moment it does nothing with them so it’s hot on my list of additional features. I also want to add direct linking into your Twitter account to provide two features: Direct posting to your Twitter stream and also to be able to move through the lists of tweets from people you follow and automatically enlarge them from text speak to ordinary text. The authorisation will be done using Twitter’s OAuth API so it will be safely done without ever having to give your login details to Twitterative.
That’s basically it for the future plans! I hope you find Twitterative fun to play around with, let me know either via comments on this blog or better still Tweet me the feedback!