james mckay dot net

Because there are few things that are less logical than business logic

On Git’s growth and the reliability of the Eclipse survey

I’ve had quite a few comments on my blog post about Git questioning my conclusions, so I thought I’d better follow them up, since my original post didn’t make it entirely clear why I’d come to the conclusions that I had.

Why did I write this post?

Because Git’s growth exceeded my best-case expectations by a significant margin.

Up to now there’s been a possibility (and quite a plausible one at that) that Git’s popularity might be an illusion, thanks to the echo chamber of the blogosphere and its noisy fanboy culture, and that its usage might be largely restricted to open source projects, Ruby on Rails shops, and hobbyists, with little traction in corporate settings. This is what the Subversion folks would like us to believe:

Greg Stein, an Apache vice chairman and vice president of the Subversion project, suggests that Git’s rise may not be a deep one. “I think a lot of what we’re seeing is that Git has got a lot of mind share. [But] I don’t know if it’s necessarily true that a lot of corporate development shops are switching [to Git],” he says.

In the past year or so, there’s been some anecdotal evidence coming to light against this position, but no conclusive quantitative surveys up to now showing the extent of Git’s adoption in the enterprise. But the past three years have given us enough data to start coming up with some testable predictions as to what this year’s results would be, to confirm whether or not this might be the case.

In the end, Git’s result was significantly higher than even my most optimistic prediction, which leaves little or no room for argument on this one. Any claims that it hasn’t yet “crossed the chasm” are now quite frankly preposterous. The myth that it is not suitable for enterprise settings has been well and truly busted.

Mythbusters "Busted" image

Isn’t this just fanboyism?

I’d just like to clarify in response to this one that I’m not a Git fanboy. I still have a strong preference for Mercurial, and have no intention of stopping using it in the immediate future. It is much more polished, much easier to learn, much more predictable, and all in all a much better advert for what distributed version control should be. It’s also much more powerful than Git users give it credit for, and much less intimidatingly elitist. In any case, I can always use hg-git to integrate it with Git repositories if necessary.

Git versus Mercurial is The Hunger Games of programmingPersonally, I feel that the software development world has been bullied into accepting Git instead by people who have insisted on treating the whole DVCS scene as if it were The Hunger Games, and if they’d only just recognised that the first and most important rule of marketing is that first impressions count the most, we’d have got to where we are now a whole lot faster.

In actual fact, many people who use Git are unhappy with it. It’s rather telling that Git not only has more “hates” on amplicate.com than TFS, but a higher ratio of “hates” to “loves.” Maxx Daymon says this:

Of the shops I know that have converted to git, it was driven by an aggressive few, and the majority of developers are and remain unhappy about it. They may get over it, but they certainly haven’t become git evangelists in the process.

Yes, Git has won, but it’s won a battle that it had no business fighting in the first place. Whether we like it or not, it’s well on its way to becoming the industry standard, so we just need to get used to it, like every other industry standard. (Heck, who in their right mind still thinks that XML was a good idea?)

Do the survey’s demographics affect my conclusions?

Two or three people asked me about potential sources of bias in the survey. While there will be demographic factors at work, as far as I can tell, these tend to reinforce my conclusions rather than undermine them.

The survey’s demographics are Eclipse users. Eclipse is a Java IDE, a whole lot of related tools, and the organisation (the Eclipse Foundation) that oversees their development. Java is, by some accounts, the most widely used programming language in the world, but it is not a trendy or cool language to work with like Python or Ruby (Android development notwithstanding), and Eclipse is not a trendy or cool IDE to use, so the chances are high that if you’re using it, you’re getting paid for it. In fact, the survey actually asked this question: only 3.8% of respondents were individuals, not associated with any organisation, and 6.7% were students.

The biggest area that is under-represented here is, obviously, Microsoft developers. This means mainly that we have little or no idea as to TFS’s market share. It also means that Mercurial usage may be under-represented too, but anecdotal evidence seems to suggest that there is a general drift away from Mercurial towards Git in the Microsoft world as well.

