Live data from Hacker News

Love It or Hate It, Java Continues to Evolve

azul.com

31–40 of 156 posts

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

#31
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…

The additions and improvements are great but I think we're developing a kind of shared 'Modern X' fallacy. Modern Perl, Modern C++, Modern PHP, Modern Java, etc. The 'modern' facilities and the styles and efficiencies they enable are invariably terrific but you can't comfortably and effectively make use of them without having to know the bulk all the non-modern stuff. Which ends up limiting the appeal to the sorts of people who were prepared to put up with pre-modern to begin with.

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

#32
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, but they are obviously incredibly late to the game. Which makes you wonder how long until the other good things will take.

I see it all the time and I always found this sentiment incredibly bizarre. It seemed to presuppose that there is language ranking that is just a matter of feature check boxes, or that the introduction of a feature is some sort of admission that it should have been there all along. I hear it leveled at Go in particular but Java as well.

I can't speak for C++, but at least in terms of the Java-the-language most of us would rather see a language feature absent rather than done poorly.

It's not just a matter of borrowing from other languages. Each language's features have particular interactions with one another.

There are a thousand ways that Java's lambdas or var could have been introduced poorly. Go has shown that there's definitely an audience for more austerity in language design.

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

#33
post #12

Earlier quoted context omitted.

It’s not the language that is the problem. It’s more to do with just how many people use Java, and it being so ubiquitous results greater numbers of poor quality coders. Lesser known/adopted languages tend to be picked up by those who are already good at developing and designing.

Whilst I agree, it's language features are meant to reduce some of those issues. The rope you have to hang yourself with is a bit shorter than you have in other languages. At least in theory.

In practice, the language gives you enough rope if you don't think or care about design at all. This is a typical beginner's problem once they get past their first toy programs and try to write something useful.

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

#34
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…

Big fan of sparkjava for no-nonsense HTTP services. The days of tomcat-for-everything were not fun as someone who only occasionally dabbled in java back then.

So I have to build this as a special type of jar and then set up this other, rather opaque, set of stuff and deal with all sorts of nonsense ...

Now?

  get("/hello", (a,b) -> "Hello World");
And we're done...

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

#35
post #27

Java 8 made it an "okay" language for me to use. It's a lot better nowadays, but historically the biggest problem with Java has been the 3rd party libraries. They tended to be written with extensibility in mind at the expense of usability. Extensibility is great, but it's not the only important thing in a design. I'm not a huge fan of annotations. It makes the language feel a bit magical and hard to debug in some pla…

99% of the time I see DI used in Java it is solely to enable mocked dependencies in unit testing rather than injecting different production implementations depending on environmental differences or something like that.

I have had Code Reviews where "This is all good, but you should use Guice to mock X" where X is the one time I might have a package-private test only constructor with a NullObject for the one dependency I need to mock out in a commit and Guice is not currently used in the package at all.

Personally I think DI has reached cargo cult status in Javaland.

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

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

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

#37
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…

This is not the only reason.

Who started using Java way before Java 8, used to experience serious issues about memory usage and performances in the JVM.

These memories struggle to leave.

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

#38
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 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 pity those forced to work with old techniques

java modules broke a lot of software that were using sun classes or did classloading magic.

I was on one of such application, it's not a lot of effort to migrate forward, but many of the issues are runtime only so unless you have a good test suite, a strong incentive and no closed source library that use some such classes you can't really move forward with it.

anyway, in java 7 was already possible to write "unbloated" code, especially with the servlet 3.0+ spec, but spring and osgi have a lot of inertia in the enterprise community, meaning most people were stuck programming in xml, one of the most unpleasant experience ever.

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

#39
post #34
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…

Big fan of sparkjava for no-nonsense HTTP services. The days of tomcat-for-everything were not fun as someone who only occasionally dabbled in java back then. So I have to build this as a special type of jar and then set up this other, rather opaque, set of stuff and deal with all sorts of nonsense ... Now? get("/hello", (a,b) -> "Hello World"); And we're done...

That sure looks nice, but how often do you write services which return a single constant string? I like to judge languages/frameworks based on more representative snippets.

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

#40

My only problem with Java is how it’s written. Enterprise java tends to be abstracted to absurd levels. I prefer a more direct approach.

As a fan of Java I absolutely agree. Having worked with python and C codebases as well, I think every language has its own particular "degraded mess" version. A sublanguage of hacks built up over years of deadlines, inconsistent bugfixes and evolving paradigms.

One nice thing about Java (compared to C and python at least) is that you have quite a bit more tools to refactor and despegettify codebases incrementally.

Post reply on HN