I think this might be the first of these I've seen where pretty much all the comments are just agreement.
Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
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.
Standard shitpost and then out of nowhere “Hello inject me with beans please”
WHY IS IT SO FUNNY
Tell me more about these beans
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.
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.
Isn't the point of injecting classes so that you don't have tens of instances of the same class in memory?
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.
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.
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.
XML is the second worst programming language ever created by humans
It's a markup language, not a programming language.
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.
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.
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.
Like yaml/toml
The one benefit of toml is that nobody creates a programing language over it.
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...
so far
I'm gonna need a bell curve hooded figure meme template of this comment, this is comedy gold.
Good luck deciding where each opinion goes.
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.
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.
They can do that in any season
Ok, you win! 😁 😂
Wouldn't want to write a webserver / database connection / scheduler / etc. from scratch. Spring Boot plus lombok turns 2k lines of code into 100.
... Looks both ways...
Python does the same in 10 lines of code.
... Ducks under a table to avoid the ensuring flames ...
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.