Offline

When talking about disconnected operation, the so-called “airplane example” is invariably the first thing talked about.  Stop me if you’ve heard this one, but a developer has to fly across the country and writes some code on the plane.  Two hours in, at 31,000 feet, he’s finished his changes and wants to commit them.  With a DVCS, this is possible, since he has a repository instance on his laptop.  How cool is that?!?!?

Well, not really that cool, if we’re honest. When it comes right down to it, most programmers don’t fly on airplanes very much.  When they do fly on airplanes, they use their laptops to watch Han Solo get frozen in carbonite for the 73rd time, not to write code. If, by some chance, they do write some code on the plane, it’s not always true that they actually need to commit the changes.  Finally, in 2011, many commercial airlines are offering in-flight Wi-Fi. Conclusion: Airplanes are not the best metaphor to use when talking about working while disconnected.

The thing I hate most about the metaphor is not its fundamental dumbness (though I do hate that plenty), but that disconnected operation is an important benefit of a DVCS and the airplane example is a lousy way to convince anyone of that fact.

Why does disconnected operation matter? Here’s one simple scenario: Suppose you are offline and you want to fix two unrelated bugs and commit them in separate changesets. With a second generation tool, you can’t commit until you get back online, so both of the bug-fixes are going to end up in your pending changeset at the same time.

Fine, so a DVCS is great when you’re offline. But that never happens anymore, right?

Actually, it does. If you need Internet access all the time, you will quickly discover how often you don’t have it.

I find that Wi-Fi Internet access is like the police.  It’s everywhere… except when you really need it.  Everywhere I go, I see cafes with Wi-Fi signs and McDonald’s with Wi-Fi signs and I have a laptop, an iPad, and an Android phone that all support Wi-Fi but I still have the strong impression that when I really need to use Wi-Fi, it’s not there.

This very paragraph is being written at 12:45pm on April 15th, 2011. I am sitting in the food court at the mall in Champaign, Illinois. There is no Wi-Fi here.

Furthermore, just because I have some form of connectivity does not mean that I want to be dependent on it. Even more common than “no Wi-Fi” is “crappy Wi-Fi” with high latency and packet loss. There are good reasons why I may want to do stuff offline and then sync. Peter Deutsch wrote about his “fallacies of distributed computing”[18] back in 1994, and they still apply.

We’ve never had more Internet than we have right now, and we still don’t have enough. There may come a time when offline operation is no longer an important part of the DVCS story, but that time is not yet here.