Facebook chat needs push/pop

Posted by Andrew Mon, 22 Sep 2008 11:37:00 GMT

I’m not usually the guy who sits at the back and complains about other people’s work which far exceeds mine, but I do have something which might add to Facebook chat. Now apart from the obvious problems that Facebook has with tracking the presence of its users and the incompatibility with many Facebook users’ browsing patterns and the chat presence system, Facebook chat is pretty cool. Not all of my friends are IM types, and sometimes you just want to casually chat, so it’s pretty cool feature. There is, however something I’d like to pull in from the IM world into Facebook chat is a concept called Push/Pop.

Push/pop is a programming concept, probably best explained by someone else. I am yet to find someone who doesn’t explain it using programmer talk, so I’ll try to see what I can do. Imagine you write messages on slips of paper, and put them in a stack (key word here). Now you want to manipulate that stack. The two most common operations you would do would be to push (to add something to the stack) and pop to take something off the stack (generally the same end that you pushed to). So if we think about our stack of paper, say I write something like “I do not like green eggs and ham” and push it to the stack, then I push another slip of paper that says “I do not like them sam I am”. Then I walk away for a bit, and I want to go back to my last slip of paper, which I pop off the stack.

Now that is totally overly simplified, and yet still long-winded, but I hope you get an idea. Here it is for the visual people:

Push/pop

So all that (and what a wonderful drawing it is), to get to what I’d actually like to do…

So how do you take this to Facebook chat and make it useful? Lets look at how other chat applications have done it. I use irssi for IRC and it has a reasonable implementation, quite typical to chat. By default, ever line you send in irssi (basically everything you say) is pushed to the stack. You can easily pop it back out by pressing the up arrow. You can also move further through the stack by pressing the up arrow more. You can manually push a line you haven’t sent by pressing the down arrow. It can be popped out the normal way, using the up arrow. Simple, no?

Another application that does push/pop well is Adium, the IM client I use. I’m not going to explain how it works with words, I’ll let NSLog()’s Erik explain, with the help of David Clark:

  • Your friend sends you a message (i.e. “How do you properly kill an NSTimer?”)
  • You start a long-ish reply (i.e. “You have to invali”)
  • They send you another message which requires a shorter response (i.e. “Is it cold there?”)
  • You press ctrl-s, which temporarily stores your long-ish message on a stack and clears the message field.
  • You reply with a short message (i.e. “Hell yeah!”)
  • You press ctrl-s, and your unfinished message reappears! You finish typing “date it and then make sure you do with the memory what needs to be done - release it, assign nil, whatever.”)

Now with pictures…

Push/Pop example

Here I press ctrl-s, or ctrl-down

Push/Pop example

And then send that message and press ctrl-s again, or ctrl-down

Push/Pop example

Adium also has the ability to interact with a stack of already sent messages, by using the option-up/option-down combination.

Now this shouldn’t be too hard to implement in Facebook chat, and considering their problems with presence detection and the way people pop on and offline and messages don’t make it due to all sorts of issues, I can definitely see a use for push/pop in Facebook chat. The fact is, I wrote this whole article because I saw how it would fit in nicely.

In terms of implementation, well hopefully Facebook’s developers can handle a simple array to use as a stack (probably using JSON or similar to keep things persistent between pages) and then the keyboard shortcuts can be implemented using something like this jquery implementation.

Did I miss something?

Update: Peter Hosey asked me if I used Adium for Facebook chat (Adium had this feature as of the 1.3 release). The answer is I did for a time, but suffered from logout bugs and other issues which lead me to switch back to the traditional option. Now I have more time to submit bug reports and help troubleshoot, I may look into using Adium again, but it doesn’t remove the need for push/pop in Facebook chat. There are users other than myself who don’t use any other IM software, and also I don’t always have Adium to hand, for example when I am on a public/borrowed computer.

Tags , , , , , , ,  | 4 comments

What's in Your Menu bar?

Posted by Andrew Fri, 22 Jun 2007 23:17:00 GMT

Okay folks, here's a bit of nerdery. Erik Barzeski has asked what's in your menu bar? and I think it's about time I answered one of his questions. My menubar lives on my 12" powerbook, so I try to keep it pretty small, because I only have so much space, but recently it has expanded.

menubar

From right to left, we have Spotlight, Tunnelblick which is an OpenVPN GUI for Mac, my clock (yes it is 1:48 am), the battery indicator, processor and network usage menumeters, display and wireless menus, Twitterrific, last.fm client menu, Adium and finally Aaron Wallis' latest creation, DeskLickr, a cool little app which changes your desktop background using images from Flickr.

Now, I'm going to turn it over to you folks: what's in your menu bar. And since this is an equal opportunity blog, what's in your system tray on Windows or in your... whatever you *nix nerds call it?

Tags , , , , , , ,  | 3 comments

Some Spring Cleaning

Posted by Andrew Mon, 13 Mar 2006 14:51:00 GMT

You might have noticed a few changes in the sidebar. Probably not, because you’re most likely here for another 15 seconds, and then you’ll be clicking on that link (once you’ve hunted it down because your eyes have been playing tricks on you). For the rest of you, the google ads have gone. Partially because they were an eyesore, partially because they were increasing load time and partially because as people said, it was a mite hypocritical to whinge about badges and such and have a tower of google ads there.

I’ve also added links to my about page and a page detailing TownCrier, my IRC bot. I’m actually rather proud of TownCrier and what he does, so check it out. Some of this cleaning is also because I’m looking to get my blog reviewed in a while, probably after my exams so I can have some interesting content on here for the reviewers to see.

I’ve been struggling with content lately. So I’m going to put it to you: what would you like me to write about. Leave a comment and I’ll give it a shot.

Tags , , , , ,  | 5 comments