Java programming is strange

Java-Programming100x100 I didn’t realize that in 2013, in order to do programming in the most advanced language out there (AKA Java) you have to set proper environment variables, in a magic way which nobody really documents. Not only that, but you have to already know that, you’re stupid if you don’t know them yet.

Java is the language with the least respect for the platform it runs on. Apparently, stuff work because there’s tons of glue and tape that programmers use to patch things up. Out of the box? You’re joking. The box is a zip file, because we’re too cool to do distribution packages that respect the platform you’re working on.

And, of course, in order to make your Java software run you have to set special environment variables. What? You didn’t know you have to set JAVA_HOME environment variable? Set it to where your javac is located! Oh, you added bin/ to the path? Your application will work, but not as you would expect. Please, let me invent a path where I don’t find some things you didn’t know existed for you! Why, thank you, ANT, that would be lovely, I love a challenge.

There are no project files in Java world. You can’t really have several projects in different instances of Eclipse unless you have the ugliest popup at start-up. Or, the true solution of a real Java programmer!

A different copy of Eclipse for every project you work on. Because what is more important than copying and configuring a different copy of Eclipse for every Hello World you want to write? This is why Netbeans install its own copy of GlassFish and Apache Tomcat.

I’m a fan of having control and doing stuff by hand. But if that’s the only option, I honestly don’t like it. I respect, understand and use the power of out-of-the-box. I respect configurability in the UIs, and UIs in general.

Out of the box, ANT requires a batch file of 200 lines to run properly. Why? It really does nothing special, but it checks and sets a series of environment variables. Could this be abstracted in the Java environment? Of course. They are? Probably. Are they used in a consistent manner? Definitely doesn’t look like it.

There are too many things that one must KNOW before they take on Java programming. Not knowing them, not really understanding them can be painful. The setup phase of any Java programming project is a real pain.

If you want to do web programming you will probably want to install Apache Tomcat. Yes? NO! (you didn’t pay enough attention, did you?) No, you have to use the copy that comes with your IDE. Where is it? How is it integrated? Who knows? It’s difficult to say.

This is why for any library you want to use and it’s written in Java, you have to have instructions for each IDE you want to use; there is no intuitive way to do this. Each has its quirks, each has its tricks. And when you ask: why do I get this error? The answer from community makes you feel really stupid: “Oh, you didn’t know you had to copy THAT in the lib folder? Which lib folder? The magic lib folder that you should’ve created in the first place.

Java feels like stone age. Did I tell you about the Android Studio experience? Which experience, to be more precise? I had to set some (again) magic environment variables to start it; but by the time I found out which of these environment variables I should set I totally lost my interest.

Probably, the superior option would be to fire a basic editor (notepad++ is a really good one) and create your projects. By hand. At least you have the satisfaction of working with the stone age tools that Java offers like they did it in the stone age.

And don’t get me wrong. Eclipse is a very sofisticated tool. So is Netbeans. IntelliJ IDEA? Sure, it’s a nice tool. But the thing that binds them: Stone age thinking. Just so you can understand: the project setup for using libGDX includes a video that 22 minutes long. 22 minutes, ok?

Yes, I like toying with Java.

Comments

Java programming is strange — 8 Comments

    • The workspace would be that horrid popup at the start of Eclipse? That is the most horrible thing that ever existed.
      Work sets: What would those be?

      Maven: searching through my eclipse software to install, I see nothing related to maven. I guess it’s another zip file I have to install? Harshness aside, I don’t really know what maven is. All I can say is that I hate the setup part of any starting project. And with Java, this comes close to suicidal.

    • Oh, and by the way, have you seen how SLOW the damned Available Software page in Eclipse? It’s one of those things that beg for improvement.

      Let’s see how my Eclipse experience works. If it works better, maybe I’ll even bring myself the goddamned source code and try to fix it. Because it’s really really really bad 🙂

  1. The Sun was eclipsed, devoured by Oracle … and Java was left with no decent master.

    Unless Google, IBM or a similar company step up, I believe that Java will slow down. It’s already huge enough so that it doesn’t die in the next 10 years. But that’s not enough in the very long term.

    I do think that the trade-off offered by managed environments (JVM, .NET) is a good one. As in – you lose something with respect to either C++ or scripting languages, you gain something else. It is good to have that option. Particularly on linux, where the .NET implementation is not amazing by any means.

    And yeah, I don’t think highly of Eclipse either.

    • Google kind of stepped up, but Oracle fights it.

      Sun had the wrong approach about Java, and this is how they suffocated it. It’s something like the ‘death by committee’ that happens nowadays with C++.

      Sun fought IBM (in the end, Eclipse is a joke on Sun, isn’t it?). Oracle now fights Google.

      I think everyone would win if a new language would be created on top of the current Java binary specifications. Scala builds on top of Java, and it’s a good thing. A new, more dynamic Java language would emerge, that would be a lot better for everyone.

      I feel like stone-age thinking is really everywhere in the Java environment. I expect magic shell commands to jump and bite my face from everywhere. Tasting from the productivity of C#, I now expect more from the languages I use. Of course, I do C++, I do scripting languages, I don’t really mind that. It’s like with children. To love them is to expect more from them, and to expect more for them.

    • I agree with most of what you said. Though, Oracle and Google fight just legally. It boils down to “Sun created the API; we own the rights to the API”. Thankfully, the judge disagreed. I hope it stays that way.

      Anyway, I’m more thinking along the lines of actual product competition (e.g., JVM from Google or something like that, not just for Android but for x86 desktop/server systems). Much like lack of competition with C++ compilers in the Windows area means no real c++11 support, lack of real competition in the JVM area also means stagnation.

    • I am not sure about this, but maybe not the JVM is the problem, but the language itself. JVM doesn’t make your programmers more productive, but the very language they use to express themselves does. It’s Java that feels antiquated; JVM might be the fastest bytecode VM outthere (although I never measured).