r/programming • u/knife_sharpener • 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
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.