Earlier this week I wrote a post titled The Popularity of Go. The post itself turned out to be quite popular, and I received a lot of great feedback from the Go community (thanks!). One thing I brought up in the post, and that a lot of folks commented on, was the apparent popularity of Go in China according to Google Trends. The graph above shows the searches for “golang” by country on Google Trends. Impressive, right? So many more searches for “golang” in China than anywhere else in the world. Like many others, I too wanted to know why. I’m not much of an investigative journalist, but I decided to do some of my own digging anyway. Is Go really that popular in China, or are we seeing skewed data? And if the data is skewed, why, and how much?
One redditer suggested that, perhaps, “golang” is in fact a word in a dialect of Chinese. Being able to speak and read Mandarin Chinese myself, I was intrigued by this idea - it seemed plausible, at least. So I hopped onto Baidu.com, and did a search for “golang” (Baidu is, for those of you who don’t know, by far the most popular search engine in China). The first one hundred results all related to the Go programming language in some way. So perhaps it doesn’t have a different meaning in China after all.
But we don’t need to rely on anecdotal search results for evidence, we can confirm that Chinese searchers genuinely are interested in Go, the programming language, by seeing what percentage of visits to golang.org are reported to be from China on Alexa.com. This is what we find:
The US weighs in at 18.9% of the total visitors to golang.org, with China coming a reasonably close second, at 12.1%. This is already enlightening: the Google Trends graph made it look like the US interest in “golang” was nowhere close to that of China, but here we see that more visits to the main Go-related website come from the US than from China.
But wait a minute. Is golang.org really the main Go-related website in China? Is it even available in the Chinese language? Whoops, doesn’t look like it. Even on Baidu it’s the only English result on the page:
This makes the argument much weaker: maybe Chinese gophers are using a reference site in their native tongue, not golang.org, and that would explain why golang.org shows a smaller percentage of Chinese users. Sounds reasonable. So let’s dig deeper, and find out where Chinese gophers do hang out.
There are a couple of popular Chinese sites related to Go. The first is studygolang.com. Another is Golang中国. Another is golang.usr.cc. I’m sure there are more, but as far as I can see those are the most prominent sites that are only about Go, and not about programming in general. Let’s see how these stack up in terms of rankings on Alexa, and how they compare to golang.org, as of this writing:
Site | Rank in China |
---|---|
studygolang.com | 6,928 |
golang.org | 14,932 |
golangtc.com | 17,606 |
golang.usr.cc | 51,897 |
So studygolang.com seems to be the clear leader in terms of visitors, and is even more popular than golang.org, as we suspected some site might be.
Now that we know which sites are popular in China, can we use this information to glean something about how popular Go is there in general, compared to the rest of the world? I think we can. Below are tables containing the most popular keywords to find the different Go-related websites. See if you can spot the odd one out:
If you look at the top search term for each site, you’ll notice that golang.org gets disproportionately many of its search visitors from the keword “Go” (74.30%), whereas the other popular sites in China have as their top keyword “Golang”, some as their most popular term by far and others only by a little bit (13.29%, 80.67% and 12.12%), but with the term “Go” never featuring for any of the Chinese sites. golang.org gets ~25 times more visitors from the search term “go” than it does from the term “golang”. It is therefore reasonable to estimate that when we were looking at the Google Trends graph for “golang”, we were really seeing only about 4% of the full picture. At the same time, Chinese sites, for whatever reason, get very few hits from “go”, and most of their hits come from “golang”. It is likely that Chinese users are using “golang” as a search term more often - even more often than other countries’ users - and this in turn results in us seeing the Google Trends data showing China as the origin of the most searches for “golang”.
So Is Go Popular in China or Not?
So now we have seen why, at least to some extent, there are more searches for “golang” in China than elsewhere. But we are yet to find out whether Go really is popular in China. Like everything else so far, this too is difficult to know for sure. But we can do some back-of-the-napkin math to see where the biggest online Go community lives: China or the US?
We saw earlier that 18.9% of golang.org’s visitors come from the US, while 12.1% come from China. We also saw that golang.org is ranked 14,932th in China, and studygolang.com 6,928th. Assuming that a halving in rank constitutes a doubling in monthly visitors, we can guess, back-of-the-napkin-style, that studygolang.com receives about twice as many Chinese visitors as golang.org. That would translate to 24.2% of golang.org’s total number of visitors that visit studygolang.com every month - more than the monthly number of US visitors to golang.org.
Now, there are so many assumptions being made here, both stated and unstated, that it would be most unwise to take any final numbers seriously. But it looks like the conclusion is nevertheless unavoidable: even conservatively, it is very likely that there are at least as many Go coders in China as there are in the US. Sure, China has a much bigger population too, but it’s still a surprising result considering that the main Go site, golang.org, does not have a Chinese version available (yet).
So how did Chinese gophers hear about Go, and how did it spread so quickly in China? To be frank, I don’t know. But I’d like to know, and they say that the quickest way to get to the correct answer on the Internet is not to ask a question, but to post an incorrect answer. In that spirit, I’ll venture a guess.
A Chinese blogger called Liigo recently wrote an article on why he decided to abandon Go (text in Chinese). He specifically mentions why he, and other admirers like him, first showed interest in Go back in 2009: because it was “made by Google”. It seems like that would be as a good a reason in China as anywhere else, but maybe it played a big role in the adoption of Go in China, as opposed to, say, Rust or Node.js. He also goes on to mention how he was initially excited to join the thriving Go community. We can only assume that he is referring to the core Go developers, but perhaps he is alluding to the thriving Go community in China as well.
Another popular post on Quora-like Chinese Q&A site zhihu.com asks “Why should I use Go?”, and it has some interesting answers. It can be directly compiled into machine code, it’s easy to learn, it has a simple concurrency model, is suitable for server programming, etc. Basically, all the reasons we know and love. But nothing that stands out as a particularly unique reason to China.
From the scarce evidence available, there is one conclusion to be drawn: Go is popular in China for the same reasons that it is popular in the US, with one extra strengthening factor being a high reverence in China for things made by Google. We can demonstrate this last point by looking at the popularity of other Google technologies in China. Here’s Google App Engine’s world map on Google Trends:
And here’s the same graph for Node.js, for comparison:
Google App Engine is also way more popular in China than anywhere else, and the same does not go for Node.js, so we can discount population size distortion.
tl;dr? From an outsider’s perspective, it seems like Google technologies are popular in China for no reason other than that they were made by Google. I’d be very happy to be shown wrong, or to hear from Chinese gophers themselves!
Update: Dave Cheney pointed out on Reddit that he is under the impression that Go is popular in China for its usefulness in writing programs for rooted Android phones. Very interesting point, and I tend to believe what Dave says about Go. Seems like it only took a couple of hours for me to be proven wrong on the Internet, and I’m happy about that. Any more theories (or better, proof) out there? Let me know! @ironzeb
Also on Reddit, zx9597446 pointed out that golang.org is often blocked by the Great Firewall, and that many Chinese gophers are forced to access resources through a proxy. There might be even more gophers in China than it seems!