Author: Karsten Silz
Nov 20, 2023   |  updated Apr 30, 2024 12 min read

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

Java Tech Popularity Index Q4/2023: JVM Languages


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

See Current Version


Summary for Q4/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. Java loses to Kotlin 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 holds steady against JavaScript or declines slightly.

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 Q3 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 and pulls aways from Kotlin. 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 4% since October 2021..

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 no job ad numbers for May 2023 because of changes on the Indeed websites.


Python wins, JavaScript places second, Java is third, and C# is fourth. Since the summer, Python has risen slightly again and leads JavaScript by 15%. Java oscillates around 91% of JavaScript, while C# fluctuates around 57%. Good ol’ C++ still commands half of JavaScript mentions. Rust rose steadily until the summer but has flatlined at 8% of JavaScript. Still, it’s the only language to grow its absolute numbers. 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 since this Spring 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 more than 42 million students — three times as many as Java. And since June 2022 year, it got 3.5 times as many new students. And after some stagnation earlier this year, Python gains share on JavaScript again. JavaScript leads Java by 8%. Java leads C#, its old rival 2.4:1. TypeScript is stuck at 10% of its big sibling JavaScript. 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. “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/7 of its peak interest in 2004, Java still beats Kotlin 14:1. Here is the chart link.

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 nearly 4: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 (chart link):

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

Python wins, Java is second, JavaScript is third, C# is fourth, and Go is fifth. All languages have declined since early to mid-2022, but Python and Java may be on the rise again. Python has grown about 40% over the last three years and leads JavaScript 1.8:1. After being neck-to-neck with JavaScript, Java is now slightly ahead again. C# has 41% 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 85% of its questions after peaking nine years ago. Kotlin declines much slower and now has 31% of Java’s questions. Scala is at 8% 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 1: Clojure, Groovy, Java, Kotlin, and Scala
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-09-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. Python and JavaScript have fallen off a cliff since ChatGPT appeared (-59% and -56%), Java and C# to a lesser degree (-45% and -46%). Python still leads JavaScript 1.5:1 but has only 29% of its peak value from early 2020. At just 23% of its 2016 peak, JavaScript leads Java 1.7:1. At 85%, Java has the biggest overall decline here. C# has gained on Java since 2022 and has 92% of Java’s questions. TypeScript’s seven-year rise ended mid-2022, leaving it at 35 of JavaScripts’s questions. Go has been low and steady for about seven years, leading only to 7% of JavaScript’s numbers.

Please note that the overall monthly number of Stack Overflow questions is down 42% since ChatGPT appeared (November 2022 vs. October 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 2: Java, JavaScript, and TypeScript
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-09-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 3: C#, Go, and Python
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-09-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;
(Click to expand) Query 4: All Questions
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-10-31';

WITH Questions AS (
  SELECT
    Id,
    CreationDate,
    1 AS AQuestion
  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for questions
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(AQuestion) AS Questions
  FROM Questions
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Questions
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