Ask HN: Is Java still worth learning/relevant?
I know it's still around for the last 20 years, so that's saying something.
Do you enjoy programming with Java? Or is it too slow and verbose?
Do you enjoy programming with Java? Or is it too slow and verbose?
29 comments
[ 4.3 ms ] story [ 64.2 ms ] threadMicrosoft made their own Java and got sued by Sun, so they made Visual C# and the Dotnet languages to compete with Java.
As you would guess, there is quite a bit of difference.
Appreciate the feedback.
http://www.bluej.org/
When I started learning Java in 1995 I used Windows Notepad because there was nothing else I could find. There was no Hacker News to get good advice from, and paper based Java book to read from instead of free ebooks on the Internet and Github repositories for example code. Sometimes I had to pay money to get a floppy disk postal mailed to me with example code on it.
Java can be a little clunky, but once you learn Java you can pretty easily learn the basics of C#, for instance.
It is the other way round: C# is very similar to Java.
It is a bit verbose but I'm ok with it. I know its fashionable to hate on it but I find it a comfortable language to work in. So, yes it's still very relevant in business and is worth learning.
Did you have a look into Java 8 features? The Lambda notation brings nice functional features to java and is also able to remove a lot of boilerplate code. Streams help to make threading easier to handle. Its worth an in depths look.
If you want to enjoy your job, or your hobby, choose a better language.
I'd suggest Clojure or Haskell. But where I live at least it is a fight to get to do paid work in those languages, but a fight that is worth it.
Hard to explain why Haskell is better than Java in a little comment. I say learn some Haskell and Java and discover for yourself what you prefer.
Any MS shop could consider F# and Java shop could consider Scala/Clojure as in each case it compiles down to compatible ones and zeros.
Or it could be a case of get a .NET/Java job at an open-minded enough company.
One of my arguments to introduce F# (when I am ready to) is that F# is now (a probably better version of) what C# is going to be in 5-10 years time, so lets get ahead of the curve.
Learning Java to a comfortable degree will most likely expose you to the JVM and its inner workings, which is really a good piece of engineering.
As for Java being "too slow", for what?
I also will need to code a native mobile app and Java is the language of choice for Android.
Is COBOL/DB2 outdated? Probably, but not sufficiently so to mean companies have moved their infrastructure away from it. There are good jobs to be found in mainframe land, many, and in great demand with great reward.
Java is probably not COBOL in audience, but it is engrained in a lot of enterprises, or as another commenter mentioned, even Android. It is here to stay.
Some of the advantages of Java are that even mediocre programmers can be productive in it, and it scales very well to even ridiculously large, complex projects. Of course those can also be considered disadvantages from certain viewpoints, but from the viewpoint of large companies (and therefore job opportunities), they are definitely big advantages.
Personally, I'm convinced that Java is the Cobol of the future.
On the bright side, if that's what you're using Java for, you might not mind it so much. Academic-leaning data structures and algorithms problems don't require the heavy frameworks that got Java a bad reputation[1], nor do they deal with programming cultures that prefer method names that read like the first 5 chapter titles of the GOF design patterns book. If you need to write code to find a cycle in a linked list, or find the sub matrix with the largest sum, or find a sub tree in a BST, I don't think you'll find Java particularly onerous.
[1] I've heard things have improved considerably, and that Java frameworks are now much lighter than they were in the early days of spring, struts, and hibernate.
A company will assume if you graduated in CompSci in the last decade or so that you have used Java fairly extensively.
Java is fast to run, and pretty fast to develop in due to static typing and when using an IDE although there might be some additional boilerplate code. I enjoy using it and there are plenty of Java options if you want a more RAD style of development like Rails e.g. Spring Data/Batch, Play, Grails etc.