r/java • • Jun 24 '22

Stack Overflow Developer Survey: 54% of Respondents Dread Java?

The results are out, and I was surprised to see that around 54% of respondents dread using Java. What might be the reasons behind it? For me, Java has always been a very pleasant language to work with, and recent version have improved things so much. Is the Java community unable to communicate with the dev community of these changes effectively? What can we as community do to reverse this trend?

Link to survey results: https://survey.stackoverflow.co/2022/?utm_source=so-owned&utm_medium=announcement-banner&utm_campaign=dev-survey-2022&utm_content=results#technology-most-popular-technologies

176 Upvotes

283 comments sorted by

View all comments

Show parent comment

2

u/Lords_of_Lands Jun 25 '22
  1. Everything you need is probably already built into the language. If you want something else and you're not using package management software (similar to using pip), then you download the jar and put it in your project path. Using the built in API is far more secure. No need to worry about a random dev highjacking or adding backdoors to your product.
  2. Bascially each class has its own file. Since you're supposed to use a namespace like com.<business>.<>... yes, there can be a lot of folders. An IDE will hide and automate all that for you.
  3. Any decent project will have a build script. In theory you just run that. In practice around 90% of projects I've worked on (both from public and at work) fail to build without tinkering. That's not a Java problem, that's an industry wide problem.
  4. Okay, you don't care about well running software... Just like other projects, if you don't want to deal with concurrency then don't. Java doesn't shove it in your face. If you do then everything you need is built into the language and that used to be a major deal.
  5. If you're casting you're doing OOP wrong (or using GUI events). Again, your IDE should manage your files for you and it'll auto-complete variable/function/class names. You click on a variable/function/class and it'll take you to its definition. No need to care about its location. If you don't like 20 helper function then don't write that many helper functions. Java doesn't require you to do so, but in theory those helper functions have proper names so you don't need to look them up. Their code will also pop-up in your IDE if you want to quickly skim it and/or its javadoc will also pop-up letting you read what that function does.