Priceonomics

This post is adapted from the blog of HackerRank, a Priceonomics Data Studio customer. Does your company have interesting data? Become a Priceonomics customer.

***

Which countries have the best programmers in the world?

Many would assume it’s the United States. After all, the United States is the home of programming luminaries like Bill Gates, Ken Thompson, Dennis Ritchie, and Donald Knuth. But then again, India is known for such universities as IIT, and the hackers from Russia are apparently quite effective. Is there any way to determine which country is best?

We decided to examine the data of HackerRank, a Priceonomics, customer, to answer this question: which countries do the best at programming challenges conducted by HackerRank?

HackerRank regularly host tens of thousands of coding challenges for developers to improve their coding skills. Hundreds of thousands of developers from all over the world participate in challenges in a variety of programming languages and knowledge domains, from Python to algorithms to security to distributed systems. Developers are scored and ranked based on their accuracy and speed.

According to the data, China and Russia score as the most talented developers. Chinese programmers outscore all other countries in mathematics, functional programming, and data structures challenges, while Russians dominate in algorithms, the most popular and most competitive arena. While the United States and India provide the majority of competitors on HackerRank, they only manage to rank 28th and 31st.

*** 

We began our analysis by looking at which test types are most popular among developers. HackerRank developers can choose to participate in 15 different domains, but some are more popular than others.  The following table shows the proportion of completed challenges that come from each domain.

Data source: HackerRank

The most popular domain by far is algorithms, with nearly 40% all developers competing. This domain includes challenges on sorting data, dynamic programming, and searching for keywords and other logic-based tasks. For algorithms challenges, developers can use whichever language they choose, which may partially explain why it’s so popular. (Algorithms are also crucial for coding interviews that land programmers jobs.) At a distant second and third, Java and data structures come in at about 10% each. Distributed systems and security are the least popular challenges.

So, based on these challenges, which country has the programmers that score the highest?

In order to find out, we looked at each country’s average score across all domains. We standardized the scores for each domain (by subtracting the mean from each score and then dividing by the standard deviation; also known as a z-score) before finding the average. This allows us to make an apples-to-apples comparison of individual scores across different domains, even if some domains are more challenging than others. We then converted these z-scores into a 1-100 scale for easy interpretation. 

We restricted the data to the 50 countries with the most developers on HackerRank. People in each of these country took thousands of challenges (2,000 challenges minimum). Here’s what we found:

Data source: HackerRank

Since China scored the highest, Chinese developers sit atop the list with a score of 100. But China only won by a hair. Russia scored 99.9 out of 100, while Poland and Switzerland round out the top rankings with scores near 98. Pakistan scores only 57.4 out of 100 on the index. 

The two countries that contribute the greatest number of developers, India and the United States, don’t place in the top half. India ranks 31st, with an overall score of 76, and the United States ranks 28th, with a score of 78. 

Though China outperformed everyone else on average, it didn’t dominate across the board. Which country produces the best developers in particular skill areas? Let’s take a look at the top countries in each domain.

Data source: HackerRank

Not surprisingly, China did quite well in a number of domains. Chinese developers beat out the competition in data structures, mathematics, and functional programming.

On the other hand, Russia dominates in algorithms, the domain with the most popular challenges. Coming next, Poland and China nearly tie for second and third place, respectively.

What explains the performance levels of different countries across domains? One possible explanation is that Russians are more likely to participate in algorithms and therefore get more practice in that domain, while Chinese developers are disproportionately drawn to data structures.

We compared how the developers in each country split their time up amongst different challenge types and then compared these domain preferences to those of the average HackerRank user. This allowed us to figure out which countries are more likely than the rest to take a test in a particular domain.

Data source: HackerRank

As the table above shows, Chinese programmers participated in mathematics competitions at a much higher rate than would be expected given the average developer’s preferences. This might help explain how they were able to secure the top rank in that domain. Likewise, Czech developers showed an outsized preference for shell competitions, a domain in which they rank number one. 

But beyond these two examples, there seems to be little relationship between a country's preference for a particular challenge type and its performance in that domain. 

We also wanted to know whether countries have specific preferences when it comes to programming languages. Are Indians more interested in C++? Do Mexicans code in Ruby? 

The following chart breaks down the proportion of challenges taken in each language by country.

Data source: HackerRank

In general, developers of different nationalities participate in Java challenges more than challenges in any other programming language (with a few notable exceptions like Malaysia and Pakistan, where users prefer C++, and Taiwan, where Python is king). Sri Lanka comes in at number one in its preference for Java. India, which supplies a big portion of HackerRank developers, ranks 8th. 

***

While Pakistan, Sri Lanka, and Nigeria are currently toward the bottom of the hacker rankings, they can look to Switzerland’s steadfast developers for inspiration. When a HackerRank developer gives up on a challenge before making any progress, they earn a score of zero. Switzerland has the lowest percentage of nil scoring users, which make Swiss coders the Most Tenacious Programmers in the World.

Data source: HackerRank

***

Every day, developers around the world compete with each other to become the next Gates or Knuth.

If we held a hacking Olympics today, this data suggests that China would win the gold, Russia would take home a silver, and Poland would nab the bronze. Though they certainly deserve credit for making a showing, the United States and India wouldn’t make it into the top 25.

Note: If you’re a company that wants to work with Priceonomics to turn your data into great stories, learn more about the Priceonomics Data Studio.



Woah. We are flattered you shared our blog post!

If you want to be notified when we write a "halfway decent" blog post in the future, leave your email here below.