Live data from Hacker News

Love It or Hate It, Java Continues to Evolve

azul.com

61–70 of 156 posts

Re: Love It or Hate It, Java Continues to Evolve

#61

Earlier quoted context omitted.

I may work with java soon, so I was reading about Spring and it was yet again a dive into insane amount of verbose over engineering that I ran away from years ago. It's true that post 8 Java becomes palatable. And someone on reddit just showed me this piece of stats: https://www.jetbrains.com/lp/devecosystem-2019/java/ 83% on java 8, java 11 nicely going up I pity those forced to work with old techniques

I write quite a lot of Java, and I have to admit I never “got” Spring. I’d much rather have explicit boilerplate code (preferably in library form as much as possible) than complex, invisible magic. The latter is “easy”, but the former is “simple”. In most cases, “simple” is more important.

If only we could all agree on what "simple" means - a lot of "enterprise" code I've seen would sweep vast amounts of complexity into hard to spot places to that you could have a small thing that people could point at and say how simple the one visible bit was, ignoring the vast amount of complexity lurking under the surface somewhere and invoked by more or less magical means.

Re: Love It or Hate It, Java Continues to Evolve

#62
post #3

Why are the links larger than the body text on mobile? It’s so annoying trying to read this whole article. Especially when one of the links is pushing their commercial support of Java. Good design and java rarely go hand in hand. These small details matter. I don’t think it’s a mistake that Ruby, JS, Rust, Elixir, etc attract people with good design sensibilities which is reflected in their blog posts, websites, and…

> Java got things like Lambdas and other modern stuff in recent years is great

These feel incredibly bolted on. Instead of a utilitarian, if verbose, lowest common denominator type of language, Java is becoming a Frankenstein monster. And a verbose one at that.

Re: Love It or Hate It, Java Continues to Evolve

#63
post #23

Earlier quoted context omitted.

> Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. I wrote a lot of Java, but it was a long time ago. Could you share a bit of code representative of the modern Java 11 style you mentioned (var keyword, lambdas, streams, etc.)?

Not the guy that you were asking but Trivial example: public static void assertIsSuperset(Collection superSet, Collection actualSet) { final List missing; missing = actualSet.stream().filter(x -> !superSet.contains(x)).collect(Collectors.toList()); if (missing.size() != 0) { /* Imagine some more verbose exception creation here, which is why we caught it in a list*/ } } The lambda is in the creation of 'missing': filt…

Thanks! I guess your example could be simplified further with the var keyword:

  public static void assertIsSuperset(Collection superSet, Collection actualSet) {
    var missing = actualSet.stream().filter(x -> !superSet.contains(x)).collect(Collectors.toList());
    if (missing.size() != 0) {
     /* Imagine some more verbose exception creation here, which is why we caught it in a list*/
    }
  }

Re: Love It or Hate It, Java Continues to Evolve

#64

Earlier quoted context omitted.

I may work with java soon, so I was reading about Spring and it was yet again a dive into insane amount of verbose over engineering that I ran away from years ago. It's true that post 8 Java becomes palatable. And someone on reddit just showed me this piece of stats: https://www.jetbrains.com/lp/devecosystem-2019/java/ 83% on java 8, java 11 nicely going up I pity those forced to work with old techniques

I write quite a lot of Java, and I have to admit I never “got” Spring. I’d much rather have explicit boilerplate code (preferably in library form as much as possible) than complex, invisible magic. The latter is “easy”, but the former is “simple”. In most cases, “simple” is more important.

I'd say there is no upside for the complex invisible magic. Half the time you have to run the application and pray that the configuration beans you've placed are working and if not, you are pretty much in trouble. Perhaps you missed a step in adding a configuration decorator in your application or configuration class, or used some deprecated method or used some incorrect class in the class hierarchy for the bean you want to return.

Re: Love It or Hate It, Java Continues to Evolve

#65
post #17

In my experience most people don't like Java due to experiences they had before Java 8. This means they were used to the bloat, config as XML style world which made Java a pain to write and slow to run. Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. Then you throw in frameworks like javalin or sparkjava and suddenly they are not as hostile a…

I can’t recommend sparkjava enough. It is the only Java web framework I’ve encountered whose “quick start guide” is actually that: a guide that gets you started in minutes, not days. The fully working “Hello world” app is 5 lines of code.

I built my profitable, bootstrapped B2B SaaS using sparkjava.

You can find sparkjava here: http://sparkjava.com/

Re: Love It or Hate It, Java Continues to Evolve

#66
"James Gosling, the Father of Java, described it as a Blue collar programming language."

I wonder what can be considered a white collar programming language which is actually used a lot. Erlang? ES6 with ever changing front end frameworks?

Re: Love It or Hate It, Java Continues to Evolve

#67
There has been about a 7 year window of opportunity for Oracle to really push JavaFX as cross platform UI, but they insisted on making it hard to legally use even for desperate Java Swing developer. Almost every Java Swing shop I know is either still on Swing, switched to .NET or switched to web shit.

Why, why, why did they not make JavaFX on Android a first class citizen?

Re: Love It or Hate It, Java Continues to Evolve

#68
post #67

There has been about a 7 year window of opportunity for Oracle to really push JavaFX as cross platform UI, but they insisted on making it hard to legally use even for desperate Java Swing developer. Almost every Java Swing shop I know is either still on Swing, switched to .NET or switched to web shit. Why, why, why did they not make JavaFX on Android a first class citizen?

You have to ask Google why, not Oracle.

Oracle has made JavaFX open source and available to everyone that wishes to work on it.

https://openjfx.io/

https://openjdk.java.net/projects/openjfx/

https://gluonhq.com/products/mobile/javafxports/

Naturally Google prefers to push Android J++.

Re: Love It or Hate It, Java Continues to Evolve

#69
post #17

In my experience most people don't like Java due to experiences they had before Java 8. This means they were used to the bloat, config as XML style world which made Java a pain to write and slow to run. Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. Then you throw in frameworks like javalin or sparkjava and suddenly they are not as hostile a…

RE native runtime compilation: have you had a look at GraalVM's native image: https://www.graalvm.org/docs/reference-manual/aot-compilatio...

Re: Love It or Hate It, Java Continues to Evolve

#70
post #17

In my experience most people don't like Java due to experiences they had before Java 8. This means they were used to the bloat, config as XML style world which made Java a pain to write and slow to run. Once I show them Java 11 with var keyword, lambda's and streams they start appreciating how modern the language has become. Then you throw in frameworks like javalin or sparkjava and suddenly they are not as hostile a…

check out what 'auto' does from C++11 onwards then, oh and smart pointers too: memory management is no hell anymore
Post reply on HN