Doug Stephen is Politely Peeved

In defense of Java -- Just not as a web plugin

With the recent rash of Java security holes going around, there have been calls around the web for the demise of Java, even going so far as to say that people shouldn’t install Java on their machines anymore.

This rubs me the wrong way, because it conflates the concepts of Java the technology with Java embedded in websites. It also rubs me the wrong way because of my personal biases; you see, by day, I’m actually a Java developer. This might be surprising, given that Java is usually a fairly derided programming language and development platform in the Mac community, and really in the development community in general. GUI’s created in Java are hideous, the language is often (deservingly) labeled as bloated, and also (mis)labeled as slow. But it’s what I do, because as a technology it allows developers to be productive, learn quickly, and deploy to many different platforms rapidly.

Java is often associated with shitty web-based animations from the early 90’s before Flash took hold. It is often associated with shitty bank software. It is often associated with bad programmers and poor performance. All of this is so terribly, patently wrong, but that’s because all of the counter-evidence lives in the domain of the nerds, rather than in a consumer/public facing realm.

I would know. We run Java embedded in robots at the lab and it works just fine. It’s also the 2nd most popular programming language in the entire world, since Java is the language that powers things like Android and a host of other Google properties, a lot of the infrastructure at Twitter (both directly and indirectly, more on that later), and a little game you may-or-may-not have heard of called Minecraft.

Don’t get me wrong. I think Java as a web plugin should die a horrible, terrible, fiery death. Even as a Java developer I’m the first person to disable the Java web plugin and flee from any website that attempts to use Java when I visit it. The issue is that because of the way Java works, the web plugin and the stuff that powers all of these awesome technologies are one in the same. So yes, by all means, disable your Java web plugin. I think that’s a fantastic idea. But don’t kill the entire platform

What the hell is Java?

People often tout that Java was developed as a web platform; this isn’t 100% true. It was actually developed for embedded appliances#History), specifically cable set-top boxes, and it just so happened that when the team creating the platform decided to shift to general computing they did so at the same time that the Internet was created. As such, the creators of the language decided to make the platform Internet cognizant, which if you ask any nerd who has written networking code in the other languages available at the time this was a complete god-send.

The core of Java is what is known as the Java Virtual Machine. When you install Java from java.com or the Sun website, this is really what you’re putting on your system. The folks who created the Java language had a grand idea; Java programs would be cross-platform with little-to-no effort from the programmers. This is a pretty huge deal. At the time, many programming languages had a lot of different tricks and hacks that were specific to each operating system, which is why in the past it was rare to find programmers creating applications for Mac, PC, and Linux all at the same time. The Java Virtual Machine aimed to fix this by acting as a sort of fake computer that sits in between the Java program and the actual computer running the code; a computer made of software instead of hardware. If the Java code targeted this fake computer, then instead of converting every single Java program to work for every single operating system, then only one program needed to be converted: The Java Virtual Machine. In practice, this has mostly worked.

There are a lot of other advantages to Java; as it turns out, people became so invested in this whole Java Virtual Machine that they started optimizing the hell out of it. It’s actually pretty fast; so fast that a few years ago Twitter switched a lot of their original codebase (written in Ruby) over to a language called Scala; this language targets the Java Virtual Machine because it’s so fast. Twitter also uses a lot of raw Java technology, like Netty, and routinely hires software engineers to specifically hack on the JVM.

And as I mentioned before, Minecraft.

One of the most wildly popular games available right now, and yeah, it’s written in Java. So if you were to uninstall it from your computer, you wouldn’t even be able to play it.

My thrust is that Java the technology is not inherently Java the web plugin. And while the above-linked PCWorld article may be one of the most recent to call for the death of Java, they aren’t the first and most likely won’t be the last. And I agree that Java web plugins probably need to go away; but for people to keep calling for the death of Java completely is simply the echoing of an opinion that is uninformed, rushed, and quite frankly for anyone in the technology field (nerdy or not) irresponsible, ignorant, and poorly presented.

This blog is not affiliated in any way with the IHMC, and all of the content and opinions contained here are not indicative of any sort of official stance or opinion held by the IHMC, the IHMC Robotics Group, or any of the people associated with IHMC unless otherwise stated explicitly.