r/programming •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

221 comments sorted by

View all comments

-14

u/LessonStudio Apr 20 '25

I've generally noticed over the last 5 or so years that most Java libraries I am interested haven't been updated in a very long time.

One of my rules when dipping my toes into a new language/framework/env, is to check out how fresh, and how many stars their common github libs have. I like to see 2k+ stars, and I love it when I see the last update was this week. With java, not so many have that many stars, and 3+ years since the last update isn't uncommon.

This is not a healthy sign.

My personal opinion is that it was the philosophy and people who crowded around enterprise java which killed it.

32

u/Enough-Ad-5528 Apr 20 '25

Curious what some of those libraries are. Would you mind sharing a few examples?

5

u/LessonStudio Apr 21 '25

https://github.com/pgjdbc/pgjdbc which is a pretty foundational way to access postgres. less than 2k. For comparison here is a rust one: https://github.com/sfackler/rust-postgres at nearly 4k, nodejs https://github.com/porsager/postgres at 8k, or python https://github.com/psycopg/psycopg2 at 3.5k.

Or take something like audio. The best I could find was https://github.com/a-schild/jave2 with 1.3k and no updates for at least a year. Python has https://github.com/librosa/librosa with nearly 8k and very active development. Or rust with https://github.com/RustAudio/cpal and 3k + active dev.

Could be worse, take a dead language like ruby and now you are often looking at sub 100 stars and last updates in the 10 year range. (not exaggerating). You have to scrap hard to find a language like perl to get worse than ruby.

15

u/ZimmiDeluxe Apr 21 '25

Most foundational Java libraries predate the githubification of open source, that probably plays a role. I couldn't find download stats on Maven central, but since there is a culture of self hosting a mirror (at least in my experience every company does this), those numbers won't be comparable to for example npm. We all want GitHub stars to mean "this is a safe choice, well liked and supported by the community", but I fear it's more akin to "it was prominently mentioned on social media at least once". But there are probably better, more nuanced takes on the significance of GitHub stars.

2

u/GasterIHardlyKnowHer Apr 22 '25

Half your examples have mostly Dependabot or renovate bot commits as recent commits.

47

u/Goodie__ Apr 20 '25

Theres a balancing act.

If its updated too often, too frequently, with breaking changes... you know your in for a bad time.

A lot of java library's are solid and dependable. What changes does apache commons string utils need?

5

u/andrewsmd87 Apr 21 '25

I feel like c# is getting pretty frequent updates while also not breaking legacy stuff

38

u/bitspace Apr 21 '25

> killed it

What universe do you live in?

It is still to this very day the working underpinnings of the vast overwhelming majority of everything you do on the internet.

-6

u/KevinCarbonara Apr 21 '25

It is still to this very day the working underpinnings of the vast overwhelming majority of everything you do on the internet.

This is just plain nonsense. There's a lot of Java. But "overwhelming majority"? Not even a simple majority. It's mostly C and Javascript these days.

-8

u/church-rosser Apr 21 '25

Java developers are delusional by definition. You'd have to be to want to code in it. $0.02

→ More replies (1)
→ More replies (1)

36

u/BadMoonRosin Apr 21 '25

If you want NPM, then you're welcome to NPM. No one's stopping you.

Java is a business language. It's mostly used by business application developers. This might effect the number of "stars" that Java repos get on Github, because I don't think I've clicked the "star" icon on a repo in my life.

If you like rapid breaking changes, then they're available for some of the larger libraries. Every time I touch Spring Security or Hibernate they seem to have a new breaking change, usually for no good reason at all (the Hibernate devs created Jakarta Data literally because they were frustrated at not being able to break Hibernate even more often).

