Live data from Hacker News

Java Is Underhyped

jackson.sh

261–270 of 808 posts

Re: Java Is Underhyped

#261

For my use cases, Java has all the wrong compromises: - not high level enough to compete with Python/Ruby/JS/PHP, etc - not low level enough to compete with Rust/D/Nim/Zig - not specialized enough to compete with Erlang/R/Go/Julia - not opinionated enough to compete with Lisp/Haskell So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool…

Kotlin solves most of the problems for us while leveraging the benefits of the JVM.

Are there many companies seriously using Kotlin for large projects outside of the Android space?

Re: Java Is Underhyped

#262

Earlier quoted context omitted.

Well, it's true popularity in tech is not necessarily related to quality. Trending does have an impact. But by experience, having a killer feature, and a good adoption story usually does much more. E.G: - PHP: easy to make web page in 2001 - JS: monopoly on the client side web - Go: simple concurrency and binary production - Rust: borrow checker - Python: "yes, you can do that too. Also in 2 lines" Etc.

re Python: "...All actual work is done by C libraries though, you could just as easily use BASIC instead"

Well, believe it or not, VBA is doing to have to do with Python competition in Excel in a not so distant future:

https://excel.uservoice.com/forums/304921-excel-for-windows-...

Re: Java Is Underhyped

#263
post #43

Earlier quoted context omitted.

That's a great analogy, but I'm a bit confused about the later part, is it "you'll never be wanted for work as ..." or "you'll never want to work as ..."?

"You'll never want for X" means you'll never need X, you'll always have all of the X you could want.

I'm not good at English but shouldn't that be just "You'll never want X"?, "for" seems redundant to me.

Anyway I looked it up, seems it's a legit usage, my bad.

Re: Java Is Underhyped

#264
post #209
post #175

Earlier quoted context omitted.

The OP brought up performance reasons to choose language. :shrug: > I remember playing minecraft with friends, and the server was regularly crashing because it was out of memory, or something like that. I've seen this, but I don't think you can really use one server program running out of RAM as indicative of much. I do still find the pre-setting of max memory on the command line a little bit odd though.

Performance as an issue is massively overstated in high level languages. CPU intensive hot paths are rarer than people think, I/O performance is a bigger deal than people think and there's more hyper optimized code written in performant languages that you can call directly than most people realize. A lot of graduates think that compsci jobs involve optimizing algorithms or some shit coz they did that type of thing as…

It's true, that the situations in which you care about it are few. The most recent performance issue I've come up against is actually java's startup time, because for reasons unknown my client decided java AWS lambdas were the way to go, has quite a large, complex codebase built around it, and now has complaints about startup latency.

I have noticed some younger engineers on C++ projects doing some kooky things "because it's more optimal", and have taken time to explain to them that the micro-optimisations they're using impact readability, are going to be done by the compiler anyway if they're at all useful, and are likely to be several orders of magnitude less relevant than some lock somewhere, or a bit of IO, or whatever.

Re: Java Is Underhyped

#265

I remember when Java had the hype - Virtual Machine! WORA! Runs in your browser! Your microwave will have Java! That was around my 3rd year in CS at university. A few years passed and I got to program in Java in a commercial environment. It was J2EE 1.4. It was bloated, had a really heavyweight and crappy ORM (JavaBeans? Active Beans?). As a framework it sucked. Also it was boring business applications, the cool kids…

Early Java EE was astoundingly bad. It's vastly improved now (from EJB 3 onwards), but still not wonderful.

In one job, i used an enterprise framework that actually predated Java EE. Several ideas in EE were copied from it. But incredibly, this framework was substantially better than early EE. I believe, because that framework was built by people who actually needed to ship products to customers to pay their bills, which limited the amount of overcomplication and obstruction they could get away with. There was no such limit on Sun's architects.

Re: Java Is Underhyped

#266
post #136

Earlier quoted context omitted.

Python projects that start to grow has a tendency to become hard to manage in a way that I have not seen in Java at all. Java is like you say not the greatest at anything but it is also not the worst at anything. Its great for projects where the you don't know what you should optimize for or don't care. If java is to boring maybe kotlin is the way to go. I really like kotlin and in my personal experience the only dow…

I write software in Java. I can't stand python - too wishy-washy. But my main complaint about Python is trying to use someone else's software. Then it degenerates into a maze of twisty little passages of trying to install the correct set of dependencies, not knowing where those files are installed (which makes it difficult on a cluster, as you may need to do the install on every node separately). Then you try using p…

Python's packaging is a lot better with Poetry. Use Poetry and build the wheel with poetry build. The lockfile lets you create an exact virtual environment.

Like you mentioned, wheel files are not nearly as customizable as JARs. You can easily pick & choose the dependencies to include in JARs (fat JARs) and change namespaces of dependencies via shading to prevent collisions.

I've generally found it easier to add JARs to Spark clusters compared to attaching wheel files to PySpark clusters.

Re: Java Is Underhyped

#267
post #200

Earlier quoted context omitted.

The ecosystem is large and diverse. But you don't have to use everything! You don't have to use anything ! I make a point of starting all new projects with just the JDK, and taking that as far as possible before adding dependencies. A 40k LOC codebase i work on has these external dependencies (plus some company- and vendor-specific libraries, which we would need in any language): 1. Netty, for serving HTTP 2. Glassfi…

As a java n00b, thanks for listing the libraries. Do you know any other simple libraries which will be useful generally?

For http serving, I've always like SparkJava, just because its interface is very simple.

But it's not the only way.

Re: Java Is Underhyped

#268

For my use cases, Java has all the wrong compromises: - not high level enough to compete with Python/Ruby/JS/PHP, etc - not low level enough to compete with Rust/D/Nim/Zig - not specialized enough to compete with Erlang/R/Go/Julia - not opinionated enough to compete with Lisp/Haskell So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool…

I have the exact same criticism about Python.

Re: Java Is Underhyped

#269
Not sure how things are now, but I would rather use Ruby via JRuby and still benefit from most of the Java ecosystem but using the much more higher level abstractions of the Ruby lang.

Many years ago I discovered that I could use all the Java components just like that: https://speakerdeck.com/brutuscat/jruby-experiences

Re: Java Is Underhyped

#270
post #136

Earlier quoted context omitted.

Python projects that start to grow has a tendency to become hard to manage in a way that I have not seen in Java at all. Java is like you say not the greatest at anything but it is also not the worst at anything. Its great for projects where the you don't know what you should optimize for or don't care. If java is to boring maybe kotlin is the way to go. I really like kotlin and in my personal experience the only dow…

I write software in Java. I can't stand python - too wishy-washy. But my main complaint about Python is trying to use someone else's software. Then it degenerates into a maze of twisty little passages of trying to install the correct set of dependencies, not knowing where those files are installed (which makes it difficult on a cluster, as you may need to do the install on every node separately). Then you try using p…

Java is so much worse on this front.

> with Java, you just dump the necessary jars into a directory, include them in the classpath, and it works.

Ant, maven, or gradle, and then some jars, somewhere? What's the classpath and whats $JAVA_HOME for this project?

Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, sync the build system, sync the dependencies, configure runtimes and classpaths, try to rebuild for the 10th time, pray.

Post reply on HN