5
de17
4y

I am a junior Java(Spring) developer myself and I am trying to understand the current trends.

Why are devs hating (or) moving away from java?

Comments
  • 9
    The number one reason would be "Oracle".
  • 7
    The number two reason would be "Java"
  • 0
    - steep resource usage
    - call by reference
    - purely OOP
  • 0
    @metamourge why would OOP be a drawback?
  • 1
    @de17 a perspective question. Its' inflexibility can be a drawback. I prefer FP, and a language suitable for both OOP and FP depending on needs is imo preferable.
  • 4
    @de17
    Pure OOP is a drawback.
    Basing every operation around Classes,Objects and methods is annoying at best.
    Having to instantiate a new object for an operation rather than calling a function is pretty damn annoying.
    This point particulary applies to java as it drives this shit to a maximum.
  • 2
    ...I like java :'(
  • 4
    @metamourge That's a consequence of Java being from the 90s where everyone was high on OOP crack.
  • 5
    Looking at the comments, people still hate on java because their only experience was their intro to programming back in college with java6 or something
  • 0
    @yellow-dog it has left a lasting impression. Change my mind. ;)
  • 1
    @miksaraj why would i, frankly ion give a shit, less competition for me
  • 0
    @yellow-dog I'd be interested in the arguments. I'm unlikely to be tackling Java anytime soon, but you rarely see anyone say anything good about Java, so that would make a nice change
  • 3
    @miksaraj aite, just to address the mentioned problems

    Java is not strictly oop, never has been, its a mix of fp/oop since j8. Steep resource usage means you use around 200mb of ram for a fairly simple application, but it stays 200 until you venture into enterprise grade apps, so i dont see any issues with that.

    Ither than that, its evolved a lot since j8, development time is now way shorter than it used to be, its one of the fastest languages if you dont count vm spinup time, the ecosystem has basically anything you could think of, has great tooling and is supported pretty much anywhere.
  • 2
    I think GraalVM should be worth a mention i regards to how Java is trying to improve from < Java8.

    I like Java for all its quirks and benefits. Boilerplate, yes, but there is boilerplate in everything. Have a good IDE and tools to generate the most annoying things for you and write the last boilerplate yourself and get moving. I'm not flattered about all the boilerplate hate.

    I like Java for its enterpriseness. And due to its OOP focus, it almost feels like that "a proper _and required_" design phase is built into the language as a prerequisite to make a good and maintainable Java module.
    I don't like the prototype feeling of other more hip languages. To me those feel like: "lets just have it working and then we will fix/improve/finalize it later", where Java, to me, feels like it needs a lot more premade architecture, design, planning and thought-work.

    Note: I'm not saying you can't make poor Java code.
  • 0
    I think a lot of devs are leaving java to golang because it is easier and faster than java ...

    The major reason why large companies use java is because java programs tend to be faster than programs written in JavaScript or Python ...
  • 0
    Got laid off from my JS/PHP job three months ago and had to work on a J8 sample application as an exam for a company I was applying to.

    Have to say I had a blast! Was a PITA getting J8 to do things that were 'simple' to do in JS/PHP but it was really fun actually having to think about things (like what data structures to use vs just using [] or {}). It made me feel more like a programmer.

    I would have taken that job if they offered it to me if only to get back into Java. Sadly, they ghosted me for 2 months and the only time they contacted me again was on my first day at my current job.
  • 1
    Java is slow and often (in my opinion) a bit overcomplicated.
  • 2
    Because while Java isn't bad on it's own, the alternatives are better.

    One advantage that I can think of straight away is that Java doesn't make spring boot, maven, anything. They make the VM. But with C#, you have MVC and nougat and the Visual Studio build process, all by Microsoft. This means you can expect enterprise level support from one of the biggest companies in the world. But these technologies are optional so you aren't even locked into MVC and Visual Studio. If you use .Net Core, it's cross-platform, too.

    And it has really nice stuff that Java just chooses to ignore, like operator overloading and other tricks that make stuff like Linq possible (Linq is pretty great).

    The verbosity is ridiculous and since it's stdlib it won't change. The only solution is Kotlin, which compiles down to Java. But if you're going to move to another language why not something easier like Python or something ((better)) like C#?
  • 2
    Not even to mention the politics of it. Oracle is a shitty company with shitty, outdated documentation and anything you want to accomplish with them costs an enterprise arm & leg.

    Java itself has a bad reputation for being slow and memory heavy. Managers don't know the difference between rumor and truth so when your higher-ups make decisions, they base it off things like "Java uses too much memory" even though it may not be true (Today, it really isn't all that true).

    Plus, people like to be on the cutting edge. That's why things like Node and Deno and NoSQL are such big conversations: managers don't know SHIT about these things. But they're cool, so your boss will try to tell you to "look into them" as many times as they can possibly bring the subject up. Java is archaic.
  • 1
    And really, the sad truth is, Java doesn't have anything special about it to make it attractive. Python has duck typed, dynamic, static, whatever bullshit and pip. Node has a whole ecosystem of bullshit. C# has Microsoft and a huge market share of backend devs. PHP makes it easy to hire and is somewhere between C++ and Python.

    Java is just boring, frankly, so, many people don't really have it on their mind (for no technical reasons whatsoever).

    It was big talk back in the day of cross-platform being a big deal. Now, cross-platform is a requirement, basically. And Java never came up with any new tricks. So it's speeding into the "old and boring" category, along with perl, vb, ruby, delphi, coffeescript, etc.
  • 0
    @pythondev Your profile lists 2 particular stacks: Python and Vue (obviously JS) to what exactly in your arsenal are you comparing Java to?
  • 0
    @AleCx04 I don't list everything I have ever used on my profile, in that case I would list, C#, C++, Java, PHP, etc.. I am well aware that Java performs better than Python, but if I want to use a language that requires a lot of code for most (basic) operations, I'll just use ex. C++ and not Java.
  • 3
    Here are few reasons why I don't like Java:

    1. Verbosity
    Java is incredibly verbose. Even when doing simple things. It's verbosity comes out from the old enterprise architects who wanted everything as flexible as possible but at the cost of a code which is horrible to read.

    2. "Portability"
    Sure your app works all OSs. 90% of the time since you cannot escape OS quirks. As long as you install 100+ MB VM on it.

    3. Oracle
    They started charing money for their SDK. And Oracle in general is a horrible enterprise company with horrible solutions.

    4. Ecosystem
    There is a lor of software for Java but they are taking the inspiration from Java on design which makes them horrible to setup easily. I spent hours in the beginning booting up a simple tomcat server and dealing with all the random issues popping up and configuring it in XML of all things. Its just hard to work with and requires a thorough manual sweep while most of other language ecosystems are waay more understandable to setup.
  • 3
    @pythondev Speed isn't much of an issue with Java for long-running applications, i.e. especially server-side. Once the startup and JIT compilation is done, C is only like 30% faster these days.
  • 0
    @arekxv #2 is the reason why Java is dead on the client side. Every jar file depends on one specific JRE Version and the nightmares begin when two jars need a different JRE each.
    Additionally portability ends at Apple mobile devices and even on MacOS it‘s a PITA because the Oracle JRE is not able to set the paths during the install routine.
Add Comment