r/programming • • Feb 22 '15

Java Makes Programmers Want To Do Absolutely Anything Else With Their Time

http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35 Upvotes

636 comments sorted by

View all comments

25

u/DJDavio Feb 22 '15

I feel that the learning curve for making a solid real-world Java application or library is quite steep.

Imagine a newbie learning Java for the first time: Within minutes he has created his "Hello World" command-line program. But in the real world, everything has to be a dynamic web application so he dives into Java EE. Hmm, I need to host my app in a container, huh? Okay, I'll install Glassfish/Wildfly. Hmm, I need to output some JSON, but the default javax-libraries suck at this, let's see what's out there, GSON that looks okay, let's download it and put it in my lib folder....

The next day, a new version of GSON is released, so our newbie thinks "hmm, this is not a very effective way to manage my dependencies, there must be something to make this easier... oh, Maven, let's check it out!"

About a month later our newbie finally understands that group is mostly just a fancy name for project name and artifact is a fancy name for a library or application created within the project.

Now that his application is evolving he starts to think about testing, hmm, JUnit, let's add that and do some unit testing. Oh, but how do I unit test my spaghetti? Every object I create, creates many other objects. Can I just pretend that I have an object without triggering my entire application code? Enter Mockito. Oh and add Arquillian to make it more complex.

Finally, he has a Java EE app with dependency management, unit testing and mocking and btw he added it to source control. He chose Git because it seemed cooler than SVN.

But he's tired of doing everything manually and googles for "automatic building" and stumbles upon tools like Jenkins.

About half a year later, he feels he's finally comfortable of being in the real-world Java environment where there is a lot of stuff that isn't actually Java.

I don't know whether C# has the same problems or whether it provides a more complete ecosystem out of the box, but the hard part about Java is not the code itself, it's learning the ecosystem.

3

u/[deleted] Feb 22 '15

I fully agree with this. The thing that makes Java bad is that it's old, and just keeps accumulating "things" that you need to know to be good at it. The amount of mental baggage that a developer needs to juggle distracts them from their focus on writing concise programs.

I remember working with some developers a while back that were relatively new to Java, and being frustrated because they weren't using some widely adopted packages and practices that make Java friendlier. Then I thought to myself, "Why isn't this built into the language?". The problem isn't Java itself; its that Java + "everything else" is too much to expect from an average developer.

That's what I like about Go. Sure, I can accomplish the same exact things in Java, but I have to add dependency x, process y, etc to get the same thing as the builtin features of Go. There's less to juggle in my brain. Will Go become bloated? Probably. Old languages always find a way. But I'm enjoying it in the meantime.

3

u/[deleted] Feb 22 '15 edited Feb 22 '15

[removed] — view removed comment

→ More replies (3)