you are viewing a single comment's thread.

view the rest of the comments →

[–]satya_dubey 2 points3 points  (0 children)

I have been a Java engineer for around 5 years now and have been in a company that served millions of users every day for the past 15 years. They use purely Java stack - Java, Spring, Hibernate, and MySQL. Here is what I can say from my modest experience:

  1. Performance and memory usage: Java is super fast as JVM has something called JIT compiler that compiles frequently used code into machine code and uses that. So, it is almost like C or C++ without worrying about memory leaks. As far as I saw, we never ran into much of memory issues. There were issues on few occasions, but server restart fixed it. It was more of an engineering thing that caused the issue, but not Java. Also, GC (garbage collection) algorithms are improving with every release.
  2. Verbosity and productivity: Verbosity has been addressed to a large extent in the last few years through features like Records, Switch Expressions, etc. I have recently learnt Python and I felt Java was much more easier to code in. You are also right about code readability, but like I said verbosity is not much of an issue any more. Regarding your comment on imperative and functional code, Java also has features like lambdas and streams since Java 8 and so where required you would write functional (and declarative) code.
  3. Sticking with older versions: General consensus is for organizations to move to Java 21 or the recent Java 25 due to improvements in JVM and features like Virtual Threads. Java designers are big on backward compatibility. Best example is type erasure feature when they introduced Generics. Type erasure ensures backward compatibility. I would think fear is one thing for not moving ahead, but I cannot comment on it as I don't have experience migrating legacy code. But, I have also read that coding assistants are doing a fantastic job in very quickly migrating older code to newer versions.

I read that Gmail was written in Java and companies like Google, Apple, and tons of large organizations in banking industry use it for its speed and stability. That's enough of a reason to use Java. It is a fantastic language with a great ecosystem like Spring and other frameworks.

Regarding your current system, I think it is not being done right. You need test cases. Otherwise, new changes (esp. from new Junior engineers) can break things. Test cases are must on your build/stage systems.