Live data from Hacker News

Java at 30: Interview with James Gosling

thenewstack.io

261–270 of 437 posts

Re: Java at 30: Interview with James Gosling

#261
post #213

Earlier quoted context omitted.

> My other issues with the JVM is how much of a black box it is from a platform perspective, which makes debugging a PITA You state how you don't really use java, but the above confirms it. Java debugging and diagnostic tooling is second to none.

That's a really narrow view of the world, and I think another Javaism to think that Java is the entire world. Today's multi-service deployments run tens if not hundreds of auxiliary processes not using Java. They use network overlays that change how processes interact with the network core. A person who is debugging a knock on effect issues has to be able to look through many different layers of processes, many of wh…

When you need to debug across the entire system and into the kernel, I'd use dtrace which has had java stack frame support since... I don't remember anymore, but closing in on 20 years.

Re: Java at 30: Interview with James Gosling

#262

Earlier quoted context omitted.

In my 20+ years using java, not once have I used strace or gdb. Java itself has fantastic debugger support, and IDEs have built in step through capabilities. Mentioning Java and Python in the same way in the context of performance is really odd. Python is nowhere near the JVM when it comes to performance

It sounds like you've only ever written code without dealing with it in production. You can't always plug your code into an IDE when your debugging someone else's JVM app on a remote server.

Eh, okay. Sounds like you don't know how to do this in production.

Re: Java at 30: Interview with James Gosling

#263
Java frustrates the absolute shit out of me. An objectively terrible language coupled with insanely great garbage collectors, insanely great JIT compilers, and insanely great IDEs.

Why couldn't we have had these things for Lisp?* I mean, if 1/1000 of the intellectual horsepower that's been thrown at Java had been thrown at Lisp, we'd all be driving to work in orbit-capable flying cars that used a teaspoon of fuel per year.

* Of course Lisp invented the insanely great IDE around 1984 but then everybody forgot about it and had to rediscover the idea 30 years later.

Re: Java at 30: Interview with James Gosling

#264

Java, especially modern Java, is a fine language. The JVM is an awesome runtime. I'm tired of pretending it isn't.

The vast majority of Java developers will never touch modern Java and have zero idea of its features or capabilities. I'm in the process of migrating literally thousands of servers and tens of thousands of apps to the cloud and there isn't anything close to modern Java. The absolute majority at this client seems to be Java 8 and there isn't a single Java 17 or newer. So it's one thing to have great modern features. B…

[deleted]

Re: Java at 30: Interview with James Gosling

#265

Java, especially modern Java, is a fine language. The JVM is an awesome runtime. I'm tired of pretending it isn't.

The vast majority of Java developers will never touch modern Java and have zero idea of its features or capabilities. I'm in the process of migrating literally thousands of servers and tens of thousands of apps to the cloud and there isn't anything close to modern Java. The absolute majority at this client seems to be Java 8 and there isn't a single Java 17 or newer. So it's one thing to have great modern features. B…

Well to be fair, if you wanted Performance, Linux support, and a framework which was built with dependency injection and async support in mind and not just have them as patched in footguns, you had to migrate to .NET Core. A Java 8 Spring app was just good enough.

Re: Java at 30: Interview with James Gosling

#266
post #7

Java performance isn't the fastest, that's ok, a close 3rd place behind C/CPP ain't bad. And you're still ahead of Go, and 10x or more ahead of Python and Ruby. Java syntax isn't perfect, but it is consistent, and predictable. And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), it's just pressing control-space all day and you're fine. Java memory management seems weird from a Unix Philosophy POV…

When I got out of college and was still firmly in the "Java is the solution to everything" mentality I didn't realize that my admiration was really for the JVM and the Java App Server tooling that was so much more advanced than anything else at the time. It was basically Docker + K8s for anything running on the JVM more than 2 decades earlier. Java the language eventually drove me away because the productivity was so…

It is unfortunate the whole JRuby doesn't get more attention and it seems Rails community dont use JRuby much.

JRuby could also run on Graal as well.

Re: Java at 30: Interview with James Gosling

#267
post #240

Earlier quoted context omitted.

Entity Beans were terrible, representing the height of JEE over complexity. I remember editing at least 3 classes, a couple interfaces, and some horrific XML deployment descriptors to represent an "entity." A lot of the tooling was proprietary to the specific app server. On top of that, it was slow. In the early 2000's, I used to work on JEE stuff for my day job, then go home and build PHP-based web apps. PHP was at…

The worst thing about EntityBeans is they were so bad they made Hibernate look good, which led people to think it was good. After 10 years of hammering against ORM complexity I finally switched to using thin database wrapper layers and have not once ever regretted it.

Hibernate... a real PITA every time the application needed something beyond basic single-table CRUD queries; sadly for me it happened 99% of the times. After some months of torture, plain JDBC with their stupid checked exceptions was refreshing, even without wrappers.

Re: Java at 30: Interview with James Gosling

#268
post #41
post #7

Java performance isn't the fastest, that's ok, a close 3rd place behind C/CPP ain't bad. And you're still ahead of Go, and 10x or more ahead of Python and Ruby. Java syntax isn't perfect, but it is consistent, and predictable. And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), it's just pressing control-space all day and you're fine. Java memory management seems weird from a Unix Philosophy POV…

The language has/had some rough edges that have been improved over the years, but the developer experience of using a strongly-typed, object-oriented language within a sturdy IDE like Idea is just second to none. The debugging process is so very straightforward. Java became synonymous with enterprisey bloated systems for good reason, but there is no pile of mud Java system that can't be stepped through cleanly with a…

> javadoc

Indeed. Many languages have something similar to Javadoc, yet somehow I haven't encountered anything quite as good as Javadoc, and I can't explain why or exactly how it's better. I admit I haven't tried that hard either. But I suspect it's down to the nature of the language and how, with well designed libraries at least (and not all are, certainly,) there is a nice decomposition of modules, packages, classes/interfaces and methods that leads to everything somehow having a correct place, and the Javadoc just follows. The strong typing is another contributor, where 90% of the time you can just look and the signature and imply what is intended. Finally, the old-fashioned frames based HTML typically used with Javadoc is a great benefit.

Also, I've found I experience less reluctance to author Javadoc for some reason. Again, part of this is due to strong types, and much of the legwork being correctly generated in nearly every case.

Lombok, when used with moderation, is wonderful. Mockito is magic, of a good kind. Maven still gets it done for me; I've yet to care about any problems Gradle purports to solve, and I think that's down to not creating the problems that Gradle is designed to paper over in the first place.

Today, if I had my choice of one thing I'd like to see in Java that doesn't presently exist it's Python's "yield". Yes, there are several ways to achieve this in Java. I want the totally frictionless generators of Python in Java.

Re: Java at 30: Interview with James Gosling

#269

Earlier quoted context omitted.

It's not you. Python packaging has regressed into a worse mess than it was 20 years ago. I limit myself to simple scripts that only rely on builtins. Anything more complicated goes to a more dependable language.

I rarely run into issues when using Poetry. If you use pip, add packages to requirements.txt willy-nilly and don't pin versions then you are asking for trouble.

Poetry doesn't fix the fact that python removes modules from the standard library every release.

Re: Java at 30: Interview with James Gosling

#270
post #229

Earlier quoted context omitted.

i like poetry though i've moved to uv - both work really well

I use pipenv and it kind-of-works. Will try uv or poetry though - which one would you recommend?

UV. Using it as the exec target for python (UV script) is great. Dependencies declared at the top, now I have executable files in something better than bash.

I no longer shy away from writing <500 LOC utility/glue scripts in python thanks to uv.

Post reply on HN