Ask HN: Is Java still worth learning? - watermel0n
======
patio11
Some context would help, since it depends on what you already know, what your
longer term goals are, and how you think learning Java will help you achieve
that.

Some reasons in favor of learning Java: it's an incredibly entrenched
technology in a wide variety of industries, and it will be running incredibly
valuable line of business code for long after both of us are dead. The
language itself is competent and C-style, and it handles memory management.
The JVM is a wonderful platform. The Java ecosystem interoperates with
_everything_ , has copious developers available no matter your region/price
point/industry/desired level of experience, and has a vibrant community which
has libraries available for whatever you'd want to do.

Reasons against: I'll spare everyone the "Good God man, it's _Java_." (Though,
having cut my teeth on it and used it professionally for most of my career,
they're not totally wrong.) Mostly, my concerns would be directed at "Is
learning a new programming language really the highest priority for you given
your particular goals?" Learning the syntax will only take you a few weeks
(assuming you've programmed before), but getting conversant with e.g. the J2EE
stack is a multi-year project, and there are _many_ things you could
accomplish in the same time which would be more intellectually
rewarding/credibly promise more career growth/etc.

~~~
a8da6b0c91d
> The JVM is a wonderful platform. The Java ecosystem interoperates with
> everything

I hear this over and over but it never strikes me as true. The best and most
widely used libraries and interfaces for a given problem always seem to be C++
or C. There's typically some slower and less comprehensive library for Java or
.Net.

~~~
w0utert
I also don't fully agree with the statement that Java (or other JVM based
languages) is the pinnacle of interoperability. Try interfacing between e.g.
Python and Java some time and you know what I mean. Besides JNI or some other
JVM based language, interfacing between Java and something else basically
means doing some form of IPC, which isn't fun.

~~~
memracom
If you do interoperability right, then you would use Apache Camel which
interoperates effortlessly with everything including Python. The right way to
interoperate between tools in different languages on different VMs, is to use
something like AMQP or ZeroMQ both of which are supported in Camel and in
Python.

Now if you don't want to use Camel and want to build a Big Ball of Mud, that
is your choice, but do not pretend that it is a best practice in the 21st
century. The standards for software engineering have moved on.

~~~
w0utert
>> _Now if you don 't want to use Camel and want to build a Big Ball of Mud,
that is your choice, but do not pretend that it is a best practice in the 21st
century. The standards for software engineering have moved on._

I don't even understand what you are saying here. Are you implying that if I
have a Python application and a Java library that solves some very specific
part of what the application does (say, applying some very complex algorithm
to a few numbers, or decode some arcane undocumented file format), that I
should use something that sells itself as:

 _Apache Camel ™ is a versatile open-source integration framework based on
known Enterprise Integration Patterns.

Camel empowers you to define routing and mediation rules in a variety of
domain-specific languages, including a Java-based Fluent API, Spring or
Blueprint XML Configuration files, and a Scala DSL. This means you get smart
completion of routing rules in your IDE, whether in a Java, Scala or XML
editor._

Because 'the standards of software engineering have moved on'?

Not everyone is building large-scale enterprise software running on clouds of
servers or whatever you have in mind. I can make up a million examples of
pieces of software that perform only one single one-shot task (like a command
line script) that may want to call out to some external library that
implements some part of what the script is supposed to solve, and for those
kind of applications, 'the standards of software engineering' should not have
to dictate I have to use message queues or a _versatile open-source
integration framework based on known Enterprise Integration Patterns_ ,
amirite? If that library I need to call is written in Java and I need to call
it from Python or some other non-JVM language (or even C/C++ because JNI is a
pain in the ass as well), I'm SOL :-S

------
kumarm
Absolutely Yes.

What Language today will open up opportunities to:

1\. Being able to program for No1 Mobile OS (Android)

2\. Being able to program for Enterprise application (Oracle Apps etc)

3\. Being able to develop web application with other server side application
with matured specs (JavaEE)

Any other so called "Hip" language at most will let you help find jobs in one
of those areas.

Yes Java is not what cool kids advocate but it what makes an good career.

~~~
kamaal
Nearly all of the areas you mentioned are massive commodity markets, where
individuals get hired on the basis of least pay they are ready to accept. Its
not a very comfortable position to be in. You age quickly, fall victim to age
related discrimination. While a fresher gets the job because he is ready to
work for a little less.

>>Yes Java is not what cool kids advocate but it what makes an good career.

Well Java is what cool kids in the late 90's were advocating. And C++ was
where the supposedly 'good career' was.

~~~
wikwocket
I'm willing to believe that mobile dev is treated as a commodity market, but
the other areas mentioned are essentially "desktop apps" and "web apps." I
don't think you can paint with so broad a brush that essentially all front-end
and back-end Java work is commodity.

Surely there are markets and companies where companies hire Java programmers
as replaceable cogs, and you shouldn't aim to work there. But there are many
many enterprises where quality Java engineers are hired, appreciated, and
well-compensated.

------
venomsnake
Yes - if you like money and job security - there is very strong demand for
java developers and a lot of code to be maintained. Java is entrenched in the
corporate world.

If you want to learn something from learning Java - not so much.

~~~
nhatty
but most company don't need a java this days

~~~
profquail
Some quick stats, according to IT Jobs Watch (a UK jobs website):

Python-related jobs make up 3.36% of permanent IT jobs in the UK.
([http://www.itjobswatch.co.uk/jobs/uk/python.do](http://www.itjobswatch.co.uk/jobs/uk/python.do))

Ruby-related jobs make up 3.54% of permanent IT jobs in the UK.
([http://www.itjobswatch.co.uk/jobs/uk/ruby.do](http://www.itjobswatch.co.uk/jobs/uk/ruby.do))

\---

Java-related jobs make up 14.38% of permanent IT jobs in the UK.
([http://www.itjobswatch.co.uk/jobs/uk/java.do](http://www.itjobswatch.co.uk/jobs/uk/java.do))

C#-related jobs make up 16.97% of permanent IT jobs in the UK.
([http://www.itjobswatch.co.uk/jobs/uk/csharp.do](http://www.itjobswatch.co.uk/jobs/uk/csharp.do))

You can't judge the popularity of a language from the stories you're used to
seeing on social news websites -- enterprise software, although it may be
mundane, employs a huge portion of the developers out there today, and many of
them are C# or Java developers.

~~~
csmuk
I wish people would promote this fact more.

Reality is well outside what the marketing would have you believe.

Also the reason people pick c#/java etc is simply due to it being a pretty
good stable standard for fungible staff with decent productivity output and
the ability to scale up really complex functionality pretty fast.

------
frostmatthew
Depends on your motivation, if you're looking to learn a language for the sake
of employability then yes Java is definitely worth learning.

On the other hand if you're interested in learning something that will make
you an overall better programmer it's best to learn something different than
what you're familiar with (most likely Java isn't _much_ different than what
you've used), e.g. learning C (if you haven't written lower level code) or a
functional language (if you've never used one) will grow you much more as a
developer than adding yet another generic object-oriented language to your
skillset.

------
nkishore
As Dave Thomas in his talk
[http://www.infoq.com/presentations/metaprogramming-
ruby](http://www.infoq.com/presentations/metaprogramming-ruby) says "Java is
for average programmers - a scissors with blunt knifes" If somebody wants to
learn now, its good to go after the future market which would be dominated by
mobile, apps on cloud. The programming trends is poised to be move towards a
mix of Functional + Object Oriented, Procedural. JVM will still be around, as
its battle tested but will be programmed by something else (Scala, Clojure
seems to be picking up). Golang/Dart will be a deadly combination as well.
HTML5 Mob Apps will pick up steam. We choose Scala, Golang, Ruby(scripting),
Ruby on Rails for our tech stack at [http://www.megam.co](http://www.megam.co)

~~~
danieldk
_If somebody wants to learn now, its good to go after the future market which
would be dominated by mobile, apps on cloud._

The (now) largest mobile platform uses Java as its main language for
applications. Lots of cloud services, including much of e.g. Google's, are
written in Java.

 _(Scala, Clojure seems to be picking up)_

We live in a bubble:

[http://www.google.com/trends/explore?q=java%2C+scala%2C+cloj...](http://www.google.com/trends/explore?q=java%2C+scala%2C+clojure#q=java%2C%20scala%2C%20clojure&cmpt=q)

The average programmer will never write Clojure. Maybe Scala, but only as a
Java with less boilerplate.

 _Golang /Dart will be a deadly combination as well_

This almost seems an enumeration of today's hypes ;). You know that Go (the
language) is practically a Java 1.0? What is so deadly about a Java 1.0-like
language with green threads (which have been around a long time) and CSP-like
channels (for which Java implementations were available). What's 'deadly'
about it?

I like cutting-edge languages such as Haskell. However, historically, it's
mostly boring languages with industry support that win. C was boring and it
had UNIX, C++ started out as C with objects and had Microsoft and many others,
Java was boring (a watered-down C++) and had Sun, IBM, Oracle, etc., and C#
was boring (a Java clone) and had Microsoft (arguably, it did adopt more
outside influences than Java ever did). Go will probably be popular as well,
it's an incredibly boring language (no one could claim it to be revolutionary
after Java or Erlang) and it has Google.

Note that I don't find the predicate 'boring' offensive. These languages are
well-understood (except maybe C++), are standardized, have large ecosystems,
have great tooling. The result is that they allow you to focus more on the
actual problem than reimplementing basic libraries or fighting tooling.

------
netforay
'Should I still be using Java?' is the question that almost ask myself once
every week. And till now my answer was 'Yes'. I have worked on many languages
including dynamic languages and compiled languages.

We are making heavy investment with our code every day, and I feel no other
language is close enough with 'Java' with ease of programming.

Dynamic Languages are great. But without help of IDE and easy way to debug,
there is no way we can use any great language. Language on itself is useless.
We need tools to be able to use it. If you are the master in programming, then
you can do great stuff with dynamic languages. But 99% of programmers out
there are not masters of programming.

C# is great with Visual Studio, but costly to use. Java have Eclipse which is
free.

We don't need code that is small, we need code that is bug free and easy to
understand.

~~~
solomatov
Java also has IntelliJ which is also free (community edition).

~~~
Zigurd
Android Studio, based on IntelliJ, is also free.

Maybe I've got Stockholm Syndrome but so far I have not found a compelling
reason to move from Eclipse. But if you like IntelliJ now there is an official
and free toolchain supported by Google (N.B.: in pre-release).

------
throwaway9848
Languages I think you should know:

C, Java, Bash, Javascript, one out of {Perl,Python,Ruby}, and perhaps a
functional language like Lisp or Clojure. Each one will make your
understanding of programming more comprehensive.

What Java offers is that it's actually a pretty idealistic language in its
approach to OOP, to the point that it irritates the hell out of most of us
with all the necessary boilerplate. Practically speaking, too, there are a lot
of Java jobs (and probably will be for a while) and it's not very idiomatic so
there's a lot of overlap w/ other languages, vs say, Prolog.

Also, by "know" I mean, have written a non-"hello world" application but not
necessarily having expertise in it.

~~~
meowface
I like the functional paradigm and enjoy writing functional code, but
personally, any time I look at Lisp or Clojure my eyes just completely glaze
over. I understand how powerful S-expressions can be (source code can be data
and vice versa), but reading them is a massive pain.

So, I've been learning Haskell and Scala instead. Is learning a Lisp-based
language a necessity to be a robust, professional developer, do you think?

~~~
throwaway9848
No, I just was suggesting learning about any functional language, those two
just came to mind first.

------
memracom
Do you think that Camel and SOLR and Scala are worth learning? If yes, then
learn some Java as well, but remember that the world of today is different
than the world when most Java books were written and most Java curriculums
were designed. In other words Java is NOT going to dominate the world, is NOT
even going to dominate the Enterprise, and not everything in the Java
ecosystem is going to last. But some parts are damn good, like Oracle's JVM,
3rd party commercial JVMs, Camel, Groovy, Scala, SOLR, Lucene, many of the
projects in the Apache foundation, Eclipse, IntelliJ, many or the projects
from Spring.IO, and so on.

It is probably not worth your while to become proficient with J2EE but some
bits of it like JDBC are still widely useful. If you do decide to tackly J2EE
be aware that you are walking the same path of the COBOL programmers of old,
and you will likely spend the rest of your professional life working with Java
J2EE enterprise stuff that suffers severely from the Big Ball of Mud and
various other antipatterns. I guess that someone has to do it, but I also
guess that most people on HN are like me, and are want to always learn new
platforms and apply the latest knowledge coming out of the computer science
academic world. We want to speed up innovation, and plain Java is not where it
is at.

------
arikrak
Java isn't as flexible (or hip) as Ruby or Python but it's still in huge
demand, and there are far more Java jobs than jobs in those languages. Here
are some reasons I listed for learning Java in my Java tutorial:

\- Are going to a college that teaches Java

\- Want to make Android Apps

\- Want to program for a large company, like IBM

\- Want strict rules to help prevent errors (at the cost of some flexibility)

[http://www.learneroo.com/courses/11/nodes/78](http://www.learneroo.com/courses/11/nodes/78)

------
darkchasma
As a base for a well rounded developer, I would say to pick C# or Java and
Ruby or Python, and C or Go. Learn javascript. Avoid PHP, even if you're
starving.

~~~
techaddict009
Why to avoid PHP ? I am earning working on freelance project all due to PHP.

~~~
meowface
This lists some of the reasons: [http://me.veekun.com/blog/2012/04/09/php-a-
fractal-of-bad-de...](http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-
bad-design/)

------
asmman1
Check out this Dr.Dobb's articles: [http://www.drdobbs.com/jvm/if-java-is-
dying-it-sure-looks-aw...](http://www.drdobbs.com/jvm/if-java-is-dying-it-
sure-looks-awfully-h/240162390) and
[http://www.drdobbs.com/jvm/1000-responses-to-java-is-not-
dyi...](http://www.drdobbs.com/jvm/1000-responses-to-java-is-not-
dying/240162680) it may help you.

~~~
huherto
Ah Dr Dobbs. I miss the days when I waited for the next number to read it back
to back including adds. Now we have so much information at our finger tips but
it becomes harder to be exited about it.

------
dcarmo
This is a question I keep asking myself, specially within the web development
enviroment. The company I'm currently working for wants to use Java for their
web service needs (I'm trying to push a RESTful approach, but I'm have 0
knowledge of how they could start that in the Java world). So I ask: is Java
worth learning for web development (scalability, lines of code, etc)? If not,
why?

~~~
danieldk
_The company I 'm currently working for wants to use Java for their web
service needs (I'm trying to push a RESTful approach, but I'm have 0 knowledge
of how they could start that in the Java world)._

There is a standard for that (as usual in Java :)) - JAX-RS:

[http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Servic...](http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services)

It's actually pretty ok, it requires relatively little ceremony. The most
popular implementations (Jersey and RestEasy) work well.

------
g42gregory
Absolutely, Yes. As somebody mentioned, the more languages you know, the
better you understand any of them. More specifically:

You need to know at least one of the fast, compiled languages. The choices
here are C++, Java or C#. Among these three, Java is by far more pleasant to
work with (personal opinion). C is not really an option, unless you need to do
networking, drivers, and work directly with hardware.

Please do not equate Java with J2EE or Applets! :-) J2EE sucks and Java rocks
(again personal opinion). Modern Java programming style is a lot less OOP-
rigid. We will have Closures and lambda functions in Java 8 in 2014. Here is a
good book with more modern views on Java programming model:
[http://www.amazon.com/Introduction-Programming-Java-
Interdis...](http://www.amazon.com/Introduction-Programming-Java-
Interdisciplinary-Approach/dp/0321498054/)

Here is what Java is actually good for:

\- Natural Language Processing and Machine Learning. Collections APIs (Thanks
to Joshua Block for designing them!) rock there. Yes, you could do the same
things in C/C++ but it's a lot more painful. And no, you can not do this in
Python, it's too slow.

\- Information Retrieval at a large scale.

\- Any large systems. Java has debugging capabilities like no other language I
know. Please don't use J2EE!

If you want to work for Google, you need to know C++. C++ is 20 - 30% faster
then Java and it matters at Google scale. But no one else has the Google scale
in the corporate world.

JavaScript is another "must to know" these days, especially Node.js and
AngularJS.

Python is the nicest interpreted languages I know. Really good for learning
data analysis, machine learning and natural language processing. Tons of good
libraries.

------
film42
Absolutely yes! Nobody here can tell you what is good and what sucks. Your
experience must not be based off a few HN comments. You must learn the facts,
and then draw conclusions.

Even if you're not into Java programming, a weekend or two with the language
will validate a few opinions and reject a few. I promise there's no better way
to learn.

------
sicxu
I have used many languages professionally and in my personal projects. Java is
the language that makes me most productive. Why? It has the best tooling
support. There are a few things that is extremely important for my
productivity: \- Precise autocomplete \- Jump from a name to its definition \-
Call hierarchy \- Code template \- Auto formatting \- Great unit test support
\- Stable and high quality debugger \- Hot swap \- Drop to frame during
debugging \- Remote debugging \- Profiling and heap analysis

Recently, I am working on both a very large C++ code base and similarly large
Java code base. In C++, I find myself routinely use logging and printf for
debugging, because switching to debug build and use a debugger is such a pain.
In Java, debugging is much easier. The feeling is like night and day.

------
kotakota
As many other people have said it depends on what you want to do. You should
choose a language for a project based on the project.

With that being said there are a lot of jobs available for programmers who
know java, c++, and .net. If you want to do desktop developement work i would
suggest being compitent in those languages but if you want to do web dev work
you should probably skip those languages for the time being and focus on
languages that are better suited for that domain.

------
mjhea0
yes, many older shops/businesses still use plenty of java in their stack. and
it does not make sense for them to change to a newer technology due to costs.
that said, i'd learn scala since it's so similar to java and really hot right
now.

with more and more new developers learning scripting languages, java
developers will continue to make more and more money. great language to learn
right now. it may not be sexy or hipster, but it pays.

------
dylam
Until I can write Android apps in something else, yes. :)

~~~
Avalaxy
Well, then you can unlearn Java right now!

[http://xamarin.com/](http://xamarin.com/)
[http://phonegap.com/](http://phonegap.com/)
[http://www.orubase.com/](http://www.orubase.com/) etc. etc. etc.

~~~
idoco
These frameworks are very limiting comparing to developing in Java. They might
be easier to use (I don't know about that) but you would find yourself
resorting to Java for the more complex stuff.

~~~
Avalaxy
Can you come up with one thing that you can't do with Xamarin (C#) that you
can do in Java (Android)? It's most certainly not 'very limited', I have no
idea where you got that information.

~~~
pjmlp
You have the Xamarin extra payload and need to have someone write .NET
bindings for the Android APIs.

But it is certainly a good way to write portable software across all mobile
platforms.

------
collyw
Depends what you want to do.

Java was my first language I learned in university back in 2000. At the timer
I thought it was amazing. Then I learned Perl and realised how boring Java was
and how much more expressive a language could be.

Now I use Python mainly, but looking around a jobs, the well paid senior
engineers are usually Java based jobs. Python is mainly academic, or web
development, and poorly paid as a result.

------
wikwocket
One other area Java is good to know right now is Big Data. Hadoop is spreading
like wildfire (whether due to genuine need or buzzwordism), and knowing Java
gives you access to most of the Hadoop stack. Presumably this will only
increase as more companies decide they need "Big Data" and as Hadoop becomes
more stable, popular, and accessible.

------
theboss
The best part of java is it's a good language where beginning programmers can
learn design patterns and program design. I like java for this because it has
single inheritance. Android is a good example of strict use of design patterns

If you want to be a startup guy then I wouldn't bother with java but if you
want to be a good programmer it can't hurt

------
Zigurd
The very easy answer is "Yes, if you want to write apps for Android."

The more interesting question is "If Java is that much less desirable than
other JVM languages, why hasn't Google enabled a complete, well-sorted
alternative and started using it in Android system programming?"

Android software development is vibrant and growing. It is shaping how and why
people learn Java. It has unique aspects like Android's modularity and IPC
systems that are shaping the way people design and code.

So, why are the alternative JVM languages still on the margins when it comes
to Android software development? Could it be that modern IDEs and Java work
together well enough to overcome Java's flaws as a language in isolation? Are
the cases where alternative JVM languages are compelling less relevant to
Android apps? Are Android's APIs and modularity enough to modernize Java?

Google is about to ship their second generation (third if you count adding a
JIT compiler) VM for Android without having addressed the language issue.
Maybe that's just a matter of prioritization and they have something in mind.
But, so far, Java has been Good Enough.

~~~
pjmlp
Having former Sun Java guys on Android's team counts as well.

------
arcticf0x
If we are looking at the future from this point on, then in a nutshell the
precise answer to this question would be NO. The only popular Java use I see
is on Android by google, that is going to change sooner or later.

------
mtdewcmu
Absolutely, if you want access to a large number of jobs. You also need it to
develop for Android.

------
umren
of course not! learn haskell! it will employ you easily.

~~~
csmuk
I hope that is sarcasm as I haven't ever seen a Haskell job in the EU.

~~~
justincormack
According to this there are around 100 advertised every 3 months in the UK
[http://www.itjobswatch.co.uk/jobs/uk/haskell.do](http://www.itjobswatch.co.uk/jobs/uk/haskell.do)
which is not a lot but non zero.

~~~
csmuk
That means there is Haskell in the keyword search but its not necessarily a
Haskell job. A lot of companies, mine included, have problems with agents
stuffing all sorts of shit in job ads just to get candidates to sign up.

~~~
justincormack
Haskell seems an unlikely word to stuff in. I can find a few in a quick search
(eg Jane Street who are well known for Haskell).

------
seymores
Yes.