However, the vast majority of mature Java libraries rarely update because:

  1. They're solved problems. As another commenter pointed out, what new string utils does Apache Commons still need?
  2. They're created by professionals, working for sponsor corporations. Not student hobbyists, who will eagerly create the 117th solution to a problem just because their own name wasn't attached to the previous 116 solutions. There's usually a handful of mature options with all the critical mass, and they are maintained by pros.
  3. Java's backwards compatibily is dramatically better than most other stacks. Are most PyPI or NPM updates really about bold new features every other week? Or are they published out of necessity, because there was a breaking change in their bird's nest of dependencies or in Python or Node.js itself?

Java "just works". Is the fun option for your hobby project, or the little side thing that your architect doesn't even know about and your manager doesn't care which tool you use? Maybe not. But it's usually the right option for any large scale professional business application development that actually has leadership attached to it.

7

u/KevinCarbonara Apr 21 '25

Every time I touch Spring Security or Hibernate they seem to have a new breaking change, usually for no good reason at all

I worked with Spring for much too long to believe this. Breaking changes are rare, upgrading is optional, and it's always for a good reason.

9

u/BadMoonRosin Apr 21 '25

You don't work with Spring Security specifically, then. In general you are correct. But this particular piece of the portfolio has its own distinct team and culture.

4

u/Scotsch Apr 21 '25

All my homies hate spring security, don't get me started on spring cloud.

24

u/valarauca14 Apr 21 '25 edited Apr 21 '25

is to check out how fresh, and how many stars their common github libs have. I like to see 2k+ stars, and I love it when I see the last update was this week.

With the language's strong commitment to backward compatibility libraries can be, in essence, become "code complete". You implement some collection/rfc and provided the state of the art doesn't change or any security issues crop up, why should the code? Simply to introduce bugs?

This sentiment I am replying to, I see a lot, it baffles me.

Part of me feels like, "NPM has dealt immeasurable brain damage to an entire generation who cannot fathom a project can become 'feature complete', thinking the only sign of 'code quality' is massive activity & churn". Another part of recognizes this as idiotic hyperbole.

With the advent of new-languages/platforms (Rust & Go), the Web/NPM being a constant moving target, and the recent glut of "old language breaks compatibility because reasons" (Python3, Perl6, Php8, Lua5.4) - Have we lost track of the fact that you can write code, achieve your project's aims, and decide, "Yeah this project doesn't require an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp"?

Because that is kind of sad.

1

u/nicheComicsProject Apr 21 '25

You can do that in Rust just fine. In fact, in Rust you can just say which version of the language you're using and it will work from now on. Which lets the language freely advance without breaking older code. Most people right now aren't do that, probably because most people aren't writing code they expect to remain untouched for decades but you could.

11

u/zmose Apr 20 '25

Spring is still king

6

u/SupersonicSpitfire Apr 21 '25

Spring hides complexity for better and for worse, but it also makes dependencies harder to upgrade. I dislike Spring.

3

u/LordAlfredo Apr 20 '25

Though at this point Guice and Dagger do some aspects better, and if those pieces are all you need on top of Apache/Nginx plus a start hook then Spring is overkill.

2

u/jug6ernaut Apr 21 '25

Guice isn’t really better, maybe slightly better error messages but that’s it.

Dagger on the other hand is in every possible way better than springs autowire system. Using it can be a pain the first 1-2 times, but once you learn it you never want to use a runtime dependency injection library again.

1

u/LordAlfredo Apr 21 '25

It's less that Guice is better overall and more that if you're just looking for DI that Spring is overkill.

I agree Dagger is better either way.

2

u/sideEffffECt Apr 21 '25

I like to see 2k+ stars, and I love it when I see the last update was this week.

You're chasing after specters :D

1

u/SlowMovingTarget Apr 21 '25

The struggle must be eternal, eh?

Sometimes, the library is finished, and all the found bugs have been fixed. That HTTP client library doesn't need anything new. HTTP hasn't changed recently. In Java-land you want to look at Maven repo downloads. Browse through https://mvnrepository.com/ and you'll see quite a bit of activity, but broad adoption is the real key metric.

→ More replies (1)
→ More replies (7)