this post was submitted on 02 May 2024
401 points (92.8% liked)

Programmer Humor

19555 readers
421 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 1 year ago
MODERATORS
 
(page 2) 29 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 6 months ago

I think this might be the first of these I've seen where pretty much all the comments are just agreement.

[–] [email protected] 8 points 6 months ago

I'll never plaster the back of my car with stickers that all proclaim the same things in ALL CAPS.

But if I was going to...

It would pretty much match this meme.

[–] [email protected] 95 points 6 months ago (1 children)

Standard shitpost and then out of nowhere “Hello inject me with beans please”

WHY IS IT SO FUNNY

load more comments (1 replies)
[–] [email protected] 9 points 6 months ago

Tell me more about these beans

[–] [email protected] 6 points 6 months ago (2 children)

At work we have a lot of old monolithic OOP PHP code. Dependency injection has been the new way to do things since before I started and it's basically never used anywhere.

I assume most people just find it easier to create a new class instance where it's needed.

I've never really seen a case where I think, "dependency injection would be amazing here" I assume there is a case otherwise it wouldn't exist.

[–] [email protected] 1 points 6 months ago (1 children)

As a fellow PHP dev (working in laminas specifically) DI actually is fucking awful, there's a distinction between a service factory pattern and this thing called DI which is similar to a service factory pattern but uses reflection based type sniffing to guess at which service you want where. I'd considered making a reference to it but PHP developers are few and far between these days.

load more comments (1 replies)
[–] [email protected] 3 points 6 months ago (2 children)

Isn't the point of injecting classes so that you don't have tens of instances of the same class in memory?

[–] [email protected] 4 points 6 months ago

Could be. There's easier ways to minimize instances in memory. That's what GLOBAL variables are for.

P.S. I have now gone: 0 days without trying to wind up other senior developers.

[–] [email protected] 12 points 6 months ago (2 children)

When we implemented it significantly improved our ability to write unit tests. It also allowed us to make more modular code due to the default of every class having an interface. So I'm all for it.

[–] [email protected] 3 points 6 months ago

Yeah. Injection has a place in test patterns. Thankfully, it's usually possible to hide injection from strongly affecting anything else that matters, as long as the team hates injection deeply enough.

load more comments (1 replies)
[–] [email protected] 36 points 6 months ago (2 children)

XML is the second worst programming language ever created by humans

[–] [email protected] 11 points 6 months ago (7 children)

It's a markup language, not a programming language.

[–] [email protected] 44 points 6 months ago (3 children)

Whoosh

Seriously though, spring configurations are written in XML and you create variables, call functions, and have control flow. Effectively turning XML into a horrible twisted shadow of a programming language.

All in the name of "configurability" through dependency injection.

[–] [email protected] 10 points 6 months ago (2 children)

Spring moved away from XML ages ago. I work on a 6 year old Spring project and it has never had a single line of XML in it.

[–] [email protected] 5 points 6 months ago (2 children)

I'm fond of saying that all great code earns it's right to become good code by starting as trash...

But I still think we should all quietly and politely let Spring die a simple dignified death, as soon as possible.

Out of wildly morbid curiosity, do Maven and Ant still shit all over each other to make sure no one has any real idea what the build inputs and outputs are?

I shouldn't ask things I don't really want to know, though. My inbox is gonna be full of Java apologists.

load more comments (2 replies)
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 4 points 6 months ago (1 children)
[–] [email protected] 7 points 6 months ago (2 children)

The one benefit of toml is that nobody creates a programing language over it.

[–] [email protected] 7 points 6 months ago (2 children)

The one benefit of toml is that nobody creates a programing language over it.

Heh. Any day though, right? I can't wait to see an excited presentation on code-free coding in YAML...

load more comments (2 replies)
[–] [email protected] 4 points 6 months ago
load more comments (5 replies)
[–] [email protected] 33 points 6 months ago (1 children)

I'm gonna need a bell curve hooded figure meme template of this comment, this is comedy gold.

[–] [email protected] 15 points 6 months ago

Good luck deciding where each opinion goes.

[–] [email protected] 60 points 6 months ago (3 children)

I fucking hate Spring.

The quickest way to get a team of 10 contractors to turn 100 lines of basic code from a decent engineer into 2k, with 50 janky vulnerable dependencies, that needs to be babied with customized ide's and multi-minute+ build times and 60m long recorded meetings.

Fuck Spring.

[–] [email protected] 14 points 6 months ago

Fuck Spring.

Actually, there's a lot to be said for being able to configure your spleamtomoter without needing to reverse the polarity on the stack cache rotator arm.

I'm kidding.

Fuck Spring.

[–] [email protected] 43 points 6 months ago (1 children)

They can do that in any season

[–] [email protected] 4 points 6 months ago

Ok, you win! 😁 😂

[–] [email protected] 15 points 6 months ago* (last edited 6 months ago) (2 children)

Wouldn't want to write a webserver / database connection / scheduler / etc. from scratch. Spring Boot plus lombok turns 2k lines of code into 100.

[–] [email protected] 19 points 6 months ago (4 children)

... Looks both ways...

Python does the same in 10 lines of code.

... Ducks under a table to avoid the ensuring flames ...

load more comments (4 replies)
load more comments (1 replies)
[–] [email protected] 69 points 6 months ago

We're struggling to deal with climate change and these selfish developers can think of nothing except building more factories. This is a global issue, we need a global solution: eschew factories and services for defining everything globally.

[–] [email protected] 39 points 6 months ago (1 children)

Hello inject me with beans please

not again

load more comments (1 replies)
load more comments
view more: ‹ prev next ›