
Should I Learn Java in 2018 - fastbmk
https://www.e4developer.com/2018/06/09/should-i-learn-java-in-2018/
======
bloomthrowaway
> Concern 5: Java is too slow/consumes too much memory

It's sad that this is still a thing. Compared to more trendy languages like
Python and Javascript, Java is very light on memory. JS is known for being
fairly fast and "light", but its actually 5-10x slower than Java and uses
5-10X more memory. And the whole "lightness" of it is a lie. Javascript's run-
time is probably bigger and more complex than the JVM.

Java used to be painful, but there's a ton of tools that make it easy to use
if you know where to find them. Some, like Lombok, get rid of a majority of
the "cruft" by enhancing the language itself. Awesome Java is a treasure trove
of useful stuff. [https://github.com/akullpp/awesome-
java](https://github.com/akullpp/awesome-java)

The combination of speed, flexibility, and robustness can't be found anywhere
else, Although Go is slowly catching up.

~~~
base698
Hmm. Just checked memory use on some services we run on Go, Node, and Java.
I'm not part of the Java team but results:

Go: 40M Node: 64M Java: 4GB

Any Java service I've seen in production has similar numbers. Coupled with the
incredible startup time it's hard for me to see why you'd pick it in 2018.

~~~
fastbmk
JVM uses as much memory as you allow. Use `-Xmx39m` to beat Golang.

~~~
sheeshkebab
My guess is that it won’t work with less than 1GB bc of spring boot, hibernate
and all the rest of Java enterprise “microservice” goodness.

~~~
bloomthrowaway
IMO almost nobody is writing microservices with spring boot because its so
gigantic. Hibernate isn't bad on memory use on its own.

There's a raft of more sane choices these days like Play, Dropwizard, Vert.X
etc.. They all use far less resources. Spring Boot is huge because it has to
support a decade of obsolete junk, its far more than just a REST app
framework.

Checkout TechEmpower's framework benchmarks
[https://www.techempower.com/benchmarks/#section=data-r16&hw=...](https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=fortune&l=hr9lz3&d=9)

(I added filters to limit to Java+Go+JS+Python and limited DB to Postgres and
Mysql)

Java and Golang lead the pack, with JS a distant second and most Python
frameworks hanging out near the bottom

~~~
ardfie
>IMO almost nobody is writing microservices with spring boot because its so
gigantic.

I've encountered plenty of spring boot microservices in my work and, from what
I hear of other companies, it's not particularly rare.

Most of the time, if you have a team that's productive in Spring, a manager or
lead will be happy to spend some extra memory and get more features shipped.

------
levosmetalo
If you want a low stress good paid job, where you would be able to rush home
at 5pm, then yes.

If you are looking for excitement, learn $hype_of_the_year and join a startup,
but be ready to learn $hype_of_the_next_year soon.

~~~
jrs95
Oddly enough most of the startups around where I am at have been based on
Rails. Some people use Node as well. That’s about as $hype_of_the_year as it
gets here.

~~~
fastbmk
I think Rails/NodeJS are the most popular choices for startups everywhere in
the world. Both technologies are made for lean development.

~~~
inglor
Node.js is 9 years old and is also very stable with a large ecosystem. It's
far from "hype train" in 2018 and it's more the mature technology - though
it's still moving fast forward with new tools and paradigms it's very stable.

------
inglor
I never got the "Should I learn X" posts. The answer is yes to all the "Should
I learn X" questions so it's very hard to have a discussion.

Learning another language is _significantly_ easier than learning the first
one or two - not to the point of being a master but to the point of being
competent.

Should I learn OCaml? Yes, you learn from knowing a functional language and
Scala (combines functional and OOP well) and Clojure (a lisp) and C++
(resource management is important) and most of these languages.

Should you learn Node.js? Also yes - it is popular, most of the FE tools are
written with it - it's fun to use (subjectively) and it's popular and
reasonably fast.

Also Go, Rust, Swift and a bunch of other languages - languages are like
philosophies and knowing them helps you understand what you're actually doing
better often.

I never understood developers that only know 1-2 languages since it severely
limits how you _look_ at problems.

~~~
gaius
_Learning another language is _significantly_ easier than learning the first
one or two_

Learning the syntax, sure. But to be productive at a commercial level in any
language these days is about knowing your way around the ecosystem, libraries,
tooling etc, and that takes a significant investment of time, and the
knowledge is highly perishable.

3-4 languages is probably the most it’s reasonable to maintain and to claim as
an actual skill.

~~~
jghn
This is so overblown. We bring in folks regularly with no experience in our
language much less the ecosystem and invariably they’re totally productive in
a month or so

~~~
gaius
Sure, if you work at it full time you could be up to speed in a month, say 200
hours of work. That’s more than a casual investment of time if it’s on top of
a full time job as well.

And if you go away from it and come back in 6 months or a year you’ll have to
do it over again, some stuff you’ll forget if you don’t use and some stuff
will have moved on.

------
lmilcin
I have been developing backend systems in Java, professionally, for the past
15 years.

You should not base your career choice of being Java programmer or not solely
on Java's popularity.

There are genuine good reasons to learn niche technologies especially if you
like them more. I think if you genuinely like something you are much more
likely to succeed in that field and it is better for you no matter the size of
the field.

Choosing niche technology means you will have less options when changing jobs
but, remember, you only need one good offer.

Here's my thought about Java:

Java development is for a specific type of programmer that will most likely
work for large corporation and more often than not on some unsexy backend
system.

Java is uniquely suited to be language of choice for the enterprise for many
reasons which I will not go into right now.

These companies are currently extremely hungry for Java developers. This also
means you will not only have no problem finding a job, you should be able to
command good starting price compared to about anything else (except maybe
React).

Java is becoming better work environment, not worse, with every passing year.
It has excellent tooling (IntelliJ IDEA being in my mind best IDE in the world
except for Emacs with Slime). Excellent frameworks and support libraries
(Spring Framework + satellite frameworks). Excellent support and portability
(if you can install Java in particular major version it WILL work). Excellent
build systems (Gradle being my choice). And it is also quite efficient with
resources if you do it correctly and don't make bad choices -- JVM is actually
very fast and the only major drawback is startup speed and memory upkeep which
are not an issue for typical enterprise service.

Major drawbacks:

It is not particularly good language in itself, but that's what I get for
learning Lisp. It got a bit better recently (recently in this case is past few
years).

It is suited to particular types of projects which tend to be unsexy,
enterprise services. If you become Java developer you probably will not be
working on games, on exciting IoT projects, beautiful UIs, AI, and other
exotic stuff. You will be doing backend systems and hopefully be paid well.

Oh, and you will be working with a lot of people that barely can write a loop.
That's that. I said it...

~~~
gassiss
> Oh, and you will be working with a lot of people that barely can write a
> loop. That's that. I said it...

It's funny although it's true. I'm not a programmer, but that's the profile of
the Java developers that worked in my team. Sad, really...

~~~
lmilcin
I have worked for a number of companies, big and small, and this is recurring
thing.

If you are a person looking to get good salary by becoming programmer but you
are not really interested in programming, Java is most likely to be your
choice.

You will never advance, but that's fine. If you are bad enough you will just
change company and get your salary from another.

There is so much pressure to find Java developers that companies frequently
forgo any sane process to check whether the person is actually qualified to do
the job. With tools available like CoderPad and the likes there should
actually be no excuse to do this but I guess somebody high in HR would be very
unhappy seing how few actual Java developers they are able to hire after
applying it.

~~~
kookoopuffs
I don't know where you are from but most universities in the U.S. teach Java
or C++ as primary language. Pretty much everybody in our school used Java as
their interview language and due to the leetcode grinding culture, the
interviews are not definitely easy. The companies you talk about sound like
they suck.

~~~
lmilcin
It is easy to write that the company sucks, but the problem isn't that easy.

When you work as a manager for the company and you are presented with a new
project you can't say you will not do it. In many companies this will mean you
are expected to hire people and to get it out the door.

In most companies incentives are against "we will ACTUALLY only hire best
people".

------
towepluswater
Java or .NET are going to be prevalent in any mid-size or larger nascent
organization. There's absolutely no reason why you wouldn't at least embrace
it in your tool belt. It's proven technology. It may not be 'fun', but making
stable business systems last is the point here - not building fun tech for the
sake of building fun tech. (Wrong audience here, I know)

------
StreamBright
Kotlin or Clojure would be a bit more fun to learn, still be able to benefit
from running on the JVM.

~~~
levosmetalo
As much as I like Clojure (and Clojurescript) whenever I want to actually get
things done, I have to switch back to the simple Java jax.rs based backend and
either native Android, or ReactJS based web front end.

I am kinda sick of spending days fighting with half-backed tools that would
eventually give me a better and more productive workflow, just to get to the
"almost there with only a few missing things" and finally giving up.

That being said, I have a high hopes for Flutter for the front end mobile
development. From what I have seen from quick playing with it, it's as
friction-less as it can get.

------
hugh4life
One annoyance with Java(and Kotlin too) is that it's pretty much the only
language left that you really ought to use a specialized IDE with while pretty
much every other language(including C#) you can get adequate support in VS
Code or Emacs.

~~~
sydd
I think its the other way, there are only a few languages with as superb IDE
support as Java. AFAIK its just C++, Java and C#.

You can get shitty support with just syntax coloring for anything and anywhere
of course.

~~~
cm2187
Couldn't agree more. A powerful IDE with rich, intuitive, self-discoverable,
user friendly design tools, debugging and refactorisation is as important to
me than the language itself.

And I'd say a third thing that matters as much as IDE and syntax is the wealth
of libraries. Not just common things like consuming a rest API. But also
specialised things like dealing with spreadsheets, music, whatever your domain
cares about.

------
cik
There are plenty of reasons to learn a language - but Java in particular is a
great learning tool. Whilst I don't enjoy developing in it (or its
derivatives), I think that it's a great language to help people clearly
understand control structure and polymorphism.

To this day, my experience continues to be that students who had a CS degree
that included Java have significantly better fundamentals than those whose
programme didn't. Whilst that's purely anecdotal, I'll definitely continue to
skew this way until I see otherwise.

------
kebman
Yes, you want to learn Java in 2018. It's still a go-to language in many
corporations, though not super-glamorous. Even if you do not plan on taking on
any such job in the near future, it's good to know it - at least cursory.
Perhaps especially because it has similarities to languages like C# and
Objective C, which are also corporate heavy languages (thought the former more
than the latter). It might not be used in the next startup, but it's still one
of the most important get-a-job language to know.

------
beagle3
Author says Java was relatively new in 2007 although introduced in 1995... I’m
not sure what is meant.

Java is many things: the language? The vm? The ecosystem?

I keep hearing that Java is fast, and indeed hotspot is but every system I
encounter that’s written in Java is sluggish.

I keep hearing that Java lost its abstractwidgetfactoryfactoryfactory fetish,
and I think it’s improved in the last 15 years, but it’s still horrible.

My view:The language is meh; acceptable syntax, reasonable performance. The
ecosystem is bleh - only if you really love bureaucracy.

~~~
acdha
> I keep hearing that Java is fast, and indeed hotspot is but every system I
> encounter that’s written in Java is sluggish.

Counterpoint: ElasticSearch and Solr are excellent, reflecting many hard years
of work by the Lucene team. (I say that as someone who last wrote serious
amounts of Java in the 90s)

Java’s problems are cultural and the experience really depends on whether
you’re over in enterprise land with that insatiable complexity fetish or
somewhere else where people are serious about getting anything done. The big
risk to me these days is Oracle since they’re prone to milking their IP now at
the expense of its long-term future.

------
tomerbd
yeah, also in 2019 and 2020. it's only getting better and better. the
echosystem is amazing. I think you should focus on 3 languages:

1\. Java for stable heavy big projects with lot of develpers. 2\. Typescript
for frontend lifting. 3\. Python for machine learning and data analysis.

Master those 3 and general programming and system design concepts this is what
i'm working on.

~~~
frockington
That's exactly the three languages I use and for those exact reasons. I'll
sometimes throw in R for data analysis as I find the ease of importing/editing
poorly formatted excel (most business scenarios) to be the easier than python
(more of a personal preference than anything)

------
oh-kumudo
> Should I learn Java? This is a question that just keeps coming up.

Really? Java has a verbose but bland syntax, relatively fewer surprises, to
'learn' it, should be straightforward. I don't think this should pose as a
problem to average dev at all.

~~~
w0utert
Agree. Even if you don't plan to be an expert Java developer it is still
useful to learn it, and the effort should not be huge. Especially not for
someone with experience in other languages. It really isn't a difficult
language to learn up to a level of basic proficiency. It should not be more
than one or two weeks of effort to be able to create useful things if you know
what to look for.

The effort of learning new programming languages often seems to be hugely
over-estimated.

~~~
cm2187
But learning the syntax is only a small part of learning a language. Knowing
your libraries is a huge part of being productive. How do I do rest queries,
cryptography, filesystem manipulations, serialization, spreadsheet
manipulations, images manipulations, web frameworks, interaction with the OS,
multi-threading debugging, UI, etc. Outside of staying within an ecosystem
(JVM / .net), you need to rediscover all these from scratch, get bitten by all
the gotchas, etc.

------
bitwize
Yes, by all means learn Java. It's not as hip as Go or JavaScript, nor as
versatile as Lisp. Learn it because it's still a valuable utility language for
writing networked services (especially large ones) and it has HUGE library
support. Learn it for the hell of it. And don't be swayed by its reputation;
Java in 2018 is asymptotically approaching Kotlin (which you may also want to
learn, as long as you're on the JVM).

------
mabbo
It's the defacto standard language at Amazon. There's no specific requirement
that teams write code in Java and all the high level infrastructure makes no
presumptions, but there's great internal support for it.

And Amazon hired Gosling, so interpret that as you will.

~~~
Toenex
>...so interpret that as you will.

Probably 'just in time' as this a Java thread.

------
Tade0
Java - just like JavaScript has a lot of inertia which won't be going away
anytime soon.

Anecdata: my seven person college social circle consists of one front-end
dev(me), one systems dev working in C++ and Go, one all-around programming
handyman, one sort of dev-ops and three backend devs who work exclusively in
Java.

Large non-IT companies and their respective IT departments are first and
foremost interested in technologies that work and can be easily staffed. Java
fits the bill for now.

------
nojvek
Java itself is pretty fast and wonderful, at-least the modern versions. It’s
the libraries and the ecosystem. Java folks typically over engineered things
with layers and layers of abstraction in the name of “enterprise”.

Writing a web app in Django/express vs tomcat/jboss you’d feel the pain. It
would take forever to start, chew an insane amount of memory and nodejs runs
circles around it.

There aren’t that many things where Java is a great usecase. If you want
serious perf, then you’d go C/C++/rust. Perf with nicer abstractions would be
Go. Dynamic languages? Javascript and Python.

Yes Android uses Java heavily but even Google got sued left and right by
Google. Oracle simply gives Java a really bad rep.

Java is still heavily used by banks and enterprisy companies but I’d bet C#
has equal penetration. C# is just designed much nicer, it’s like java but a
great user experience and similar perf. With .NET being OS, i’d bet on C# to
have bright future. MS invests a lot more into it than Oracle into Java.

So to answer your question if you should learn Java. Absolutely go build a
simple Android app or a simple cli app. I wouldn’t count on it being the only
tool in the toolbox.

If you have limited time and you want to make a choice on what to learn. I’d
say Javascript and Python. Those are in good demand nowadays.

~~~
pjmlp
Sun would have sued Google as well, if they still had the money to do it.

Oracle is so bad, yet no other company was bothered to rescue Sun, not even
IBM which backpedaled on their proposal.

And mostly importantly, Google, after what they had done.

------
RickJWagner
Yes, by all means.

Then you can learn $FLAVOR_OF_THE_YEAR to get you exciting gigs while
maintaining proficiency in $OLD_FAITHFUL to keep you employed as you learn
$FLAVOR_OF_NEXT_YEAR.

------
recursinging
I just yesterday managed to compile a little utility program of mine in java
using openjdk 10 and then via
[https://github.com/moditect/moditect](https://github.com/moditect/moditect)
link together linux and windows binary packages which run on both platforms
without a JVM and weigh in at ~35mb. It impressed me that something like that
is now possible with Java.

------
vfc1
I think that its time that the enterprise switches to full stack Typescript as
a much better solution for developing enterprise software.

Why use two languages and two different ecosystems for the backend and for the
frontend, when we can use only one? It makes hiring a lot easier too.

Let's face it the Java ecosystem is stagnated and has lost a tremendous amount
of mindshare in the last 7 years.

The level of modularity that they are trying to achieve has been available in
Node since 2009, while all the language features that they are trying to
implement are already there in a Typescript in a much better form.

The Java ecosystem did not manage to produce a good frontend development
solution, and that was its downfall.

Things like JSF and later GWT did not deliver on the promise of abstracting
away the browser for non-frontend developers, and the result is that you have
to be both a frontend developer (HTML/CSS/Javascript ) and a Java developer in
order to build UIs in Java.

~~~
JustSomeNobody
> Why use two languages and two different ecosystems for the backend and for
> the frontend, when we can use only one?

Why use a hammer and a screwdriver when you could just use the hammer?

Do people really make blanket decisions like this for their projects instead
of properly evaluating what the project's actual needs are?

------
danohuiginn
IMO the enhancements of Java over the last few versions have been very well
chosen. I can't think of another language which has improved so much, and with
so little hassle to developers.

streams, type inference, lambda expressions, an official REPL: big changes,
which effectively targeted some of the biggest pain-points in earlier Java.

~~~
haglin
And more is coming:

Fibers, pattern matching, continuations, value types, low latency garbage
collector …

------
nishantvyas
Any fears of oracle stewardship?

[https://www.google.com/amp/s/www.infoworld.com/article/32841...](https://www.google.com/amp/s/www.infoworld.com/article/3284164/java/oracle-
now-requires-a-subscription-to-use-java-se.amp.html)

~~~
kodablah
Yes, but not there. Don't use Oracle Java. That article only applies to Oracle
Java. I personally would not recommend anyone relying any Oracle owned
software (e.g. even Graal) but have no problem recommending community owned
software like the JDK/JVM. Of course it's just a recommendation, sometimes we
don't always have a choice.

My concerns with Oracle stewardship is more about their business practices
concerning the trademark, (lack of) distribution of the TCK, treatment of
alternative impls, litigation concerning perceived misuse, installer software
bundling, etc.

------
wrinkl3
I was at the tail end of the Java-first code teaching approach - the Stanford
open courseware I was following in 2013 was largely built on top of Java.
Stanford switched those courses to Javascript a couple of years later.

Java has definite advantages over its scripting cousins when it comes to
learning the OOP paradigm, program patterns/anti-patterns and typing. You
can't really get away with not knowing any of it in Java (as opposed to
Python), but the language is still fairly newbie-friendly (as opposed to C++).
Additionally, Java 8 is a fairly decent introduction to functional programming
for people who've never worked with it before.

All that said, right now I wouldn't start a new codebase in Java unless I
really, really had to. Learn your fundamentals through Java, then get
comfortable in something else and code your projects in that instead.

------
jrs95
Java is old, and it may not be fashionable, but it’s still so widely used that
every other JVM language is just a drop in the bucket by comparison. It’s not
particularly difficult to learn either. Seems like it would be good for your
career even with all the warts the language and APIs have.

------
brianmcc
I wrote this in 2014 and think it's still reasonably relevant:
[https://mcconnellsoftware.github.io/java-golden-
handcuffs/](https://mcconnellsoftware.github.io/java-golden-handcuffs/)

------
boyter
I quite like modern java. With spark java, lambdas and all the helpful jars
it’s really not a bad language. Plus you get native lucene and almost every
other thing you could want is already written

In fact the only thing I wish for with it is fast syntax highlighter in Java
like pygments for python or chroma for Go. The pygments/jython implementation
is too slow and there is no the else mature out there.

It’s also useful to know career wise. It may not be the new hot thing but it’s
likely to be around 20 years from now and a little stability in languages and
tools is something to be thankful for.

------
kjgkjhfkjf
You should learn Java if you want to get a job programming in Java (e.g. a
very large proportion of programming jobs).

------
azmenak
Was hopping to see more mentions of Android development... I’m currently
weighing building an app in Kotlin or Java

~~~
kodablah
IMO to use Kotlin effectively you need to know Java, so to answer to the
article title for you is yes. But I would probably use Kotlin for the actual
development due to Android Java being versions behind and version
fragmentation.

------
Ornstein
Java has the best IDEs on earth. And the best tooling too.

------
varjag
To hell with Java. Learn it if you have to, but thankgod it's no longer
mandatory skill on the market.

------
mxschumacher
How reliable is the TIOBE index?

C having 7% year over year growth seems hard to believe.

JS is shrinking and smaller than Visual Basic.NET?

------
scruffyherder
Totally J++ is the wave of the future!

------
pooya13
What are the best (and least painful) resources to learn (modern) Java?

------
matteuan
if you learn Scala, you'll learn also Java as side effect

~~~
jxub
SBT is hellish though and the added complexity that Scala has imposes a lot of
cognitive overhead.

With Kotlin, you always end up writing cleaner Java and don't risk erring on
the side of unneeded entanglement in the spaghetti monster that Scala can
sometimes be.

~~~
eklavya
Before going multi module and needing special control on the build process and
having a LOT of code, what exactly hellish do you think someone and a beginner
at that will encounter? I have been writing it professionally for 5 years and
I find it ok.

~~~
dtech
SBT is a monster for beginners and experts alike. Haoyi (Ammonite creator)
wrote a pretty good article about it [1]

[1]:
[http://www.lihaoyi.com/post/SowhatswrongwithSBT.html](http://www.lihaoyi.com/post/SowhatswrongwithSBT.html)

------
gigatexal
Do it. There’s a ton of things you can learn just conceptually and a lot of
Amazon for example is built on it so there’s them for jobs and tons of other
enterprises that would employ you.

------
bnolsen
maybe consider cobol instead?

~~~
jxub
Well, you do have a point in that COBOL jobs are safe places where you don't
have a lot of need in staying up to date with the freshest tech, leaving more
time for other things in live than code, same as it goes for many JavaEE
shops.

However, lots of banks are rewriting their COBOL code in Java, so you might
end up writing some Java anyway.

------
sillysaurus3
Learn Kotlin! It's a lot of fun. And gradle is a nice build system.

~~~
ofrzeta
Historically, Gradle is a Java build system, isn't it?

------
merinowool
Unpopular opinion: Java is a Flash of the backend.

~~~
Uberphallus
Bashing Java is unpopular?

~~~
organsnyder
I can see how comparing server-side Java to Flash would be an unpopular
opinion (since it doesn't make any sense at all).

------
grandinj
<engage irony>

Not at all, you should learn a more macho language like C++, where you can
suffer, acquire scars, loose countless hours to weird template errors, learn
the intricacies of writing code that has to compile on different compilers
that don't agree on the syntax or semantics of the language, fight with crappy
tooling, use IDEs that barely manage to do auto-completion, encounter all
kinds of bizarre hardware and OS behaviour that the Java runtime shields you
from, resulting in code that doesn't compile or run anymore every 6 months
when part of your compiler or library toolchain changes, and acquire skills
that are largely useful only as bragging rights

~~~
dang
Please don't do programming language flamewars here.

