Kallistec

June 27, 2009

Could Google Wave Be a Panacea for Remote Pair Programming?

Filed under: ask the community — Daniel DeLeo @ 12:19 pm
Tags: , , ,

Gemini 1 by agent smith on flickr

Pair programming is hailed by agile adherents as an effective way to both implement and reinforce other agile principles. Code reviews? How about instant, real-time code reviews? Collaboration and teamwork? Why not do it constantly? Training team members and sharing knowledge? Make it part of your normal workflow. Moreover, Wikipedia’s take on pair programming references controlled studies demonstrating striking efficiency gains over independent solo programming. What has been consistently challenging about pair programming is how to do it remotely.

Ignoring the human interaction component, the solutions for remote collaborative editing come down to two approaches: one is screen sharing using remote desktop software, as Pivotal’s Chad Woolley does; the other is to use a purpose built collaborative editor. Both of these are suboptimal solutions. What if I use TextMate but my pair is a Vim addict? And another developer hops in the mix wanting to use emacs? Agreeing on one will make some of us uncomfortable; using a different editor entirely might make all of us uncomfortable. Sharing a screen also strains bandwidth which is especially precious if you’re trying to videoconference at the same time on the same circuit.

Is Google Wave the Answer?

I’m not in on the beta, and I’ve so far only skimmed the protocol, but I’m thinking Google Wave might be the answer. Now, Wave has a big pile of features, but it’s ability to show character by character typing (is it multicursor?) by any of the participants is the killer feature for this purpose.

One way to view what I’m proposing here is just an application of the traditional way programmers solve complex problems: delegate each part of the problem to a smaller component. We don’t make web apps out of loadbalancerappserverdatabases; we make apps out of load balancers, app servers, and databases. So why not have an editor and a collaboration server instead of collaborativeeditor?

Challenges

There are some hurdles to be cleared before we can create this pairing nirvana, most obviously:

  • Wave is focused on a messaging type paradigm, whereas we want a more document style paradigm
  • You might not want to use Google’s servers
  • Most editors have a hidden assumption that you’re editing a file on the filesystem, and it’s not being changed by another user or process while editing

These problems aren’t insurmountable. The Wave-centric challenges can be overcome by creating our own Wave server; this is almost guaranteed to happen anyway. It might be helpful to add a virtual host concept, similar to RabbitMQ’s vhosts, to our Wave server, and set up one per project.

As for the editors, I’m the optimistic type who always thinks it must be possible. The flip side of this is that I haven’t written any plugins and don’t know what APIs are available for arbitrating text. For this solution to work and be awesome, we’ll need text arbitrating plugins with external or built-in Wave clients for at least vim, TM, and emacs, ideally also for the newer IDEish beasts that are (finally) starting to (I hear) be really useful for Ruby and Ruby-centric projects.

First!! Wait, What?

Thinking about the possibilities that might open up if we had a project like this, I started to consider the advantages of integrating Mozilla’s browser-based bespin editor as a fallback option if nothing else, and I checked their blog. Lo and behold, they’re already way ahead of me, envisioning a real-time github sort of experience for editing. If you need a little encouragement to get pumped about this idea, look at this:

Oh, the possibilities!

It seems inevitable that, given Wave’s features, even more cool uses could be found than simple pairing. Here’s some suggestions:

  • Working with your designer remotely (or not!), she attaches wireframes as images to the project and you work together to create your view templates.
  • Continuous and automatic versioning. Wrote some good code and some crappy code since your last commit? Rewind!
  • Your pair (sitting right next to you) is an awesome coder who insists on an ugly theme or that editor you can’t (under)stand? No big deal.
  • Hard drive blew up and need to commit a fix right now? Get your bespin on!
  • You think of something. No, really.

Parting Thoughts

I try to back up most of my posts here with solid code, but in this case I’m a bit out of my element. Ideally some of you will talk about the following things in the comments or on twitter or whatever you kids are using these days:

  1. Can plugins arbitrate text in the editors I’ve mentioned? In your top favorite editor/IDE/code thingy?
  2. What’s a super cool awesome thing we could do with this that I haven’t thought of?
  3. You have super secret Google access or some other method of building a compliant Wave server without having to wait for Google to end their closed beta. (Looks like our Python friends are beating us to it! PyGoWave Server)

Photo “Gemini 1″ by Flickr User Agent Smith (Jonas Smith), CC By

Blog at WordPress.com.