Live data from Hacker News

Should I Learn Java in 2018

e4developer.com

141–150 of 165 posts

Re: Should I Learn Java in 2018

#141
post #115

Earlier quoted context omitted.

> This is true to an extent, but look at the time and money poured into PHP and how slow it still is after all these years. PHP7 isn't a slow language at all - it's much faster than previous versions actually. There are servers like aerys [1] that easily handle 10,000 concurrent requests on reasonable hardware. The reason sapi (read "regular") PHP isn't "faster" is because caching and the ease of deploying more serve…

A lot of Javascript's optimizations are fragile, as in they don't always hold true, so there's overhead determining if the assumptions still apply. For instance, Javascript's hidden class optimizations are disabled as soon as someone "breaks" the assumption by doing something like accessing a variable using a dynamic array index rather than dot notation. Javascript runtimes also try to infer types as you say based on…

> For instance, Javascript's hidden class optimizations are disabled as soon as someone "breaks" the assumption by doing something like accessing a variable using a dynamic array index rather than dot notation.

This is definitely not true.

> For instance, if you use an assumed "int" in a string-like way the runtime re-assigns the tagged type. And it's hard to know whether you (or the library you're using) does so.

Also not true - if you assign an integer to a string the engine will still use optimized code - the caveat is different and in megamorphic functions - if your function can accept lots of types that's problematic.

> On most of those benchmarks the fastest JS framework is ~5X slower than the fastest Java framework.

All of those benchmarks are dependent on the underlying library and not the language at all.

> And yeah the array optimizations are related to what we both mentioned above, but again the optimization is not durable. It only works sometimes, and incurs its own overhead.

That's not really how a JIT works and Java is also a JITd language on some runtimes (and the same person wrote both JITs originally - Lars Bak). The overhead is constant and low for the optimizations. The Java JIT compiler does a ton of such assumptions and bailouts as well to elide creating and allocating objects.

Re: Should I Learn Java in 2018

#142
post #27

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.

> If you want a low stress good paid job, where you would be able to rush home at 5pm, then yes. Those aren't exclusive, you can do something exciting, join a startup, learn $hype_of_the_year and still work for a place that understands that burning out employees is stupid. It's perfectly reasonable to work for a place that is both exciting and doesn't make you sacrifice your personal life because they acknowledge tha…

You're right. I wish more startup CEOs agreed with you.

Re: Should I Learn Java in 2018

#143

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

Please don't do programming language flamewars here.

Re: Should I Learn Java in 2018

#144
post #79

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…

That’s why I stopped programming in Java as a CS student. I actually really liked the language and the direction it’s going in but looking at the environment of most Java jobs, I thought it was probably not for me.

I went to Github’s trending page for a bunch of different languages and after looking at the projects there, I decided to fully invest myself into C++ instead because I felt like that’s where the most interesting projects were. Maybe a bad way to decide your career path idk

Re: Should I Learn Java in 2018

#145
post #140
post #60

Earlier quoted context omitted.

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…

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

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.

Re: Should I Learn Java in 2018

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

Re: Should I Learn Java in 2018

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

Re: Should I Learn Java in 2018

#148
post #111

Earlier quoted context omitted.

Other benchmarks from the same group do show the memory usage and both node and Java are quite bad, as expected. Node is spectacularly bad at some, using 1.8 GB vs Java's 384M or C++'s 155M for example.

Java's usage will never compare to compiled languages without GC because it has to cache a bunch of code in RAM and the garbage builds up between collection cycles. It's pretty bad compared to something like C for sure :)

Depends how well they end up implementing value types.

System programing languages int the 90's with GC faired pretty well in this area.

Naturally they had much more control over GC, how value types were handled and manually allocation on unsafe modules.

Re: Should I Learn Java in 2018

#149

Earlier quoted context omitted.

There's an argument to be made that Java positions are the easiest to fill with lower waged visa or offshore workers, meaning that you have to maintain an extremely high proficiency, move into management, or be under constant threat that your job will be outsourced.

I think it might be the other way round these days. Java programmers are outsourced because they're so expensive. Javascript seems like the best target now for low-skill outsourcing. Much lower barrier to entry, and arguably a much more forgiving language

I think you're right when it comes to the lower tier of JS developers, but IMHO there are a lot less middle tier devs per-capita in JS than Java. Proficient fullstack JS is a very in-demand skillset right now, and if you're an expert you can find a new, high paying job, in just about any mid-tier tech town in 48 hours.

Re: Should I Learn Java in 2018

#150

Earlier quoted context omitted.

Ok, but I'm worried about the garbage collector, and if it can run concurrently without interrupting the program (as a native JVM would do it).

It should be able to... Hopefully Go and Java will be some of the first GC languages to target WASM, and we'll find out :) . Personally I'm more worried about the size of the GC getting added to the binaries than how fast it is.

AssemblyScript already does it, if I am not mistaken.
Post reply on HN