Author: Karsten Silz
May 1, 2023   |  updated May 7, 2023 11 min read

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

Java Tech Popularity Index Q2/2023: JVM Languages


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

See Current Version


Summary for Q2/2023

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

Scorecard For Kotlin (100%) vs. Java (left) and Scala (right)
Scorecard For Kotlin (100%) vs. Java (left) and Scala (right)

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 JavaScript (100%), not on the card, vs. Python (left) and Java (right). The arrows show the trend vs. JavaScript.

Scorecard For JavaScript (100%) vs. Python (left) and Java (right)
Scorecard For JavaScript (100%) vs. Python (left) and Java (right)

Python slightly declines in jobs against JavaScript but holds steady or slightly increases in all other categories. Java holds steady in searches but 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 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. Now 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

This is the first time I have excluded Scala because I over-counted it in the past: The word “scala” in a job ad does not only refer to the programming language in some countries. For instance, the Netherlands had 7,000 mentions of Scala – more than the US. I plan to add Scala back in a future index update.

I also only estimate the number of Java ads. I cannot search for ads mentioning “Java” and “JavaScript” at Indeed, . So I search for ads with “Java” 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 Q1/2023. Java has the most jobs by an order of magnitude. Kotlin has lost more than a third of its mentions since October 2021. As described above, Scala currently isn’t on the list but would probably 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 4% in 1.5 years.

Now 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.


Python wins, JavaScript places second, Java is third, and C# is fourth. All languages held steady against JavaScript over the last three months. Python is ahead of JavaScript by 10%, and Java is 10% behind. 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 double its low share against JavaScript. 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 slowly loses against Kotlin except for the last four months. Scala is stable against 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 40 million students — three times as many as Java! That’s more than there are professional developers worldwide, estimated at 27 million in 2021. JavaScript leads Java by 10%. Java’s old rival, C#, sits at 41% of Java. Go, the new kid on the block, has just 7% of Java’s numbers. All competitors grow slightly faster than Java.

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):

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/7 of its peak interest in 2004, Java still beats Kotlin 16: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. Groovy has declined for five years, while Clojure has for seven years.

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. But Python and JavaScript are the only languages that have grown in the last three years. Python leads JavaScript 1.6:1. JavaScript is just slightly ahead of Java. C# has only 40% of Java’s search volume but double that of Go.

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 questions is a proxy for using a technology during evaluation and productive use. “More questions = better” to me.

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

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: Clojure, Groovy, Java, Kotlin, and Scala
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-03-31';

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;
(Click to expand) Query: Java, JavaScript, and TypeScript
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-03-31';

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-03-31';

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;

Java wins, Kotlin is second, and Scala is third. Java has lost 73% of its questions after peaking nine years ago. Kotlin has stalled over the last three years and now has a quarter of Java’s questions. Scala is at 20% of its peak value from 6.5 years ago. Groovy and Clojure have always just hovered above zero.

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. Except for TypeScript and Go, this is a chart of significant decline. Python still leads Java 2.8:1 but has only 57% of its peak value from early 2020. At 46% of its 2016 peak, JavaScript leads Java 1.9:1. C# mirrored Java’s trend and currently has only 86% of Java’s numbers. TypeScript’s seven-year rise ended in mid-2022, leaving it at half of Java’s questions. Go has been low and steady for about seven years, leading only to a tenth of Java’s numbers.

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.

comments powered by Disqus