Live data from Hacker News

Java Is Underhyped

jackson.sh

601–610 of 808 posts

Re: Java Is Underhyped

#601
I was surprised that java was missing from CS curriculums at University of Colorado Boulder. Roughly 20ish years ago we moved the data structures class to java at the university I worked at.

There were a lot of complications(students hadn't learned java previously), and it took some understanding of what the JVM was doing, vs c/c++ where pointers made it very clear what was happening. This was also in very early days of java, just at the beginning of JIT and hotspot.

Re: Java Is Underhyped

#602
post #93
post #80

Earlier quoted context omitted.

I agree with you. Actually, Java has great tooling, JVM is very nice, it has great potential for high performance code generation. It has everything for debugging. But at the end of the day, language is driving people to write bloated software. I just wonder, how come e.g Linux kernel code 100 times more readable than any project in Java? More importantly, how did we come to this point that we accept bloated/unreadab…

Java won by its portable deployment model, stack traces, GC, libraries and security sandbox safety. In over two decades, very few other platforms have come close to its promises. C# is perhaps much better, but has stronger proprietary ties and vendor lock-in. Java became overcomplicated by frameworks and design patterns, so has always felt bloated and slow. But has worked best for business logic. Though is maybe behi…

> C# is perhaps much better, but has stronger proprietary ties and vendor lock-in

What vendor lock-in? The whole thing is open source from the compiler to the runtime - https://github.com/dotnet

If anything Java is more locked in as the most popular and 'official' runtime/devkit (Oracle Java/JDK) is completely closed source.

Re: Java Is Underhyped

#603
post #457

Earlier quoted context omitted.

With respect, you're wrong. I say this because we're now seeing widespread adoption of serverside Kotlin at places like Google and Amazon. With the support of Google and Jetbrains they can target whatever they want.

With respect, welcome to the Kotlin version of #ifdef, where language features depend on the underlying runtime. That 3D graphics library using SIMD and value types from JVM on ART or JS? Good luck achieving the same perfomance and memory semantics. Kotlin/Native has already been rebooted as its memory model was incompatbile with JVM libraries.

How is Kotlin going to support the SIMD interface? It really sounds like #ifdef for every platform, unfortunately.

Re: Java Is Underhyped

#604
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've seen plenty of even small Java projects becoming hard to manage as well. The design pattern hell is a thing. You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) Not to say Java is not a great language for big projects, it certainly is well equipped for that, especially because it has superb tooling available on the market. But I've done plenty of big projects in Python, some ended…

> You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :)

It's a funny joke, but it maligns a harmless pattern identical in FP to a function returning a function.

While FP coders would brag about how awesome high-order functions are, we just keep mocking our own style for some reason. Factories are very powerful when used right.

Re: Java Is Underhyped

#605
post #352

Earlier quoted context omitted.

They just hired Guido, the father of Python, at Microsoft. So, I would not be so sure.

Yeah, because he did so much for Python tooling at Google.

Google is hugely invested into Python, especially the data engineering branch. TensorFlow, Jax, etc. Though they will probably get replaced by Dex lang, they even dropped Swift 4 Tensorflow to focus on Dex [1]. The language looks very Pythonic compared to Julia which is a 180-degree turn in terms of language design.

[1] https://github.com/google-research/dex-lang

Re: Java Is Underhyped

#606

Earlier quoted context omitted.

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.

11,503 files, 1,431,195 lines of code. (spread out over I think the main problem is that Gradle doesn't have the same support as Java for ABI compatible changes, so invalidation of modules are more common.

Re: Java Is Underhyped

#607

I feel like the arguments would've been better applied to kotlin (especially with IntelliJ). Java has two big problems: Null and boilerplate code (getters, setters etc.) which messes with code coverage (and no, lombok is no appropriate solution to this). Kotlin is pretty null safe and has very little things which we cannot properly test. The language is easy to learn and fun to write. It feels sleek, modern and you n…

Having 100% code coverage just because is not meaningful in itself, so I don’t see your point.

Having 100% is just as not enough because you can arrive at a line of code from exponentially many states. Mutation testing is a good way to show whether the tests are actually worth anything.

Re: Java Is Underhyped

#608
post #390

> Java simply feels good to write. A lot of this is due to the craftsmanship JetBrains puts into IntelliJ IDEA The issue with Java is that you need an IDE for it to be usable. That's not an argument for Java itself.

It needs an ide as much as any other language. Java programmers are just lucky that they have the best IDEs around.

Re: Java Is Underhyped

#609

Earlier quoted context omitted.

And most recently, tons of self styled "Data scientists". This has, IMO, diluted the rabid rhetoric of the 90's/oughties python community which is good, but replaced it with people who don't know and don't care what good code even looks like, so it can be difficult to work among them.

I feel sometimes that they pride in writing shitty, unmaintainable code; that they do it on purpose. One of the ways they enjoy life is to disregard all "best practices". And I'm not talking about some high-level OOP principles, but the basics - like keeping consistent code style, or even writing some tests. The previous crowd with love for monkeypatching everything and hate for abstraction other than dictionaries wa…

lol I was just sitting here thinking I miss my Python job and not having trouble with IntelliJ detecting changes in dependencies and how frustrating it is to invalidate caches and reindex the whole project multiple times before I can run tests for the dependency change. I regularly miss the testing libraries we used, too -- it was so absurdly clean and easy to build robust mocks in our DJango stack (and I set up that tooling, largely on my own iniatiative, based on my team's feedback, so it's not like I'm just like wishing other people had already done the work). Now I work with a bunch of Java devs who use to work for Amazon and somehow use that as an excuse for not caring about tests, our ci-cd tools, and all these other things I'd gotten use to thinking of as standard in my past life as a Python dev.

Code style! Hah. First day on the job I asked about that and was told nobody cared and everybody had their own preferences.

... I'm very bitter today. I'm working on it.

Re: Java Is Underhyped

#610
post #373

Earlier quoted context omitted.

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 know you will say, this is all fault of whoever made this crap project It is. There's really no excuse for that. If it's been similar every time then you've worked on crap every time. Building a java project should be (and is on projects I work on) as easy as installing a jvm and running either maven or gradle to build it. End of story. "Install some lombok plugin" is only necessary if you want the IDE to underst…

No offense, but regardless of how right you might be, you come off as a bit of a condescending asshole. Like "Oh, you don't know that there's a more efficient way to do things? There can't possibly be any explanation other than you're literal human garbage and presumably have brain damage!". Come on, get off your high horse.
Post reply on HN