News for hackers. Stuff that matters.
Re:Strings Just Got Faster by davnicwil on Saturday May 03, 2025 @05:39AM (#43877913)
the mind blowing moment for me with Java came about 5 years into using it, when I encountered the idea - via some smart colleagues - that none of the extra 'stuff' is intrinsic to the language but rather is self-imposed.

Turns out you can write java without the stuff. No getters and setters, no interfaces or dependency injection, no separate application server (just embed one in your jar). No inheritence. Indeed no OOP (just data classes and static methods).

Just simple, c-like code with the amazing ecosystem of libraries and the incredibly fast marvel that is the JVM and (though this is less of a deal now with LLM autocomplete) a simple built in type system that makes the code practically write itself with autocomplete.

It's truly an awesome dev experience if you just have the power / culture to ignore the forces pressuring you to use the 'stuff'.

Re:Strings Just Got Faster by concerndc1tizen on Saturday May 03, 2025 @05:50AM (#43877938)
I love Java in the same way.

But that free-thinking definition of Java clashes with the mainstream beliefs in the Java ecosystem, and you'll get a lot opposition at workplaces.

So I gave up on Java, not because of the language, but because of the people, and the forced culture around it.

Re:Strings Just Got Faster by wood_spirit on Saturday May 03, 2025 @08:09AM (#43878533)
The over engineering creeps in anywhere there is collaboration. It’s not a Java thing, it’s a corporate thing. The new teammate who refactors the perfectly working sql pipeline; the teammate who makes story points a required field on your trouble ticket system, the teammate who just saw a conference talk on rust and wants to apply it etc. Most engineers are not zen masters seeking out simplicity; they are lost with poor grasp of desired business outcomes so they procrastinate by adding complexity and indirection and focusing on tech as if it were the destination not the journey.
Re:Strings Just Got Faster by 90s_dev on Saturday May 03, 2025 @09:34AM (#43878945)
True, but there's also the bored engineers who just can't force themselves to write enterprise code unless they make it fun for themselves. I'm absolutely convinced this is why Clojure even exists and is so widely used in fintech.
Re:Strings Just Got Faster by gorjusborg on Saturday May 03, 2025 @10:15AM (#43879162)
> lost with a poor grasp of desired business outcomes so they procrastinate by adding complexity

I have come to see this as a mix of business people and developers not doing their jobs to protect thier paycheck. Business people, if they want to succeed, need to be converging on a strategy that makes money. Developers need to have a strategy for removing technical barriers to realizing that strategy. The lack of a business strategy often makes an overly general technical platform look attractive.

> focusing on the tech as if it were the destination

So common. Complexity should be considered the enemy, not an old friend.

Re:Strings Just Got Faster by zelphirkalt on Saturday May 03, 2025 @10:22AM (#43879218)
The extreme focus on multiple layers of patterns, where actually a simple function would have sufficed IS a Java ecosystem and culture thing. Just way too many people doing Java, who have never learned another language or ecosystem, let alone paradigm, thinking "I learned Java, Java can do everything, I don't need to learn anything else!" and now feeling they need to solve every problem by applying design patterns mindlessly.
Re:Strings Just Got Faster by gf000 on Saturday May 03, 2025 @12:47PM (#43880297)
So how do you explain.. every other piece of software written by 5+ people?
Re:Strings Just Got Faster by zelphirkalt on Sunday May 04, 2025 @02:17AM (#43884900)
Well, not by talking about AbstractFactoryProxy, that much is for sure. Rather by talking about which parts of the system are modular and what kind of flexibility the system allows for, what capabilities it has. Nowhere in that picture does a low level implementation detail like an AbstractBlaBlubFooBar enter the the conversation.

There is more to computer programming than the OOP clutter.

Re:Strings Just Got Faster by 90s_dev on Saturday May 03, 2025 @09:32AM (#43878929)
Someone's tweet from about 15 years ago (paraphrased from memory):

"We rewrote 200k line Java codebase in only 50k lines. Guess what language we used?"

The follow-up tweet a day later:

"It was Java."

Re:Strings Just Got Faster by specialist on Saturday May 03, 2025 @11:11AM (#43879584)
> No inheritence.

Yup. Prefer composition over inheritance.

Such a hard sell during the heyday of OOAD. UML, Fusion, RUP, blahblahblah.

Having previous experience with LISP, it just seemed obvious, barely worth mentioning. Definitely set me apart from my colleagues.

FWIW: Our local design pattern study group tackled Arthur J. Riel's Object-Oriented Design Heuristics [1996] https://archive.org/details/objectorientedde0000riel https://www.amazon.com/Object-Oriented-Design-Heuristics-Art... Which might be the earliest published pushback against all that overwrought enterprisey ThoughtWorks-style brainrot.

> No ... dependency injection

Yes and: Mocks (mocking?) is a code stench. Just flip the ownership relationship(s). As Riel, and surely many others, have laboriously explained, to a mostly uncaring world.

Re:Strings Just Got Faster by kazinator on Sunday May 04, 2025 @02:12AM (#43884876)
Prefer inheritance if the first thing you're gonna have to do under composition is to crank out a bunch of delegate methods from the parent object to the contained child, to make the parent substitutable for the child, and the child won't be replaced at run time.
Re:Strings Just Got Faster by specialist on Sunday May 04, 2025 @11:53AM (#43887437)
Probably. I personally haven't done anything like that. Though I'm not sure I follow.

I've mostly done ASTs and (scene) graphs. I prefer dumb objects, stuffing most behavior and logic in an Interpreter (design pattern) implementation. Being a very simple bear, my working memory can't keep track of all the smarts scattered all about.

My current example is processing SQL statements; think expression evaluator (subset) for a very specific use case. I tend to use so called "External" Iterators for walking trees, to keeping all the logic in one place. Versus Visitor, Listeners, or even Active Objects. Which is feasible for this use case, because its bounded and unlikely to change (eg extension points).

YMMV of course. Now I'm just babbling, apologies, and probably went too far off topic.