Live data from Hacker News

Java Turns 25 – Whats Next? [pdf]

oracle.com

161–170 of 286 posts

Re: Java Turns 25 – Whats Next? [pdf]

#161
post #54

Earlier quoted context omitted.

In my opinion, Java as a web language is good when you don't need to really understand what's happening (like in low-traffic situations). If concurrency isn't an issue, then the massive amount of libraries can help you a lot. In high-traffic environments, that ignorance punishes you. I've always felt Java and the JVM are of the mindset that you need a Ph.D. to even understand how it works or how to configure it, and…

I work on a lot of legacy systems in financial services, the biggest issues related to threads is variable scope regarding servlet design patterns. I just migrated a 18 year old app off Weblogic to TomEE and we had issues with struts tags. The main app I work on has around 350 concurrent users. I have JMX on all the time and monitor it for long running threads and tune it when needed. The problem I have with Java is…

Regarding the verbosity you would be better off with Kotlin

Re: Java Turns 25 – Whats Next? [pdf]

#163
post #69

One thing that is hurting Java today is memory usage. Conventional JVMs use a lot of memory relative to essentially everything else and this is drives up cloud bills. There are alternative JVMs and other tools, some of which is embryonic at this point, but what the world wants and what Java really needs to continue thriving is efficient memory use by the bog standard JVMs that work with everything.

The situation is improving https://openjdk.java.net/jeps/387

Re: Java Turns 25 – Whats Next? [pdf]

#164

Java might be the most successful programming language. It is a solid choice among many different fields. It is used on huge infrastructure projects (Apache Foundation), governments, big tech companies such as amazon, ibm, google, apple for many large scale services. It can do web, ml, GUIs, it's still strong among academics. On top of that it offers a great programming experience with excellent IDE support and it's…

And it gave us Minecraft of course

Not only that, but Java's reflection features opened the door for a huge, vibrant modding community that is arguably one of the largest among any PC game.

Very early in Minecraft's development, people were already decompiling/modifying/injecting their own mods, and a lot of frameworks (Bukkit, Spigot, etc.) emerged to provide a common API for modding.

The large modding community arguably had a very positive impact on Minecraft's early success -- Although I don't have any quantitative metrics to reinforce that point, I fondly remember early Minecraft as having a relatively technical community that tinkered with the game as a sandbox for countless custom experiences.

Re: Java Turns 25 – Whats Next? [pdf]

#165

Slightly tangential, but due to a new job I'll have bite the bullet and learn Java. When googling tutorials, I see the same material I found 12 years ago. A lot must have happened since then. What's a good resource to learn Java for somebody who already knows how to program? I'm interested in ecosystem, tooling, best practices, common pitfalls etc.

> A lot must have happened since then. Yes. As others have said, 'java is stable' which means the old stuff still works. Which in turn means that a lot of people are still using it and still writing blog posts about it. That still makes these old things often obsolete, or needlessly complex and just 'lesser than'. They don't support certain nice features or support them very badly, or have other significant downsides…

Baeldung has decently up-to-date tutorials.

Try kotlin instead of Java, and if you must use java, read the book Effective Java.

If you use kotlin, check out ktorm for db access, http4k for http api’s

Re: Java Turns 25 – Whats Next? [pdf]

#166
post #82

Earlier quoted context omitted.

I think it's the libraries. They're like Barbie - they have everything . You need, say, to store affine transforms in your SQL database? Java can bridge those very different worlds. (It literally has affine transforms in the library.)

> I think it's the libraries. [...] they have everything. On the other hand, they need to have everything. In many other languages, it's common to just use a library written in a different language. For some reason, the foreign function interface of Java seems to have been designed to be hard to use, so instead of using an already existing library, Java developers tend to go through the route of "Rewrite It In Java".

Also because libraries in other languages often have platform specific dependencies.

Re: Java Turns 25 – Whats Next? [pdf]

#167

Earlier quoted context omitted.

In my opinion, Java as a web language is good when you don't need to really understand what's happening (like in low-traffic situations). If concurrency isn't an issue, then the massive amount of libraries can help you a lot. In high-traffic environments, that ignorance punishes you. I've always felt Java and the JVM are of the mindset that you need a Ph.D. to even understand how it works or how to configure it, and…

There are a lot of points which I simply cannot agree with. 1) concurrency as an issue - you make it sound as if doing concurrent programming in Java is hard. Its not if you read through the documentation. In todays world of spinning up small servers, when done right, it scales to massive levels. 2) Blocking threads, memory contention etc. - i think you may be comparing against the likes of single thread programming…

Just try playing around with the other vm for a bit. It's just crazy easy.

Re: Java Turns 25 – Whats Next? [pdf]

#168

Java might be the most successful programming language. It is a solid choice among many different fields. It is used on huge infrastructure projects (Apache Foundation), governments, big tech companies such as amazon, ibm, google, apple for many large scale services. It can do web, ml, GUIs, it's still strong among academics. On top of that it offers a great programming experience with excellent IDE support and it's…

The main problem with Java is its concurrency model, which gives incentive to the creation of threads that fight for resources and introduce bugs. This seemed a wise choice in the 90s, but as concurrency has increased several-fold in the last 25 years, the model cannot scale to real software needs. It is the Java equivalent to pointers in C.

Akka streams and actor model make it better

Re: Java Turns 25 – Whats Next? [pdf]

#169

Earlier quoted context omitted.

It's funny you should mention that in response to a post talking about Erlang. :P Because, yes, there are few. The BEAM happens to be one that definitely beats the JVM on that front.

In which précise aspect does it outperform jvm tooling?

So monitoring and profiling are pretty similar in what sort of things they tell you, but the meaningfulness tends to feel higher due to the programming model. Here's a fairly recent blog post giving an example from someone trying the BEAM for the first time, coming from the JVM - https://medium.com/@mrjoelkemp/jvm-struggles-and-the-beam-4d...

But when it comes to remote debugging, and more specifically, a general "I want to understand what is happening in production", the ability to attach a REPL, alongside your tools, is amazing. I can insert a breakpoint, sure (if I for some reason built my production instance with debug info), but just as easily (without any debug info compiled in!), and more usefully, I can query actor state, mailboxes, etc, fire a message to a process to see what happens, etc...all the things you'd get with a REPL running locally in your dev environment, basically. Do stuff like query for internal state for a process, then call a function with it to see what happens to the data, all in isolation from the normal execution flow (since immutable data gives you a degree of safety to actually run that live code, with copies of the live data, and see what happens). I can even remotely load new code, if I want, effectively allowing me to deploy a hotfix without taking the node down. And I can do all of this in prod. All of this is, of course, super dangerous, but with great power etc etc.

Re: Java Turns 25 – Whats Next? [pdf]

#170
post #145
post #9

Earlier quoted context omitted.

Everything is OpenJDK now, forget oracle. AWS put out LTS JRE's etc. Try and get your employer to pay for a jetbrains IDE, IntelliJ IDEA. Use Maven for builds. It's simple-ish. Use Spring for frameworks. Everything's been done so you wont be first with any problems here. And all the stuff from 12 years ago is probably what people know and do, so it's still on point. No one does inheritance anymore composition's all t…

I find gradle nicer than maven, though it can be more complex. Does maven still have issues with snapshot builds and classpaths? I've managed to avoid Spring, everyone I know that's worked with it complains it's difficult to work with. For microservices I like simple, single-purpose pieces like sparkjava.

As a counterexample, springboot is the quickest thing to get start and yet allows you to do complex stuff. I for one, love it.
Post reply on HN