Java is dead. Leave the sinking ship, Kotlin, golang, whatever it is, learn another language!
Is that really true?
History
Let's look ...
For further actions, you may consider blocking this person and/or reporting abuse
Java was a leader at first. But then many years of lagging C#'s innovations made me jump ship.
Java still doesn't have an IDE remotely close to Visual Studio. But alas none of that matters because Node and Javascript/ Typescript will displace .Net and Java. The new word is Isomorphic design, and it's already taking root.
Funny thing is, I forgot to mention that I’m doing Typescript professionally...
I’m using IntelliJ for both Java and Typescript and it’s an awesome IDE, I am amazed every day by the ingenuity. But I haven’t tried Visual Studio recently. Are talking about VS Code?
Although in some aspects, typescript is a fun language, I have to admit that I am really happy when I’m going back to Java during Full Stack development.
For C# it's Visual Studio the big brother of VS Code. I use VS Code for all Typescript development. Its Git integration is nice. Our backend is .Net core / C#. Haven't yet gone pure Typescript but will soon.
Talking about IDE's, I used to code on VisualStudio, now when possible I use Rider, as it's from jetbrains and it's what i'm used to(I'm an Android Developer, so AndroidStudio).
My problem with visual studio and vscode are that they are bad out of the box (in my opinion), while Webstorm, Rider and IntelliJ are great out of the box.
But the main thing is: use what you like, there are no perfect IDE, there are many options, and some are better than others in certain points.
Yes indeed, I recently worked in two very large companies where Intellij was king. Here in Minneapolis, most of the really large banking and retailing operations are all Java shops; which surprised me, the .NET guy.
I've worked with a couple of IDEs so far, Visual Studio (very long time ago), Eclipse, NetBeans, XCode and since 6-7 years, it's IntelliJ. It is just so well engineered, beautiful and fast, there is just nothing I can complain.
But, the IDE is just a tool. So whatever you're productive with is fine.
You know the IDE is good when you hardly even have to type.
I do both Java and C# and I have been very disappointed in Visual Studio. There have been times when my whole machine slows to a crawl as VS does... something. In my opinion, IntelliJ IDEA provides a better experience then Visual Studio.
When my work becomes more .Net Core heavy, I look forward to putting Visual Studio to the side and spending more time with IntelliJ Rider.
We always used Eclipse because it was free and pretty solid. Never used IntelliJ. Used Netbeans and the windows hotkeys for copy and paste didn't work in it so I was done almost immediately. Also, the merge preview feature for svn and git was command line which was a joke.
Well, one of the worst things I ever tried was Visual Studio. Constant lock downs, slow downs, slow detection od writing and such. Live code was interesting thing but it's just too heavy. I get that people use a lot of stuff from it but for us where text/code is more important than features yet we still like smart code suggestions and smart search IntelliJ benefits more as VS does tend to slow down quite frequently or even freeze.
Btw I did use 2017 and 2019 version recently so it's not the issue with old versions. I'm not saying it's bad just that it got me frustrated MORE times than IntelliJ did (meaning intellij gets me also but everything does so its quantity that matters). VS Code on the other hand was great (of course even this one crashes or freezes but rarely happened to me). The only reason I'm not switching to Code is IntelliJ's smart code suggestions and cleanups.
Yeah, sometimes I also get frustrated about IntelliJ but then I’ll check the task Manager and find out that my company virus scan is slowing everything down to a point where even auto completion takes 10s 😞
I'm a software engineer who has recently moved over to C# using a tonne visual studio.
Intellij is years ahead of Visual Studio, JetBrains just have it right. I'd say the best thing about VS is Resharper, also JetBrains.
Luke, I couldn't disagree more. My last Intellij experience with Java, just last year; was majorly painful. The developers used so many plug-ins and non-default configurations, that not even they knew what was needed for a new install.
It took us 6 weeks to smooth out the rough edges. Oh they'd say, we don't use Maven, we use Gradle, then they say you need this or that like access to the super-secret class repository they had. Totally frustrating.
Ok, that sounds pretty bad. Usually, the best idea is to keep everything default.
That question: how is any of this IntelliJs fault?
It's not IntelliJ's fault other than its default set up didn't appear to be what our developers wanted, so they added tons of stuff and they didn't seem to have a standard install. I went to IntelliJ site and downloaded it, but that was just the start of trouble for me.
Visual Studio will install everything you need from the start except MarketPlace add-ons. But no market place add on is an absolute dependency for VS to function.
Did you use Ultimate or community version? The latter certainly has a couple of things missing, but the defaults of IntelliJ are based on language defaults and common sense. If it needs a lot of configuring in your team, then your team is probably far from standards. All settings if IntelliJ can be exported and shared, BTW
I was just assuming that... As mentioned in one comment above, I've worked with XCode and it felt like the stone ages compared to IntelliJ
Great article, but the callback APIs in Vert.x allowed to implement the other "higher level" or better alternatives very easily. For instance Kotlin Coroutines based methods... and also Promise/Future based versions.
BTW: I think Fibers are only the pendant to other languages coroutines implementations, right?
Yes, coroutines are a way to implement synchronous looking asynchronous code.
Fibers are a JVM feature as an alternative to heavyweight threads. On top of that, you can build coroutines as a language feature. You can also build Erlang-style Actors without any hacking like byte code manipulation.
So, I guess It's also a big win for Kotlin and Scala. However, what are "lightweight" threads? I guess I understood Coroutines in general, that when the thread would be blocked by I/O for instance, a suspending function suspends itself and a continuation is stored in a scheduler. The thread can do other things until a scheduler decides, that the suspending function / continuation should be resumed on whatever thread/thread pool is specified when I/O is done. However, here threads are always heavyweight and the Coroutines in Kotlin are called Lightweight for instance. However, what the JVM add as lightweight threads? Have to read again about fibers. I think that's like the distinction between the upcoming record types (data classes in Kotlin) and the JVM value types. There, I also have no clue what value types on the JVM mean.
First, there are couple of talks on YouTube if you want to get into the details, e.g. youtube.com/watch?v=vbGbXUjlRyQ
Your assumption about coroutines is right. Fibers is the underlying JVM concept. A fiber is basically a data container that is able to hold stackframes (e.g. local variables) as well as pointer that knows the current location in the code. When a operation blocks, the pointer is saved and the OS thread can be used to run another Fiber until the data is available and the initial Fiber resumes the code using the pointer and the stack.
Record types are basically syntactic suger. If you want to write a simple data holding class that has a couple of fields, a constructor and getters and setters, you can simply use
record
and you don't need to actually write all that but you can still use it.Value types are a memory optimization in the JVM where you can actually pack all primitive types (int, String) and arrays in a sequencial order in memory without the needs of references (pointers).
Thanks a lot, will watch this talk now. I assume Roman and his team use some workaround / not the optimal solution to implement in Kotlin Coroutines without this JVM enhancement. But that said it'll help Kotlin as well.
I have to say Kotlin might be hyped, but almost all items from Effective Java for instance can be implemented much easier and the defaults (for instance that classes can not be extended per default are much better -- should probably be like that as it's just a few years old). Also I think Generics for instance are much better implemented/easier to use as well as the non null type hierarchy and a lot of other stuff is great. Nontheless, I still mostly (have to) write Java code in my day to day job and I hesitate to mix Java/Kotlin in one module in a multi maven module project of mine :) but I use it in one module exclusively (using Vert.x and its Coroutine based API, which I think is really great).
Yeah, maybe that’s a nice way to sneak in new language to just mix them. 😉
However, if you’re working in a team in a larger code base, you will need to get a team agreement first.
It's funny you start with a ship analogy. In a discussion recently Java was the mammoth tanker, moving steadily, but slow. It has some advantages. Like with new features it can look at some of the other JVM languages and learn from it, to do it right the first time. These is some disadvantage to being backwards compatible. Like nullability which seems better in Kotlin. But if you make wrong assumption in nullability in Kotlin the whole program crashes. While in Java you can do the same, check at the borders, you do need a bit more disapline.
Kotlin does one right thing: clearly separates nullable and non-nullable types and lets compiler do the rest. But same thing is possible in Java by using class like Option (Optional does not always does the job) to mark nullable values. There are more details about this approach in my article
Option could still be null. There are several annotations that could help with nullability but some work compile time and some runtime, it's easy to get it wrong.
Annotations are useless. And this is just a matter of properly handling of null values coming from external code and matter of habit to use Option where value can be nullable. There should be no cases when Option itself can be null. In fact this is extremely convenient to assume that all variables are not null and removes a lot of headache and mental load. But, well, convenient use of this approach is impossible without a significant doze of functional code. Which is good too, but, of course requires changes in habits and mental model.
Thanks for this comment, that was exactly my point.
😄, I used to have questions like which language is better ? After discussing with my friends and listening to people online, I realized that Its better to stop asking these questions. Instead start asking which tool is better for current Job and Trend.
Choose the right tool for the Job.
C#
orJava
for building enterprise and large applications.JSF
you can think of usingAnuglar or
Reactor
Vueetc. for Front End
.Python
for Machine Learning.Go
for Micro Services based performant applications.In future maybe today's Languages and Framework may be outdated, so to survive you will be forced to learn new language of that time.
Conclusion:
Developer Happiness, stick to the language which make your life easier, like easy to read syntax, maintainable, has Good IDE. I like C# for current work, and its up-to you to decide what you like.
Its always good to be Open to learn any language as required and Choose the right tool for the Job.
Hope this helps.
I work for one of the biggest names in IT. If you want to get work for a client, you would be best served by knowing Java. If I had my wishes, I would do C# or Python, but those are in far less demand with Python being a trickle of opportunities. My current and last project even included mainframe with one converting mainframe batch jobs to Java Spring Batch.
Spring is an excellent technology: boring, dependable, never surprises, and you can upgrade for free new features with minimal breakage. That's exactly what I want when I have to deliver value with as predictable a pace as possible.
Java definitely requires modernisation, but main one lies not in the language itself, but rather in the ways and approaches we're using to create applications. Lightweight frameworks, reactive design, compile-time reflection, functional style, exception-less processing and much more - all these things will affect Java ecosystem far more than any new language feature.
Unfortunately, existing libs (including java standard library) and widely used frameworks rarely support this style of programming, so switching to it will be much harder and longer than adding some new feature to language itself.
Java will be still forced on us by those dinosaurs people who have industry experience of 20 years or so. They don't care about new changes in tech. They continue to put the govt and top 500 MNCs under java. And god, I would rather play with npm breaking all day than wasting my system resources trying to set things up with java. No thanks. Even in 2019 with 16GB RAM, Eclipse is slow on macbook and also on Windows 10 laptop. Give 100GB RAM and Java promises you to slow things down. Java is not dead. But please atleast put her in retirement home now.
Bad programs can be written in any language. And Java is not an exception. But it's also possible to write fast and efficient apps in Java.
So if your saw slow and bloated apps, it's not Java to blame. Usually behind such apps one can find two things:
Such combination can produce artefacts of unlimited size with infinite resource consumption.
But, again, Java has nothing to do with that. Same issue can be found in projects written in other languages.
Very well put!
Wow, I can sense a lot of frustration from your comment. I actually don't know where you are working or where your experiences comes from but it sounds pretty bad.
I can only speak from my experiences, but most Java developers I personally know are young, smart, motivated and care a lot about changes in tech.
So I think you should not blame Java for your bad experience.
Regarding the IDE's, you can use any IDE or even an editor to code. No one forces you to (And if someone does, it's probably bad leadership). IntelliJ and certainly also Eclipse are very powerful tools. That requires a lot of RAM. So if you don't need all those features, go and use vim, emacs, VSCode or whatever you like.
I would rather finish my job, deliver value to my clients and go home on time, thank you.
I may be a dinosaur, but I'm appalled by how you can be hacked because your dependency management system can execute code instead of just downloading it. The Java ecosystem solved the dependency problem 15 years ago, and it is much much harder to publish malicious code with it.
And if Eclipse is slow on your macbook with 16Gb... that's strange, because I used it for years on 3-to-5 yr old Pros and Airs with that and lower specs and never had a problem. You should probably invest on an SSD, it'll do wonders for your work. Now I have Win10 both at work and at home, and the difference between SSD (work) and magnetic (home) is abyssal, even if the CPU specs and the equipment age are very close.
Have fun with whatever stack you choose 😁
It comes round every few years or so, this or that language is dead. Some new language jumps ahead.
They said it ages ago about C, but it's still alive and kicking.
Given how much tech is written in Java, it'll be being maintained for decades to come.
Absolutely! The mere fact that many companies are still choosing to use Java as thier primary enterprise language in new projects, shows how much value is placed in Java. C# is close, particularly due to the advent of MS Dynamics and such like, but frameworks like Spring still give a huge amount of flexibility and power to the JVM.
It certainly will be interesting to see where Java goes in the Future, both as a language itself, and in the development of the JVM in competition with other Platforms.
Only a fool would assume that.
I already cashed my dollar for the n-th "Java is Dead" article. It's at least 15yrs that they give me a steady revenue flow 🤣
How can I join? 💰💰💰
It's fun how you get excited about upcoming (or not)features of Java which have been in C#, like, for years. And we're still coding in a language where comparing two same strings might result in false... and you have to use "add"or "subtract ( )" methods instead of operators. Java is dead on the inside, like a zombie
As I said, it's actually not a problem that other languages are ahead and try things out. That's certainly no reason to switch to a new language.
To your other points:
==
compares references so every Java developers knows after month or so to use.equals()
.But my article was not intended to convince you to use any other language. Use the tool you're happy with.
The recent 6-months release cycle is trying to reverse the trend that started in the early 2010. Java was far ahead of C# until 2011-2013 maybe, and then remained still for years waiting for 7 and 8 while C# was first reducing the distance, and the hopping forward in leaps and bounds. Now we're closing in again, and the JVM platform is already so competitive with the .Net one that choosing one or the other is a matter of available skills or choice.
The JVM is stronger than ever, and getting all the latest in innovation and research. Java is playing catch-up with both the internal (Scala, Kotlin) and external (C#, F#) competition, but its appeal as boring, dependable technology is far from gone.
Great summary 👍
I think Java is here to stay. The Java technology itself is a cool technology, especially the JVM. I never see anyone claim that Java is dead, but my experience might be different from you.
However, I think we should also learn another language. Learning other languages such as Kotlin, Clojure, Scala, Golang, Haskell, Elixir, etc. will open developers up to a new design pattern and paradigm. Programmers will understand that Java design patterns are not be-all-end-all best practices in programming.
I like modern Java. I annoyed by some Java developer try to enforce Java design pattern to other language and then complain about how the code is not clean. I annoyed by some people attitude around serious enterprise technology is holier-than-thou. Of course, that is not a Java fault at all. I just share where my frustration around Java come.
This is a great article, Jan, thanks for writing it! I have a piece coming out soon about updates to Java since Java 8 was released and I'm sure I'll refer to this post as I'm putting the finishing touches on it!
Thank you, looking forward to your article.
Great post, finally summarised stuff I talked about to a lot of people. Kotlin was supper good looking easy etc but it some problems in the beginning when I tried to integrate it with Spring. Of course now it's super fine with a lot of stuff but Java 11 then 13 happened so it was much easier to rewrite project to new Java rather than new language. Clean up a code with vars and there you go :D. Data classes and lombok didn't provide me much as my domain models usually don't have getters and setters and response/request classes are mostly written by Alt + Insert and choosing getters and setters in IntelliJ. And Scala was hard to learn because I had to learn also new frameworks and crazy stuff from Erlang like Actors (ok those are older but Erlang was famous for implementing them). So I postponed it and left it to learn later, in case I need more performance with large data. Meanwhile Java got faster with Rx and I'm still waiting for fibers to clean up the mess I made with --> some(this::linked).map(x -> calls(x,"anothervar")).toList().toMaybe().
I just still miss very much ?. and ?? from C#. Or Kotlin ones i think ?:. That's about it. I agree with a lot of people on Kotlin looks better but I still don't see that much benefit. And begin more functional does not solve every problem. Neither does immutability. If you have problems with state it might be framework or your code some times not mutability itself. Data classes from Kotlin gave me so much more code to write because I needed to let users enter wrong stuff and validate it to get correct error message to them rather then being unable to compile or hacking a way through getting good enough messages. I guess it's my code writing style that keeps me from new languages. I even considered learning Elixir because I like the syntax and it's great for real-time stuff but even it's developers admit that it's slow in some cases where data is big and slow to process. So I'll wait for loom :D
Sounds like a good plan to me 😊👍
Strongly typed languages are easier to understand and maintain. People can "play smart" by acting like they are too smart for java but in the end the money will follow the paradigm that works the best and is the easiest to maintain. Java is a lot like C and Pascal but helps you avoid mistakes that you can make in those languages. A coding language is simply a collection of types, if statements, and loops. Like the game of chess you can make complicated things our of simple components but the beauty of it is the simpleness at is root, and java is like that. Nodejs, on the other hand, is an overcomplicated mess with a learning curve that has no practical justification in bothering with. I love javascript for manipulating the DOM on the browser where it belongs, but I hate the API centric world of Agular and React that tell me "I'll write HTML for you". Writing HTML and doing DOM operations was so difficult right .... no it wasn't.
Thanks. This article is very good. Java is best and we love java