Live data from Hacker News

Should I Learn Java in 2018

e4developer.com

51–60 of 165 posts

Re: Should I Learn Java in 2018

#51

> 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 us…

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.

Re: Should I Learn Java in 2018

#52
post #22

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) an…

People who ask this question are implicitly asking:

"Given the difficulty/time requirements of learning something and the salary/technology trends of our industry, does it make sense to invest in the mastery of abstraction X?"

The time I have outside of my sprint is really limited, so getting expert guidance on whether knowing Rust will benefit me more than knowing Java is in fact extremely valuable to me.

Re: Should I Learn Java in 2018

#53

> 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 us…

> but its actually 5-10x slower than Java and uses 5-10X more memory

I am definitely against the "Java is slow" claims and think they are mostly rediculous but so is this claim.

Saying "uses 5-10x more memory and 5-10x slower" goes against every benchmark I've ever run and my understanding.

Mostly because JavaScript runs on several JITs (V8, JavaScriptCore, SpiderMonkey, Chakra) with different performance goals and characteristics and so does Java (which runs very differently with Art compared to HotSpot for example). Not to mention things like Graal :)

Slowness isn't a property of the language it's a property of the runtime. Usually performance is dominated by things like the speed of the packages used and standard library and not even the compiler.

There is no 5-10x factor _either way_ between JavaScript and Java VMs, not to mention you can run JavaScript on the Java VM anyway so that comparison doesn't hold in that regard either.

Re: Should I Learn Java in 2018

#54

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

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.

Re: Should I Learn Java in 2018

#56
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.

Re: Should I Learn Java in 2018

#57
post #19

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

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.

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.

Re: Should I Learn Java in 2018

#58
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.

Re: Should I Learn Java in 2018

#59
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.

Re: Should I Learn Java in 2018

#60
post #22

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) an…

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.

Post reply on HN