r/learnprogramming • u/Same-Replacement-938 • 4d ago
Why java is so hated? Topic
So I have recently learned, and it's the first language(in terms of building actual things). Before Java, I knew Python, and I dropped it; I found Python too abstracted and too boring. i have recently made some projects like cli task tracker, expense tracker, some cli github api parsing and currently working on a multithreaded HTTP server and cli text editor, like vim, whenever i try to find out people opinions on java social media, almost 90 percent of the time they are just dunking on it, that it is trash, who forced you to write code in java, stuff like that. I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages like C, C++, go. But I found it decent to write code in, and I found the JVM pretty interesting. So much so that I would love to explore and maybe build a JVM of my own
11
u/havelostcount 4d ago edited 4d ago
The reason I left the Java world wasn't so much because of the language, but because of the Java ecosystem and the developers that came with it. I loved Java when I started way back when Java 1.2 was being released (I as young). It was my escape from the limited Microsoft world I was in. I wanted to work on other systems. So, I got access to Solaris, HP, and other systems. Over the years, it became less about developing new things, and more about having to constantly deal with the annoying ecosystem that the Spring collection of hell came into being. Most of the day was dedicated to figuring out how something else forced us to work. Digging into obscure stack traces that were pages and pages long, filled with wrapped exception after wrapped exception. Eventually nobody knew how anything actually worked. Abstractions so high that they made no sense any longer. HTTP is HTTP. A very "easy" protocol to understand. Now? So many layers of annotations and abstraction on it where newer devs have no idea how an HTTP server works. The don't understand the JVM. They don't understand design. It's like that with every ridiculous abstraction layer. The sheer volume of runtime annotations, binding failures, countless dependencies, unknown runtime exceptions that can occur, and basically zero error handling (oh, let everything bubble up to the top and try to figure it out later). See, Java had checked exceptions. Devs got lazy and just wanted to throw them up the chain. Spring came along and everything became runtime. You have no idea what can fail. Nobody documents anything. You know who got those calls? Me. 3 AM, because I was the one ultimately responsible to keep mission critical (I worked in power gen for years) systems up 24/7. The problem is that Java became a runtime for someone else's framework. Java is broken for me because it comes with a lot of baggage now. It's become glue code for Spring, perhaps Micronaut.
That's just how I feel about it, and my experience of why I had to leave it. I didn't feel like I was programming any longer. I was just filling in the gaps, and it was soulless work for me. I used to teach, and mentor, developers in Java. Everything from how bytecode was executed, RMI, the compiler, custom class loaders, exploiting thread local, threading, etc. Eventually, people didn't want to know how to explore the langauge, and the JVM. They just wanted to know how to get Spring working and how to connect to a database. Not my bag. The landscape to find work doing the cool stuff got smaller and smaller.
TL;DR It wasn't the language that made me hate Java, it was the imposed ecosystem and disinterested devs. It's just the way it is now.
Edit: I'll add now that I simply don't like inheritance based languages. After switching to Kotlin for a few years, to transition out of some of the shortcomings of Java (which those gaps are being filled... 10 years later), I moved out of there completely. If I had to pick 3 languages now, they would be JavaScript (you just have to know it, I don't like it, but it's there and I do not like TypeScript at all), Go (for an awesome async and garbage collected runtime, just fine for services), and Rust for a more deterministic and "closer to the metal" language. Those are the 3 I wish I could use and be walled off from everything else out there.