I wondered if Android development could be skewing the results, since Git is the de jure standard SCM for Android development, and Eclipse is the IDE recommended by Google. However, only 4.1% of respondents said that they are primarily developing mobile applications, so I don’t think that’s much of a factor after all.

All in all, it seems clear to me that we have a pretty enterprisey demographic here, certainly not one composed of early adopters and innovators. In fact, if anything, early adopters and innovators are probably under-represented. Besides, if this survey really had been influenced by early adopters and innovators, they would have shown a much higher result for Git last year as well.

There is one other issue to be addressed here. 84% of the respondents to the survey write code in their spare time, so perhaps they are early adopters and innovators after all? In actual fact, this wouldn’t make the slightest bit of difference to the survey outcome for the following reason. Any software development team will contain a mixture of early adopters, of pragmatists, of conservatives, and of laggards. But they will all use the same primary source control system. Early adopters in Subversion shops will tick the Subversion box wishing they could be ticking the Git box instead. Mercurial fans in Git shops will tick the Git box wishing they could be ticking the Mercurial box instead. Maybe some people in Git shops will tick the Git box wishing they could be ticking the Subversion box instead. And so on.

The fact remains that these are corporate developers working in corporate shops telling us what their companies are using, not what they are trying to get their companies to use.

Isn’t this an argumentum ad populum?

The implication here is that argumentum ad populum (the idea that the most popular tool is the best) is a fallacy.

This overlooks the fact that at a certain point, increased mindshare does start to produce tangible benefits. Development proceeds faster. More products and services are released that support it. It becomes easier to recruit developers who are familiar with it. It becomes easier to find training for it. The gap between it and the alternatives widens, making it an even more compelling option. The effect becomes self-reinforcing and can even end up with the leading product establishing itself as a standard. Economists call these factors “network effects,” and they are the reason why, for example, the inefficient, uncomfortable and wrist-trashing qwerty keyboard layout still has an iron grip on typing, and we have so much difficulty persuading people to consider technically better alternatives such as Dvorak or Colemak.

We’re seeing this with Git. An increasing number of services are coming online that only support Git: high profile examples include Github and Heroku. Bitbucket introduced Git support back in the autumn, only a year and a half after declaring that it would never do so. Windows Azure has first-class support only for Git and TFS, with neither Subversion nor Mercurial getting so much as a mention. Some of the Git IDEs may still be rough around the edges now, but what will they be like in a year’s time?

Another effect of increasing mindshare is that Git is turning into an industry standard. For open source, it has been the de facto standard for some time now for starters. For some areas, it is even the de jure standard. If you want to do Ruby on Rails development, or Linux kernel development, or jQuery plugin development, or Android development, or Node.js development, for example, it’s simply not up for discussion: you use Git. This may not yet be the case for whatever area of development you are involved with, but it’s only a matter of time.

Don’t tools and languages come and go ridiculously quickly?

One objection was that fashions in software development tools and languages change very quickly and developers are a pretty fickle bunch.

In actual fact, this is only true for languages and tools that are currently in vogue with the cool kids. Once something approaches the top of the mainstream, it’s a completely different ball game.

Let’s consider programming languages as an example. At the moment, there is a lot of excitement around languages such as CoffeeScript, Clojure and Scala. CoffeeScript recently entered the top ten on Github, for instance. However, if you look at the Tiobe Index, you’ll see that these languages are all fairly low down the overall popularity list. Question tags on Stack Overflow and searches of job listings paint a similar picture. The list of top ten programming languages in industry changes at a rate that can best be described as glacial. Tiobe Software noted last month that the only change to their top ten list in the past eight years has been that Objective-C is in and Delphi is out. This is understandable, because once code has been written, it tends to stick around.

Source code management tools are another area where change at the top is slow. Again, you can understand why. Your source control system has been entrusted with the safekeeping of your intellectual property — your assets, your team’s entire commercial value. It also sits at the heart of your processes and infrastructure, and changing it for another system is a major undertaking and not a decision to be taken lightly. When you do change, you do so as a carefully planned exercise spanning months or even years.

