r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

573

u/Srazkat Apr 06 '22

honestly what is hard about java ?

51

u/ICantBelieveItsNotEC Apr 06 '22 edited Apr 06 '22

Java itself is easy. However, the standard library and ecosystem are a mess. I say this as someone who is currently employed as a full-time Java developer.

Imagine being a new developer, who has just learned about loops and conditions, and then being introduced to the nuanced differences between for( i = 0; i < things.length; i++), for(Thing thing : things), while(thingsIterator.hasNext(), things.forEach(...), and things.stream().map(...).collect(...). Or having just learned what null means, then having to figure out how Optional<T> is different.

Then if you actually want to make your own application, you need to learn the intricacies of Spring or Micronaut dependency injection, beans, controllers, etc, which is basically like learning another new language.

If you want to get it to build, you need to decide whether to use Maven or Gradle. To do that, you need to learn the pros and cons of each. Then you need to actually learn how to set up a build config in whichever build automation tool you decide to use.

3

u/jerslan Apr 07 '22

Maven and Gradle aren’t that hard to learn the basics of.

Sure, if you want to do some more advanced stuff like inheriting from a common parent with dependencyManagement and pluginManagement sections it can get more complex pretty quickly, but the bare bones basics could easily be part of some Java 101 curriculum.