Last Updated:

Which backend language to learn in 2020?

Maksym Moskvychev
Maksym Moskvychev architecture

Choosing the right programming language is crucial for success in IT. This article represents data-driven research of programming languages suitable for backend web development, such as Python, Node.js, Java, PHP, C#, Ruby, Go and Kotlin. Languages are compared in general popularity, community sizes, job market, support of cloud providers, performance, and available integrations.

Curious about which programming language better to learn in 2020? Or which language should you use for a new startup in 2020? Results are in the table below :)

Backend programming languages comparison
Best programming language to study: community, job market, performance, integrations

Briefly, if you are looking for a stable permanent job - good choices are Python, Java, Node.js, and PHP. If you also want to do something cool and work in a startup environment - your choices are Python, Node, and Kotlin. And finally, if you, as an employer, thinking about technology to build a globally scalable project - 

The best choices to study in 2020 are Python, Node, Kotlin and Go.

For a more detailed and data-driven answer - see below.

Ranking of backend programming languages

Comparison approach.

Comparison is focused on languages for backend development. As a starting point in research, we've picked the most popular programming languages from PYPL website. Technologies for apps (Swift, Objective-C) are excluded, as well as data analysis tools (R, MatLab, Julia). Also excluded languages at the bottom of the list with a negative popularity trend.

A special case is Node.js, which is not reflected in the table, while Javascript and TypeScript do. For popularity score Node.js will represent also Javascript and TypeScript; for other comparisons, we will talk about Node.js individually. 

Java is merged with Scala for community and popularity scores. Kotlin is standalone from Java as it brings a new wave to Java development by reducing the amount of code to at least 20% while keeping the same performance and capabilities.

Rust is excluded from comparison as it’s JVM based with very niche purpose for memory-optimized development (like browsers) while offering JVM performance but low development speed.

All together we have 8 backend programming languages to compare: PHP, Python, Node, Java, Kotlin, Ruby, Go, C#.

Popularity and community.

For the popularity score, we've picked popularity from PYPL page. For community comparison, we will rely on StackOverflow. It is possible to see a number of questions per tag, which can represent the size of the community. Also, a number of questions today represents how active the community is.

Comparison of popularity and community size for Python, Java, Node, C#, PHP, Ruby, Kotlin, Go are represented in the table:

The last four columns in the table are ranking scores. For the best option value is 5.0, for the worst option value is 1.0, and for average value is 2.5. Other values are split in between, based on a logarithmic scale.

In terms of popularity best language is Python, and for community size winner is Node.  This can be explained that many people are curious in Python because it is being studied at schools, but not so many use it at work. The community growth trend is back at Python, so huge community growth is expected in the near future.

Losers in community comparison are currently Java, C#, PHP and Ruby. For all of them, community trends are negative. Developers are probably switching to other languages.

Job market for freelance and permanent positions.

 When talking about the job market for freelancers - the biggest platform today is Upwork. It also allows seeing how many developers are available for certain technology. We will use this value to compare developers on a market between PHP, Ruby, Python, Node, C#, Java, Kotlin and Golang. Another useful information form Upwork - is how many developers earned $10K+ on a platform - this value will represent amount of freelance jobs available for certain technology.

Amount of freelancers and potential for jobs in C# segment

For the permanent positions, we will look at Stackoverflow Jobs, as a well-known job board for the best tech positions worldwide. The overall job situation for freelance and permanent jobs is illustrated in the next table. 

How easy to find a job  - that ranking is based on amount of developers on a market per one permanent or freelance job.

For a permanent job, it will be easiest to find a job if you are programming Java, Node or Kotlin. If you want to become a freelancer - good choices are Node, Kotlin, Ruby, and Golang.

Clear outsiders for a freelance market are Python, Java, C# - too big competition. For permanent roles, the worst situation is with PHP, C#, and Ruby. This is from a developer perspective.

If you are a company - a good strategy might be opposite to developers - to work with technologies where competition is high, then it will be easier to find the right people.

