Better Programing Practices: Pair Programming

In previous start-up companies I’ve worked at, it’s been implied that the official development process was something along the lines of Extreme Programming (XP) . In the book Extreme Programming Explained by Kent Beck, it is suggested that Pair Programming is an essential element to effective development with XP. So why is it that none of my managers encouraged pair programming as a regular development practice? I think one reason is that it seems counter-intuitive that a pair of developers can produce more code with higher quality on a single computer than that same pair working on two different machines.

One great thing about starting your own company is that you have more flexibility to experiment, so Clint and I have taken the opportunity to try some pair programming. Our most recent adventure into pair programming was an effort to build a new feature into our top secret project which would enhance usability greatly. The feature (which I’ll likely discuss in a future post) is really hard to implement…. so much so that of our three main competitors, all of whom who have had commercial products for over 5 years, only one of them supports this feature fully. Through careful collaboration in the design process, and then pair programing to turn our design into reality, we were able to get this feature working fairly well in a matter of several days. When I tried to build this feature out on my own previously, I probably spent 5-6 days implementing it and debugging it, with an unacceptable result.

Why is pair programming better?

  • Problem solving – When working on hard problems, two brains are better than one. Often when I would be stuck on a difficult conceptual problem, Clint would have a solution that I hadn’t though of. This kept our momentum going, and allowed us to make rapid progress.
  • Faster Development – When I was at the keyboard, Clint often spotted stupid mistakes I’d made (or visa versa). This allowed us to correct the mistakes before we compiled and tested the code, drastically reducing debugging time.
  • Quality – Having the input of two people during the design process has a tremendously positive impact on your design. Having two eyeballs on the design will help reduce the risk of introducing mistakes, and help increase your chances that you’ll get the best design in place early on.
  • Focus – I literally think the internet is giving me ADD. When pair programming, you are squarely focused on the task at hand. Distractions such as IM or email are less likely since that would be rude to the person you are working with. This intense focus makes a huge positive difference with anything you work on.

I’m sure pair programming isn’t for everyone, but I think we’ve been able to solve hard problems that we wouldn’t have been able to otherwise. While we haven’t decided to make pair programming something we do 100% of the time, I think that whenever we face a difficult problem in the future, pair programming will be the natural choice.

Is OpenLaszlo right for your project?

Even as a former employee of Laszlo Systems, deciding which Rich Internet Application framework to use for the new venture was harder than I thought it would be. Clint and I really wanted to use OpenLaszlo, but AJAX was making headlines. Furthermore, AJAX/DHTML applications were being successfully deployed all over the place. Even though it’s challenging to question using a technology that you’ve invested 2 years of your career on, when starting a new company, you better do it or risk paying for that decision later.

Some pros of OpenLaszlo include:

  • Clint and I know LZX, Laszlo’s markup language, really well (Clint was the lead developer on the ColorSmart Application for Behr Paints).
  • Since Macromedia tightly controls the Flash web browser, you can be sure that 99% of what you write will run in any browser that has flash 6 or higher installed. (At the time of this writing, Macromedia claims that flash 6 or higher is running in over 96% of web browsers out there)
  • At the moment, LZX is a lot more elegant, and fun to write when compared to AJAX. (though, there are several frameworks out there that are trying to change this)
  • LZX gives you constraints, delegates, animation, data binding/replication out of the box for free
  • No need to cobble together scraps of code from all over the place to build a framework…. it’s all there for you in one nice place
  • OpenLaszlo is open source, making deployment costs much lower. We thought we had enough experience with Laszlo that we could get by for a while without paying for support.

Some pros of AJAX include:

  • There are many examples of deployed AJAX applications out there. The developer community around DHTML/AJAX/whatever has been around a LONG time.
  • It’s not flash. Be it justified or not, developers are always wary of flash. I think this has something to do with the gratuitous flash animations that you occasionally see misplaced on corporate web sites. For our purposes, if we ever expected to sell our application, developers have to see this as something they could work with.
  • Javascript in the web browser is WAY faster than it is in flash. While this isn’t too much of an issue in Laszlo apps on fast hardware, slower hardware can have some issues in certain situations

(If you think I’m missing something critical in these lists, feel free to let me know and I’ll update it)

So what did we decide? We eventually concluded that utilizing our Laszlo skills would give us a competitive advantage, and decided that whatever project we choose to chase down (there were many) should be something that Laszlo is perfectly suited for, and would either be impossible or really hard to do in DHTML. We are really excited about the project we’ve started working on, and can’t wait to show it off soon!

Need help deciding if OpenLaszlo is right for your project? For a limited time, I’m available for one day consulting gigs. Email me at: