Author: Karsten Silz
Sep 17, 2023   |  updated Sep 30, 2023 12 min read

Permalink: https://betterprojectsfaster.com/guide/java-tech-popularity-index-2023-q3/lang/

Java Tech Popularity Index Q3/2023: JVM Languages


This is an old version! Click below for the current one.

See Current Version


Summary for Q3/2023

Here is the scorecard of Java (left) and Scala (right) vs. Kotlin (100%), not on the card. The arrows show the trend vs. Kotlin.

Java (left) And Scala (right) vs. Kotlin (100%)
Java (left) And Scala (right) vs. Kotlin (100%)

Please take the Kotlin numbers with a huge grain of salt: Most Kotlin development is on Android, not in JVM projects. Kotlin gains on Java in all categories except for jobs. Scala declines against Kotlin in all categories (see the job ad section for why job numbers for Scala are missing).

Now, let’s look at JVM competitors. Here is Python (left) and Java (right) vs. JavaScript (100%), not on the card. The arrows show the trend vs. JavaScript.

Python (left) And Java (right) vs. JavaScript (100%)
Python (left) And Java (right) vs. JavaScript (100%)

Python slightly declines in jobs against JavaScript but holds steady or increases a bit in all other categories. Java gains barely in jobs against JavaScript and declines slightly everywhere else.

Here are my recommendations:

  • If you need to switch languages or are on a new project:
    • Use Scala if you need functional programming.
    • Use Kotlin if you really need a “more modern Java”.
    • Otherwise, use the latest Java LTS version you, your team, and your application can take.

Archive

2023 Q2 Q1
2022 Q4 Q3 Jun May Apr Mar Feb Jan
2021 Dec Nov

Table Of Contents

Choices

Here are the choices in alphabetical order:

Please note that most Kotlin development is on Android, not on JVM projects. I am unable to quantify that effect.

Popularity

Why Popularity - and How?

Picking a popular technology makes our developer life easier: Easier to learn, easier to build, debug & deploy, easier to find jobs/hire, and easier to convince teammates & bosses. Popularity can make a difference in two situations: When multiple technologies score similarly, we could go for the most popular one. And when a technology is very unpopular, we may not use it.

I measure popularity among employers and developers as the trend between competing technologies. I count mentions in job ads at Indeed for employer popularity. For developer popularity, I use Google searches, Udemy course buyers, and Stack Overflow questions.

Employers: Job Ads

The Indeed job search is active in 62 countries. I picked 59 countries representing 69% of the worldwide GDP in 2022, excluding three countries because English word searches proved ineffective there: China, Japan, and South Korea. It demonstrates the willingness of organizations to pay for technology - the strongest indicator of popularity in my mind. Kotlin is the baseline. The chart is not proportional, so all languages fit nicely.

Job ad mentions at Indeed for Clojure, Groovy, Java, and Kotlin
Job ad mentions at Indeed for Clojure, Groovy, Java, and Kotlin

I exclude Scala because I over-counted it in the past: Searching for “scala” in a job ad also matches “scalable”. And in some countries, “scala” is not just a programming language: The Netherlands had 7,000 mentions of Scala – more than the US. I plan to add Scala back in a future index update.

I’ve also only estimated the number of Java ads since January 2023. Searching for “Java” also matches “JavaScript”. And I cannot search for ads mentioning “Java” and “JavaScript” at Indeed. So I search for ads with “Java” and without “JavaScript” and then add 20% on top as the estimate for ads that mention both. I may refine this in future index updates.


Java wins, Kotlin is second, and Groovy is third. The number of developer ads is down in 2023. Java has the most jobs by an order of magnitude. Kotlin has lost slightly against Java. As described above, Scala currently isn’t on the list but would be #3. So Groovy is #3 for now, with just a slight dip against Kotlin. Clojure is a niche language, dropping from 7% of Kotlin to 3% in 1.5 years.

Let’s look at how the JVM competition does.

Job ad mentions at Indeed for C++, C#, Go, JavaScript, TypeScript, Python, and Rust
Job ad mentions at Indeed for C++, C#, Go, JavaScript, TypeScript, Python, and Rust

The number of job ads for Go is too low. Why? Because the word “go” most often does not refer to the programming language, I only search for variations of “golang”. I may refine this in future index updates. There are now job numbers for May 2023 because of changes on the Indeed websites.


Python wins, JavaScript places second, Java is third, and C# is fourth. Python has been ahead of JavaScript by 10% for half a year. Java is now just 7% behind Javascript. C# has nearly 60%, while good ol’ C++ still commands half of JavaScript mentions. Designed as a systems language and not an application one, Rust still managed to nearly triple its low share against JavaScript – and it’s the only language to grow its absolute numbers. JavaScript, Java, C#, TypeScript, and Rust gained against Python in the last year. As described above, the numbers for Go are too low but hold steady.

Please see here for details, caveats, and adjustments to the job ad mentions.

You can find the detailed search results with links here. They include breakdowns by continents:

Developers

Students at Udemy

Udemy is one of the biggest online learning sites. They publish the number of people who bought a course (beyond a certain threshold, possibly around 100k). This shows how many people evaluate a technology. Kotlin is the baseline.

Students at Udemy for Java, Kotlin, Scala
Students at Udemy for Java, Kotlin, Scala

Java wins by an order of magnitude, Kotlin is second, and Scala is third. Java has grown again this year after shedding share to Kotlin for over a year. Scala loses very slowly to Kotlin. Groovy and Clojure don’t have enough students to cross the display threshold.

Here are the links that show the courses for all and the number of students for some:

Here are the number of students for languages that compete with the JVM:

Students at Udemy for C#, Go, Java, JavaScript, and Python
Students at Udemy for C#, Go, Java, JavaScript, and Python

Python wins, JavaScript is second, Java third, C# fourth, and Go a distant number five. Python has 41 million students — three times as many as Java! And in the last year, it got 3.6 times as many new students. And after some stagnation earlier this year, Python gains share on JavaScript again. JavaScript leads Java by 9%. Java leads C#, its old rival 2.5:1. Go, the new kid on the block, doesn’t gain on JavaScript.

Here are the links that show the courses and number of students for all:

Google Searches

Google Trends demonstrates the initial interest in a technology over time (chart link). “More searches = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle.

Google Trends for Clojure, Groovy, Java, Kotlin, and Scala
Google Trends for Clojure, Groovy, Java, Kotlin, and Scala

Google changed its measurement algorithms on January 1, 2016, and January 1, 2022. That caused spikes for all values, especially in 2022.


Even at 1/9 of its peak interest in 2004, Java still beats Kotlin 11:1.

To get a better picture of the Java alternatives, here they are without Java (chart link):

Google Trends for Clojure, Groovy, Kotlin, Scala
Google Trends for Clojure, Groovy, Kotlin, Scala

Among the Java challengers, Kotlin wins, Scala is second, Groovy is third, and Clojure is last. We can see the fall of Scala and the rise of Kotlin, both starting in 2016. Kotlin and Scala have declined since early 2022, but Kotlin still leads Scala 3.1:1. Groovy has declined since 2018 and Clojure since 2014.

Here are searches for the languages that compete with the JVM (chart link):

Google Trends for C#, Go, Java, JavaScript, and Python
Google Trends for C#, Go, Java, JavaScript, and Python

Here are the same JVM competitors over the last three years:

Google Trends for Clojure, Groovy, Kotlin, Scala
Google Trends for Clojure, Groovy, Kotlin, Scala

This link produces the chart above.

Python wins, JavaScript is second, Java is third, C# is fourth, and Go is fifth. All languages have declined since early to mid-2022. Python has grown about 18% over the last three years but only leads JavaScript 1.4:1. After being neck-to-neck with Java, JavaScript is now slightly ahead. C# has only 37% of JavaScript’s search volume and hasn’t gained share in the last three years. Go gained slightly against C#.

Monthly Questions at Stack Overflow

We can run database queries against the questions, answers, and comments at Stack Overflow with the StackExchange Data Explorer. The number of monthly questions is a proxy for using a technology during evaluation and productive use. “More questions = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle.

Monthly Questions at Stack Overflow for Clojure, Groovy, Java, Kotlin, and Scala
Monthly Questions at Stack Overflow for Clojure, Groovy, Java, Kotlin, and Scala

Java wins, Kotlin is second, and Scala is third. Java has lost 70% of its questions after peaking nine years ago. Kotlin has started to decline and now has a quarter of Java’s questions. Scala is at 13% of its peak value from 6.5 years ago. Groovy and Clojure have always hovered just above zero.

You can run the query below at the StackExchange Data Explorer.

(Click to expand) Query: Clojure, Groovy, Java, Kotlin, and Scala
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-06-30';

WITH Tagged AS (
  SELECT
    Id,
    CreationDate,
    CASE WHEN CHARINDEX('<java>', Tags) > 0 THEN 1 ELSE 0 END AS JavaTag,
    CASE WHEN CHARINDEX('<kotlin>', Tags) > 0 THEN 1 ELSE 0 END AS KotlinTag,
    CASE WHEN CHARINDEX('<scala>', Tags) > 0 THEN 1 ELSE 0 END AS ScalaTag,
    CASE WHEN CHARINDEX('<groovy>', Tags) > 0 THEN 1 ELSE 0 END AS GroovyTag,
    CASE WHEN CHARINDEX('<clojure>', Tags) > 0 THEN 1 ELSE 0 END AS ClojureTag

  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for 
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(JavaTag) AS Java,
    SUM(KotlinTag) AS Kotlin,
    SUM(ScalaTag) AS Scala,
    SUM(GroovyTag) AS Groovy,
    SUM(ClojureTag) AS Clojure
  FROM Tagged
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Java,
  Kotlin,
  Scala,
  Groovy,
  Clojure
FROM MonthlyCounts
ORDER BY Month;

Here are the shares of questions for the languages that compete with the JVM:

Questions at Stack Overflow for C#, Go, Java, JavaScript, Python, and TypeScript
Questions at Stack Overflow for C#, Go, Java, JavaScript, Python, and TypeScript

Python wins, JavaScript is second, Java third, C# is fourth, TypeScript fifth, and Go is sixth. This is a chart of significant decline: Python, JavaScript, and Java have declined massively and in sync since early 2020. Python still leads JavaScript 1.5:1 but has only 39% of its peak value from early 2020. It has lost 49% since November 2022. At 33% of its 2016 peak, JavaScript leads Java 1.7:1. It also lost 49%, but since August 2022. C# has gained on Java since 2022 and has 83% of Java’s questions. TypeScript’s seven-year rise ended mid-2022, leaving it at two-thirds of Java’s questions. Go has been low and steady for about seven years, leading only to 11% of Java’s numbers.

Please note that the overall monthly number of Stack Overflow questions is down 42% since ChatGPT appeared (November 2022 vs. August 2023):

Monthly Questions at Stack Overflow
Monthly Questions at Stack Overflow

You can run the queries below at the StackExchange Data Explorer. I used two queries to get the number of monthly questions for the JVM competitors because putting all in one query timed out.

(Click to expand) Query: Java, JavaScript, and TypeScript
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-06-30';

WITH Tagged AS (
  SELECT
    Id,
    CreationDate,
    CASE WHEN CHARINDEX('<java>', Tags) > 0 THEN 1 ELSE 0 END AS JavaTag,
    CASE WHEN CHARINDEX('<javascript>', Tags) > 0 THEN 1 ELSE 0 END AS JavascriptTag,
    CASE WHEN CHARINDEX('<typescript>', Tags) > 0 THEN 1 ELSE 0 END AS TypeScriptTag

  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for 
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(JavaTag) AS Java,
    SUM(JavascriptTag) AS Javascript,
    SUM(TypeScriptTag) AS TypeScript
  FROM Tagged
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Java,
  Javascript,
  TypeScript
FROM MonthlyCounts
ORDER BY Month;
(Click to expand) Query: C#, Go, and Python
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-06-30';

WITH Tagged AS (
  SELECT
    Id,
    CreationDate,
    CASE WHEN CHARINDEX('<c#>', Tags) > 0 THEN 1 ELSE 0 END AS CsharpTag,
    CASE WHEN CHARINDEX('<go>', Tags) > 0 THEN 1 ELSE 0 END AS GoLangTag,
    CASE WHEN CHARINDEX('<python>', Tags) > 0 THEN 1 ELSE 0 END AS PythonTag

  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for 
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(CsharpTag) AS Csharp,
    SUM(GoLangTag) AS GoLang,
    SUM(PythonTag) AS Python
  FROM Tagged
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Csharp,
  GoLang,
  Python
FROM MonthlyCounts
ORDER BY Month;

Analysis

  • The usage of Java still dominates its alternatives, often by an order of magnitude.
  • Java’s evolution speed has increased. So, staying with Java makes life easier for us developers.
  • Starting with Java 21 in September 2023, we’ll get a new Java LTS every two years instead of every three years. This will get us Java improvements faster.
  • Kotlin is the best Java alternative. Kotlin’s rise in popularity is partly fueled by its status as the default language for Android development.
  • Scala lost its position as the #2 JVM language. Scala requires knowledge of functional programming, which is less common than object-oriented one. You must use Scala if you need functional programming on the JVM. In job ads, it’s probably behind Kotlin. Google searches and Stack Overflow questions trend towards Kotlin. That’s why Scala is #3 for me.
  • Groovy is a has-been on the JVM: Kotlin stole its place of “better Java”, while Grails (Ruby-on-Rails with Groovy on the JVM) has fallen out of favor. Even Gradle now defaults to Kotlin.
  • Clojure fills the niche of “Lisp on the JVM”.

Here’s my recommendation:

  • On your current project, keep your existing language unless that language is absolutely, really not working out for you.
  • If you need to switch languages or are on a new project:
    • Use Scala if you need functional programming.
    • Use Kotlin if you really need a “more modern Java”.
    • Otherwise, use the latest Java LTS version you, your team, and your application can stomach.

Next Issue

The next issue will arrive in November 2023. Subscribe to it as a newsletter to have it in your inbox then!


comments powered by Disqus