Support of serverless and containers

 Microservices architectures are trending nowadays. There are two infrastructure options to build microservices: serverless and containers. Serverless - is Lambda functions from AWS, and cloud functions from Google and Azure. It is important to see how programming languages are supported by this technology, as it might be a show-stopper. The situation with serverless:

  • Amazon Lambda functions support Node, Python, Ruby, Java, Go and C#. All these languages got 1 point for serverless. Another technology from AWS called Lambda @Edge and allows us to run functions in edge locations. It currently supports Node and Python - that couple got an extra point.
  • Google Cloud Functions support Node, Python and Go - those 3 got plus one point for Serverless.
  • And finally, Microsoft Azure Functions support C#, Node, Java, Python - these got an extra 1 point. PHP also supported, but in experimental mode - so PHP got 0.5 points.

Kotlin is a special case for serverless compatibility. Even though it's not supported explicitly, it's supported everywhere where Java is supported, as they share the same JVM engine to run. 

The situation with containers can be discovered on a Docker Hub - a most popular repository of Docker containers. Simply type in language name and in search results you'll see # of projects using it.

Ranking for containers and serverless support is summarised in the next table:

Based on the research, if you are going to build microservices - the best options are Python and Node. Other good choices are PHP and Go, but only if you are using Docker containers, as their support by serverless is limited.

The outsider for the microservices approach is C#. The language is privately owned, so support by Docker containers is limited, as well as support by serverless cloud providers.

Performance of programming languages

Performance is one of the most fundamental characteristics of a language. It is the only parameter that can not be changed by a good developer or a growing community. A fast language will use less infrastructure capacity, which leads to less hosting costs as well as a better experience for end-user. In this article, we will compare only the CPU load which those languages generate. 

As a start point for performance comparison, we will use Benchmarksgame website. According to their research best performance is provided by Java, C#, and Golang. The performance of these 3 languages is comparable, as all of them generate highly optimized bytecode.

Performance of Kotlin is same as Java, as they are using the same JVM as an execution engine. One more research on Medium demonstrates similar performance between Go and Kotlin. Performance between C# and Java is also comparable, according to the research.

There are 4 top-performing backend languages with similar performance: Java, C#, Go and Kotlin.

Going down by performance scale, Node.js appears to be around 40% slower then Golang. There is one thing you should know about Node and performance: Node has a single-threaded execution with the event loop. Does it affect performance? In case you are using serverless Lambda functions - not, as every function has 1 CPU core. However, if you are running Node on containers - multithreading is something you should take care of. There are multiple solutions, but all of them require some coding, while in Golang, for example, multi-threading comes out of the box.

Next after Node comes PHP. PHP is around 2 times slower then Node and ~3 times slower, then Java, C#, Go and Kotlin.

The last two languages in terms of performance are Ruby and Python. Python appears to be ~2 times slower then PHP. And the difference between Ruby and Python is about 10% for Ruby being faster.

Slowest languages in Comparison are Ruby and Python. They are around 2 times slower, then PHP and around 5 times slower, then Java. 

Integrations with other systems.

To discover integration capabilities for programming languages we will use GitHub. By adding suffix "sdk" to the search query we could see how many SDKs are made on a certain language. In the example below we were searching for "Java SDK", which could tell a relative integration capability in the open-source world.

Comparison of performance and integration capabilities of Java, Ruby, PHP, Python, Node, Go, Kotlin and C# are illustrated in the next table:

In terms of integration capabilities, the best programming languages are PHP and Java. Most of the SDKs are made for them. Also, good choices are Python and Node. This comparison also shows why Java is still language number one for enterprise applications - as it has the best in class performance combined with best integration capabilities.

The losers in terms of integrations are Kotlin, Ruby, and C#. Kotlin - probably because language is too young. For Ruby and C# there is no explanation, just facts :) 

The overall comparison table is published in the beginning. 

© 2020 Maksym Moskvychev