Live data from Hacker News

Java Is Underhyped

jackson.sh

491–500 of 808 posts

Re: Java Is Underhyped

#491

Earlier quoted context omitted.

Nobody has started a project with Ant in the last decade. Of all the Java projects on Github Ant is probably not even 1%. > Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, You click "Project from existing sources" in IntellIJ and it will recognize both Maven and Gradle projects and just work? Sync the dependencies? configure runtimes and classpaths? What? With Maven and Gr…

I'm talking about a maven project I have to use sometimes at work. Let me walk you through all the shit I had to do: - Install and set the right java version system-wide - Copy some config files for the project system-wide (granted, this is not java specific, but still) - Click in some IDE menu to enable some build settings - Click in some IDE menu to install some "Lombok" plugin - Click in some IDE menu to select th…

I've interacted to a ton of Java projects. And with a ton of various other commercial and Open Source projects.

In my experience (sample size of hundreds of projects), Maven projects are >, on average, easier to build and manage than most other languages. The repo structure is standardized, the build cycle is standardized, the built packages are always in the same place, etc.

The Java installation is a 1-time think. It's also a quick google away. I see this complaint a lot, I never understand it. It's plain and simple bikeshedding: someone complaining about a 1-time task that takes 5 minutes in total.

The rest of the stuff is IDE specific and I have no idea why you'd have to configure "getting the actual logs"?

Re: Java Is Underhyped

#492
Java is a good language for many use cases. What are the alternatives when I'm looking for a language that is at least as fast, statically-typed, garbage-collected, multi-platform, has good IDE support and similar amount of libraries? There are not many.

There's Kotlin (better than Java but not by a big margin), Typescript, anything else?

Re: Java Is Underhyped

#493
post #345

Earlier quoted context omitted.

Nobody has started a project with Ant in the last decade. Of all the Java projects on Github Ant is probably not even 1%. > Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, You click "Project from existing sources" in IntellIJ and it will recognize both Maven and Gradle projects and just work? Sync the dependencies? configure runtimes and classpaths? What? With Maven and Gr…

Guess I'm nobody. I created a simple Swing (desktop) app in Java a couple of weeks ago. The process was something like: Create new Java project in IDE Add no dependencies Use the built in IDE tooling to create a runnable JAR and tick the box to export the Ant build to a build.xml file. Why would I want to complicate things by adding Maven/Gradle to the mix?

And what if you want/need to add dependencies? A lot of them.

Re: Java Is Underhyped

#494
post #408
post #190

I think the author is still forming their opinion on those languages. Several of their points sound wrong. "Dependency heavy workloads and industry trends" The author complains about JS having small packages about trivial things (and for some reason when people talk about this they always mention lpad, apparently lpad is the only small package in NPM /s). And about the fact Java has a type system. Many languages have…

> Interfaces in TS are structural, but classes are nominal. Typeguards can be either. Is this true? I might be missing something, but this snippet to me suggests otherwise[0]. [0]: https://www.typescriptlang.org/play?#code/MYGwhgzhAECyCeBhcV...

Sorry, you're right. I was thinking about "instanceof" which is a native JS feature, and it matches classes nominally.

Re: Java Is Underhyped

#495
post #345

Earlier quoted context omitted.

Nobody has started a project with Ant in the last decade. Of all the Java projects on Github Ant is probably not even 1%. > Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, You click "Project from existing sources" in IntellIJ and it will recognize both Maven and Gradle projects and just work? Sync the dependencies? configure runtimes and classpaths? What? With Maven and Gr…

Guess I'm nobody. I created a simple Swing (desktop) app in Java a couple of weeks ago. The process was something like: Create new Java project in IDE Add no dependencies Use the built in IDE tooling to create a runnable JAR and tick the box to export the Ant build to a build.xml file. Why would I want to complicate things by adding Maven/Gradle to the mix?

The complexity of maven is well understood and battle tested. The complexity of a custom build is not. In my opinion it is of a far more concerning sort of complexity.

Re: Java Is Underhyped

#496

Earlier quoted context omitted.

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

What's the state of server-side Kotlin now, is it usable and what kind of JVM are cloud hosts running it on? Kotlin seems like one of the best languages out there.

We're using Kotlin with Spring at the moment and everyone on the team prefers it over Java. I suggested Kotlin when they laughed at my suggestion of using Clojure. Ah well.

Re: Java Is Underhyped

#497
post #120

Earlier quoted context omitted.

You just install any JDK in any directory - nothing to configure there - and then point IntelliJ to this directory... If this is hard, then... hmmm....

Acting like Java tooling isn't more difficult than other languages is dishonest. Starting with a Java project is considerably more complex than with most other languages. "Missing manifest" or issues with classpaths are not intuitive.

Building a standard maven or gradle project is substantially easier than most other languages, in my experience.

I don't have to setup a $GOPATH, downloading dependencies doesn't kick off a million scripts that end up running native compilers, like in the node/ruby/python/php ecosystem. I can build and run a Java project on almost any system, without making substantial changes to my environment and without giving up and using docker for my dev environment.

Re: Java Is Underhyped

#498

Earlier quoted context omitted.

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

Huh, as a consultant having touched many java code bases, they are all basically the same. Import the maven pom into intellij and run the main class. The folder structure, the code conventions etc are basically the same at every client and every project I've ever seen in java. All needed is having the correct version of Java, and maybe give maven a password so it can access private libraries. It's dead simple. And mo…

Yeah, people under-estimate badly how useful the Maven conventions are, because they've never seen them in the C/Python/whatever world.

I haven't used Maven in a bunch of years.

But source code goes in src/main/java. Test code goes in src/test/java, resources (images, files, whatever) go in src/main/resources, test resources go in src/test/resources. There is a pom.xml file that contains dependencies, and if it doesn't, it points to a parent which > contain them.

There might be submodules and they all are folders containing another pom.xml. That pom.xml generally points to the main pom.xml.

Etc. There's a bit of tedium in there, but >!

The level of consistency is something most ecosystems dream about.

And you know what? That means that you can use your spare brain cells for actual creativity or hard work.

Re: Java Is Underhyped

#499
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 used Kotlin in a large codebase, and one of my only complaints is the compile times. We use Gradle for our build system, and relative to Java it is slooowwww. But we like the other benefits of Kotlin, so it's worth it in the end. But if they could get compile times down, it'd be the perfect language imo.

How large is the codebase? I moved to kotlin from scala and find the compilation to be rapid in comparison.

Fwiw, I’m normally on a beefy desktop so I might just be brute forcing this issue.

Re: Java Is Underhyped

#500

Earlier quoted context omitted.

I can (and often do) build from CLI, that is much smoother. I tried using vim on java, but honestly you need an IDE for all the constant code generation and incessant fixups by mouseclicks that are needed. Vim+coc is more than enough in the other languages that I use.

You're living in a parallel universe from the rest of us. IDE isn't necessary (and positively odd) for building Java.

You do need to be able to build from IDE when you set breakpoints to debug.
Post reply on HN