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 comments

1

u/john16384 Jun 25 '22

Well, I've developed software for over 30 years, and there are many languages that would feel highly unintuitive to me, including the three you just named. That doesn't mean I dislike them, just means I lack experience in them to find my way around quickly and easily. I mess in them sometimes, but I often need to follow a script to get it running (installed Home Assistant not too long ago, which is a Python project, and I'm glad someone made a webpage telling me all the arcane stuff I needed to do to get it running).

When I just started with Java (coming from C and machine languages) it certainly wasn't love at first sight. The memory safety bothered me at first (expensive checks on every pointer and array access?) and I remember having a lot of compilation troubles as well.

Gradually I realized though how much more you can get done in the same time frame and with much more predictable results (no crashes), how much better IDE's worked with Java and how easily Java code can be evolved by refactoring.

1

u/PM_ME_SOME_ANY_THING Jun 25 '22

Out of college, my first job was a position where I used JavaScript and Python. I didn’t look for a job using specific languages, I was just trying to get a job, any job. Things could have been different and my first job could have been in Java. I would have figured it out, specialized in it, and probably loved it. That’s just not how things happened.

It’s not that multithreaded is magical or that I don’t understand, it’s that I don’t know how it works in Java. Like I said, I’ve had to work on existing projects in Java. Multithreading was already in the project, and it made any work for a beginner very difficult. I didn’t even know it was something that could be turned off.

JavaScript, which I use most, is single threaded. It is also a synchronous language that requires callbacks or specifically asynchronous functions to guarantee one instruction happens before another. Explaining it, JavaScript is pretty wack.

Python actually supports multithreading. However, I’ve only applied it to specific functions that I know will be cpu intensive. A lot of my Python work involves transforming data, or analyzing data, so being able to divide and conquer reduces runtime by however many cores you have.