For this reason, I didn’t expect Git to poll much more than about 20% or so this year. The fact that it has gone from less than 13% market share to more than 27% in a single year is quite extraordinary, and not to be taken lightly. It’s now up near the top of the mainstream — a position from which it won’t easily be shifted — and if its current rates of growth continue, it’s on course to overtake Subversion to become the most widely used SCM industry-wide within a matter of months.

What results did I expect, and why?

Based on the figures from previous years, I expected Git to poll somewhere in the 18-20% range.

The best possible scenario would have been where Git grew industry-wide at roughly the same rate as Github. Github reached one million users in mid-August, and today, it has grown to just over 1.7 million — a year on year growth of about 90%. If Git usage industry-wide continued at this rate, we would expect it to score about 24% in the survey. However, due to the natural conservatism of corporate development shops, I thought this would be an upper limit — and a pretty unlikely one at that.

On the other hand, if Greg Stein’s analysis proved to be correct, and Git adoption really was hitting a roadblock in corporate settings, I would have expected to see its growth over the past year to have slowed: perhaps somewhere in the region of 16%, mainly because Git has been close to saturation point among high-profile open source projects and Rails shops for quite some time now. Open source projects which have only recently migrated, such as Django and MediaWiki, are fairly late adopters in this respect, and ones that are still clinging to Subversion, such as WordPress and Apache, are notoriously conservative.

The results for Mercurial took me by surprise, however. I expected it to have grown slightly — possibly as high as 6% — or at the very least to have held steady. The fact that it has lost nearly half its users was most disappointing.

What about interoperability tools?

Mercurial and Git do work fairly well together via the hg-git extension, though you may find one or two corner cases where it may not be totally seamless. For example, Git supports octopus merges (where you can merge several branches into one in a single commit) but Mercurial doesn’t, and I’m not sure whether hg-git could handle that consistently. I did also end up with duplicate changesets on one occasion a couple of years ago, though I never got round to looking into exactly why, and it may have been due to a problem that has since been fixed.

Both Git and Mercurial can be used as a front-end to Subversion, and if you are stuck with Subversion I strongly recommend it if possible. However, there are limitations to what you can achieve with these tools, and you lose out on the significant benefits to team workflow that DVCS tools can provide. They are also a very leaky abstraction: Subversion only supports a single line of development on each named branch, for instance, so you will have to make much more extensive use of rebase, which is a riskier and more difficult operation than merging. There are also plenty of ways in which Subversion users can really mess with your day, such as such as renaming a branch, or moving a subtree from one branch to another, or using file externals.

Git can be used alongside TFS with git-tfs, though I wasn’t able to get it to work due to networking issues so I don’t know how well it works.

Should you switch to Git?

My whole point of these posts has been that you can no longer dismiss DVCS out of hand as only being suitable for open source and noisy fanboys, and that you need to take it seriously, no matter how big or small your team. Whether or not you adopt Git wholescale is a different matter that depends on several factors.

As I said, switching your source control system is a major undertaking and not one to be taken lightly. On some existing projects, especially those with a lot of deeply entrenched processes and infrastructure, or long-term contracts in place, it may not even be possible. For projects whose main phase of development is over and which are now in maintenance mode, it’s probably not worth it. In some cases, specialised regulatory requirements may pose additional constraints, though personally I’m sceptical about claims to that effect: contrary to what some vendors will tell you, it’s certainly possible to be ISO9001 or CMMI compliant using Git.

However, it’s becoming abundantly clear now that the writing is on the wall for Subversion. For now, it’s still the most widely used option, and its decline over the past year may have been slower than I expected, but if current trends continue, it will be overtaken by Git industry-wide in about a year’s time. It is a very basic, spartan system even by centralised source control standards and its development is slow. No doubt it will take several years to die off completely (eight percent of developers are still using CVS, believe it or not) but it’s only a matter of time before you will need to plan for its end of life.

Despite its loss of mindshare, I still think Mercurial is worth considering as an alternative to Git. I do wonder how long it can sustain enough momentum to remain viable, but should you need to, switching from Mercurial to Git is almost trivial thanks to hg-git. But certainly for new projects, you need a very convincing reason to stick with old-school centralised source control now. And these reasons are starting to run out.