Tales from the jar side: Java 11 v 16, Oracle v Google, and a Taste of the After Times
Just because you're vaccinated doesn't mean you should get involved in a land war in Asia or go in against a Sicilian when death is on the line
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of April 4 - 11, 2021. This week I taught my regular JUnit 5 testing course and my Spring and Spring Boot course on the O’Reilly Learning Platform. The latter was held primarily for the Asia/Pacific timezones, which meant starting at 5am in Eastern Daylight Time where I live.
One poor unfortunate soul (that I knew about) attended from California, which meant the course ran from 2am to 6am for him on both days. Yikes. If he’s reading this, I’d be happy to say hi and express my condolences, but (1) I never use anyone’s name without permission, and (2) the O’Reilly Learning Platform only shows the initials of the attendees anyway for privacy reasons. So if you’re reading this, welcome! If not, to everyone else, welcome back!
Here is the usual subscribe button, for those who would like to follow along on a regular basis (for free, of course):
Java 11 v 16 Battle Royale
The inimitable Trisha Gee started with this:
Actually, that’s Dalia Shea, another Developer Advocate at JetBrains, but I found out about it because Trisha retweeted it into her timeline. The tweet contained a Twitter Poll, but as is typical with Twitter, you can only see the poll if you use Twitter itself as your client. That’s too high a price for me (I use Fenix on Android and TweetBot on my Mac), so either take my word for it or click on the tweet to see the poll itself (assuming you’re using the web-based Twitter client or the Twitter app).
The vote was very close. When someone gave the inevitable answer (“it depends”), Trisha followed up with:
Eventually Brian Goetz (one of the major Java designers at Oracle) weighed in:
He went on to say that most people who prefer LTS versions “don’t really understand the new release model, and don’t want to,” and followed with a few more rather curmudgeonly comments. Click on his tweet to see the replies.
By now, many of you are wondering what the heck this was all about. Let me give you a very brief explanation:
Starting with Java 10, the core Java team decided to release new major versions of Java every 6 months. That works out to March and September every year. Since many companies are not interested in updating their Java installations every six months, Oracle decided to also provide a Long Term Support (LTS) release that would be good for a minimum of three years of support and updates. Java 8 was retroactively designated an LTS release, Java 11 is the current one, and Java 17 will be the next one, scheduled for this coming September.
The dilemma now is which one to choose when making a new application. If you pick an non-LTS release, the assumption is that you will upgrade the Java installation when each new version is released. As Brian said, that’s not too much of a problem in development mode, but if you’re in production that may be a much bigger deal.
Of course, new features are added in each new version of Java, and the only way to get them is to upgrade. That’s pretty much Trisha’s point — she both wants to use the new features and wants to encourage their adoption by the industry.
Her coworker, yet another charming Developer Advocate at JetBrains named Helen Scott, wrote a blog post explaining how the entire debate started. If you are interested in the arguments and the back story, see that post.
Even though Dalia held the poll, the entire episode is pure Trisha:
The debate was public, but both entertaining and informative.
She clearly wanted to win — she’s not some marketing dweeb; she’s a serious developer with strongly held opinions, but friendly about it all.
She managed to take a real issue in the industry and get people talking about it, which is, after all, her job. :)
Since this is my newsletter, you’re probably wondering how I voted. I must admit I didn’t, because my answer was, it depends. Plus, I like both Trisha and Dalia (and Helen, for that matter) and didn’t want to choose between them. I do have a somewhat different perspective than most, however.
My day job is teaching training courses, many of which involve Java or rely on Java features. In each code-based course, I make available a GitHub repository with the demo code I use during class and the solutions to any exercises we do. If I upgraded all of those to Java 16, then any student who can’t upgrade won’t be able to build the code and they’ll be unhappy. They’ll ask why I did that, with the bigger questions being, why was that necessary? Couldn’t they just use Java 11, or even Java 8?
BTW, that’s the part of the debate that’s missing. According to the last survey I saw, nearly 70% of all Java developers still haven’t upgraded to Java 11 yet. They’re stuck on Java 8. Last year was supposed to be the year most upgraded, but the pandemic threw everybody’s plans into chaos. The transition seems to be happening now, but it’s going to take a while. In fact, I’m curious to see how many developers are still on Java 8 when the Java 17 LTS release happens in September.
In my case, the big exception to that is my What’s New In Java course, which discusses features all the way through Java 16. That repository mandates not only Java 16, but even the preview features that aren’t formally released yet.
I guess after all that build up, you might be wondering who won. Here’s a picture of the results (an image rather than the actual tweet, since again Twitter won’t show a poll anywhere but on Twitter):
Two votes short of 2800. Maybe I should have voted twice.
Dalia, of course, was humble and diplomatic about her victory.
So there you have it. I’m actually surprised the Java 16 option got as many votes as it did, which is interesting.
A Decision in Google v Oracle
Speaking of Java, the (US) Supreme Court handed down a decision this week in the case of Google v Oracle:
This case has been hanging over the Java world for ten years now. Most people believe it’s a big reason Oracle bought Sun Microsystems in the first place. Here is a highly simplified summary of what happened: First Sun created Java, then Google wanted to build a mobile operating system for their phones and Sun suggested Java ME (the so-called micro-edition, which pretty much went nowhere). Google said no and decided to build their own version of Java. Then Oracle bought Sun and sued Google claiming copyright infringement.
In the original case, the presiding judge did the worst thing he could possibly do to Oracle — he took the time to learn Java. That meant when the specific points were contested, he was able to dismiss them as too trivial to matter.
Oracle appealed, of course, and eventually changed the issue to whether or not you could copyright an API. If so, ideally from Oracle’s perspective, Google would owe them a fee for every Android device in existence. On the other hand, that could massively negatively impact the entire open source world.
(Oracle provides an open source version of Java through the OpenJDK project. How would that have been affected? No one knows.)
Let me give you the best analogy I have. If you rent a car, you know when you sit in the driver’s seat, you will find a round steering wheel in front of you.
You also know that if you turn the wheel counter-clockwise, the car will go left, and if you rotate it clockwise, the car will go to the right. You know all this without having any idea how the system of gears and levers inside the car makes that happen.
An API (short for Application Programming Interface) is like saying the car has to have a steering wheel that works the way I just described, without saying how to make it actually work. Each manufacturer is free to implement the steering wheel their own way.
Oracle’s argument was that they could patent the idea of having a steering wheel in a car, and anyone who made it work in an actual car owes them money.
Here is a link to an article at the EFF (the Electronic Frontier Foundation), which is one of the major advocacy groups for open source development. What you’ll see there is that ultimately the Supreme Court declined to rule on that particular issue. Instead, Google argued that their use of the Java API constituted fair use, which permits limited use of copyrighted information without acquiring the rights from the copyright holder.
This week, the Supreme Court reversed the Federal Circuit opinion and ruled that Google’s use of Java constituted fair use. This was a rather odd and unexpected opinion, given how much of Java Google reused, but there it is.
The decision was welcomed by all the people I follow, but may have some strange ramifications in the future. Does this mean that any time a company releases their own code, they’re giving up all rights to it? It’s not clear.
All I know is that I’ve been getting questions from students all along about what it would mean for Java if Google lost, and I always said to wait and see. Well, now we have a decision, and now we’ll have to see what consequences come of it, intended or otherwise.
A Taste of the After Times
This week writer Laurie Penny published a post on Medium about the post-pandemic world. She claimed that we won’t be going back to normal because there is no normal any more. Instead, we will move into the After Times.
I got a glimpse of that this week. Thursday was “2 shots (Pfizer) + 2 weeks” for me, meaning I’m now both vaccinated and safe. I had a class that ended at 9am (yikes) that day, and I decided to celebrate my newfound freedom by going out to breakfast.
I went to my regular place, to no avail. We’ve been ordering from them all along, trying to help keep local businesses going, but apparently offering breakfast during the week was a casualty to the pandemic. So instead I visited another local business, who moved during the lockdown, but I thought was worth a try.
They’re really a bakery and act that way. While they now have a large dining area, you still order at the counter and everything is delivered wrapped in plastic as though it was all to go. This is Connecticut, so most everyone was masked and social distancing when I ordered my breakfast, though there were a handful of older people sitting in a corner who I presume were also vaccinated.
I’m afraid the eggs were flat and the sausage was disappointing, the toast was marginal, and the coffee was just regular coffee. Not a terribly good experience overall.
My rating, however? 10/10. Did you hear what I said? For the first time in over a year, I went out to breakfast. It was glorious.
If you know the movie The Adventures of Buckaroo Banzai: Across the 8th Dimension, you now have that whistling theme song going through your head.
And if you don’t, here you go. Remember: wherever go you … there you are.
Meme Watch: Being Vaccinated Does Not Mean
The meme that I ran into a few times this week was “being vaccinated does not mean” followed by something silly.
Right. This is even better:
This one hit closest to home:
Um, yeah. This week there will be a new beta of my book Help Your Boss Help You, with nine of the ten chapters now available. The new chapter is called The Two Messages that you want to communicate to your manager, which are:
I got this.
I got your back.
Coming soon to a web site (specifically, this one) near you.
As a reminder, you can see all my upcoming training courses on the O’Reilly Learning Platform here and all the upcoming NFJS Virtual Workshops here.
Last week:
Java Testing with JUnit 5, on the O’Reilly Learning Platform
Spring and Spring Boot, ditto
This week:
Basic Android, on the O’Reilly Learning Platform
Upgrade to Modern Java, an NFJS Virtual Workshop
The Spring MVC Framework, NFJS
Kotlin and Spring Boot Essentials, O’Reilly