Categories
java

Does Java have a future?

I’ve been working with Java for 25 years. After a shaky time in the noughties, the platform has thrived, and a huge number of applications have been built on it. But I’m starting to wonder about Java’s future, given three things: new features in the language, the JVM itself, and the rise of generative AI.

When Java started it was an exciting prospect – an object-oriented language that could run on multiple platforms, but without the complexities of C++. During the 00s it had looked like newer languages would take its place, but with Spring Boot it’s become a popular language on the cloud.

It’s been a long time since Java was cool, but CTOs definitely like it and there is a massive sunk cost invested in the eco-system. While I’ve worked with other languages, I expected to be working primarily with Java for the remainder of my career. Some people have mocked Java as the new COBOL, but I see a steady supply of work as a positive thing.

One of Java’s strengths is its simplicity. A couple of years back, I published an article for my previous consultancy about Why Java Still Matters. I concluded that Java’s strength was its readability compared to other languages, and that helped with collaboration: “[Java’s] lack of sophistication forces developers to produce more straightforward code [and] we write code for other developers, not the machine.”

Since 2017, Java has committed to twice-yearly releases, which has led to a large number of new features in the language. I have argued (mostly in jest) that Java peaked with version 7, before the introduction of functional programming features. The new features in Java are undoubtedly expressive, but at the cost of some consistency. For a long time, Java applications tended to look very similar between workplaces. This will be less true as the language becomes richer.

If Java stops being a simple language it becomes less compelling as a choice. Indeed Java’s backward compatibility has produced some strange versions of modern features. Why not pick a language that was designed from scratch to include these things?

Java also brings with it the deadweight of the JVM. While Java is fast once it’s up-and-running, there are significant start-up costs that are particularly punishing on serverless. Yes, there are workarounds but these bring their own problems. GraalVM’s incredibly fast start-up comes at the cost of slower build times and significant differences between production software and development versions. Over the past few months, my workplace Java user group has been discussing the problems of Java on serverless and the outcomes are frustrating. It’s hard not to feel like we’re making excuses for the platform we work on.

Despite both of the above issues, a lot of money was invested in Java, and companies were unlikely to switch. But, with the rise in generative AI, it’s easier than ever for developers to get working with unfamiliar languages. And it’s also going to get easier to convert existing applications to new platforms. The first tools to do this are imperfect, but they will improve.

Java has always been a clunky language to work with. The boilerplate made hacking on new ideas unrewarding (although tools such as JHipster helped massively). GenAI supports me setting things up on new language, and it’s a great tutor, able to hone its examples to support the specific thing I’m trying to build.

I’ve had a lot of fun working with Java over the years, but I’m starting to feel that, long-term, my future lies with other languages. It’s time to explore some alternatives.

Categories
programming

The Importance of Blogging for Programmers

I started this weblog in November 2014 and have published 104 posts – a little under once a month. It has a very small readership. I still find it useful for two reasons. First, there are the reference posts that are useful documentation (for example recipes for GIS or a checklist of scheduling issues). Then there are the posts that help develop my thinking about things.

This latter type of post is a form of rubber ducking, and is useful even if nobody reads them. As EM Forster asked1, “How do I know what I think until I see what I say?” Writing about a subject is a useful form of deliberate practise that helps develop insights and skills.

The problem is that these posts take a lot of work to write, and I’ve abandoned dozens over the years – some of which would have been helpful for tracking my development on topics. I’d love to look back at how my thoughts on Generative AI have changed.

Over the next year, I want to write more about programming and my experience of it. But an important first stage of this is reducing the effort required to publish something useful.

I’ve been inspired by a recent post on this topic by Hamel Husein, Building an Audience Through Technical Writing: Strategies and Mistakes. There’s a lot of good advice in this post, but what stood out to me immediately was the idea of a voice-to-content pipeline. While I’ve used AI to transcribe written notes, I’d not actually made direct use of speech-to-text. Dictating the first part of this post has sped things up for me significantly.

Husein also discusses using AI models to help with generating the text, and I certainly want to explore creating prompts to help me with editing and proofreading (something Simon Willison discussed here).

An obvious question is why write public blog posts rather than keeping a private list? First, I think that preparing thoughts for public consumption produces better summaries. Also, I think there’s value in having a public archive where others can respond to your thoughts. This might not happen often, but it is good to make space for this.

One of the biggest challenges I face with blogging is that I want every post to be as perfectly written as those by people like Charity Majors or Joel Spolsky. But I do think there is a space for smaller, more personal posts and link posts – some of which might eventually provide a basis for deeper essays.

There’s only a tiny audience for what I write here, but the most important part of this audience is me. Over the coming year I plan to post more. GenAI is a revolutionary technology for software development, and I want to follow this closely. I also want to think more about my experiences as a software developer and improving as a programmer2.

  1. Although he did not apparently originate the quote. ↩︎
  2. I also want to think about the difference between being a programmer and a software developer. One seems to be more at the level of individual functions, and I think I’m better at the latter than the former. ↩︎