37
you are viewing a single comment's thread
view the rest of the comments
[-] bleistift2@sopuli.xyz 16 points 1 day ago* (last edited 1 day ago)

Boy, I recently had to look into the Java backend to figure out… something. I can’t remember.

It turns out that they needed to inject a bean into their class which was itself calling a factory, which according to documentation, instantiated three other classes just to make a fucking HTTP request! What’s worse, that clusterfuck of a (fairly standard) library required the base URL to be declared separately from the actual paths, and both the base URL needed to end with a slash, and each path must begin with one. Every reasonable programmer would assume that this is a mistake because the final path would end up with two slashes, but the library actually required that.

Meanwhile, frontend: fetch('url').then(r => r.json()).then(beHappy)

[-] luciferofastora@feddit.org 4 points 1 day ago

and both the base URL needed to end with a slash, and each path must begin with one.

...so the respective library functions each sanitizes the input meets their requirement, pre- and appending slashes as needed?

...right?

Every reasonable programmer would assume that this is a mistake because the final path would end up with two slashes, but the library actually required that.

For fuck's sake

I'm guessing they have two instances of string validation, the developer for each of which helpfully decided "I'll make sure there's a slash, idk if the other end checks it" and then a third function that trims the slashes from the parts and concatenates them with a slash for a separator.

But, man, is this ever stupid.

[-] aaaaaaaaargh@feddit.org 8 points 1 day ago* (last edited 1 day ago)

But you always get something in return for all those layers and layers of abstraction. For me most of the time it was a lot of Java/Spring features I didn't know existed and after that I realized they were pointless.

[-] DeprecatedCompatV2@programming.dev 6 points 21 hours ago

Noooo, you have to override 50% of the class methods to hard couple your filter's implementation to an event-bus-style bean with Spring in the package name to avoid NIH! What if someone needs to extend your Authentication Provider in the future but can only use a limited quota of keystrokes to implement their ticket as an inobvious side-effect? How else will they add the aud from your JWT to the MDC? Some kind of pointcut??

[-] aaaaaaaaargh@feddit.org 2 points 15 hours ago

Thanks god my attention span is way too low to comprehend all of that

[-] fibojoly@sh.itjust.works 2 points 17 hours ago

Why does it sound like you're writing plugins for Keycloak?

this post was submitted on 16 Feb 2026
37 points (97.4% liked)

Programmer Humor

29813 readers
1067 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS