Martin Heller
Contributing Writer

Pair programming at a distance

analysis
May 4, 20082 mins

One of the drawbacks of working by myself is that I can't usually do pair programming. This is usually offset by the increased concentration and "flow" that comes from being by myself and undisturbed for long periods, but sometimes I just need another pair of eyes to look at my code. Last Tuesday was one of those times. No sooner had I published my little blog entry on "clans" than I started

One of the drawbacks of working by myself is that I can’t usually do pair programming. This is usually offset by the increased concentration and “flow” that comes from being by myself and undisturbed for long periods, but sometimes I just need another pair of eyes to look at my code.

Last Tuesday was one of those times. No sooner had I published my little blog entry on “clans” than I started to hear bug reports that traced back to some ActiveX code I’d written for PC Pitstop. It wasn’t straightforward: two people reported “IE aborted in an unusual manner” errors, but over 8,000 people had run it successfully. I’d missed a rare case.

After looking at the relevant code until my eyes started to cross, I gave Dave Methvin a call. “Dave, do you have a minute? I think that I’m insufficiently paranoid to fix this bug.”

Each in our separate offices in different states, we opened up the same Visual Studio project checked out from our version control repository, and looked at the same code. When either of us saw something we didn’t understand, we’d point the other at the line of code. It was almost like pair programming, but without the physical presence. In some ways it was better, because we each had our own mouse, keyboard, and screen.

“Look at line 129. What happens if that pointer is null?”

“How could it be null? It’s set in line 128.”

“Suppose there were no items in the list. It’s unlikely, but it’s still possible.”

“You’re right. I’ll add an ‘if’ test right there. OK, it compiles and I’ve checked it in: update your copy and have a look.”

We went on like that for about an hour, and convinced ourselves we’d found every possible problem in what was, after all, not very much code. Then I rebuilt the control, ran all my regression tests, and promoted the control to production.

The ending was happy: after that, there were no more reported “IE aborted” errors, even from the people who had reported them before.

Do you have your own ways of collaborating at a distance?

Martin Heller

Martin Heller is a contributing writer at InfoWorld. Formerly a web and Windows programming consultant, he developed databases, software, and websites from his office in Andover, Massachusetts, from 1986 to 2010. From 2010 to August of 2012, Martin was vice president of technology and education at Alpha Software. From March 2013 to January 2014, he was chairman of Tubifi, maker of a cloud-based video editor, having previously served as CEO.

Martin is the author or co-author of nearly a dozen PC software packages and half a dozen Web applications. He is also the author of several books on Windows programming. As a consultant, Martin has worked with companies of all sizes to design, develop, improve, and/or debug Windows, web, and database applications, and has performed strategic business consulting for high-tech corporations ranging from tiny to Fortune 100 and from local to multinational.

Martin’s specialties include programming languages C++, Python, C#, JavaScript, and SQL, and databases PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Google Cloud Spanner, CockroachDB, MongoDB, Cassandra, and Couchbase. He writes about software development, data management, analytics, AI, and machine learning, contributing technology analyses, explainers, how-to articles, and hands-on reviews of software development tools, data platforms, AI models, machine learning libraries, and much more.

More from this author