C++ devs don't care about design patterns or clean code

I'm a c++ dev on a company with a couple thousand employees, we make and maintain a linux-based OS and its applications. I work for one of the applications.
I haven't seen people caring or knowing design patterns, the other day a SENIOR developer made a global pointer and called it a singleton, I was the only one who pointed out that it was absurd and people didn't seem to care. We also have a class called xxxFactory that always creates a concrete object of the same type.
Another guy who's very smart and also a senior who looks like the average Any Forums user writes code without caring much for having it clean, he'll write functions with 100~200+ LOC and doesn't give a fuck.
I don't see many c++ people in our company talking about this stuff, they're more about performance whereas Java people seem to care a lot more.

Is it just me? What's your experience?

Attached: 1616840420856.jpg (1061x720, 98.15K)

This is why Rust will win over C++

design patterns were created to allow retards to understand large codebases

I'll continue with C++ no matter what Schizo code for life

t. Junior devs. People need to get shit done, not autistically worry about gay design patterns.

>a SENIOR developer made a global pointer and called it a singleton
I don't know what the fuck a singleton is but what I do know is that guy is BASED.

Attached: 1633690433766.png (800x1165, 195.47K)

Nothing in C++ prohibits people from using patterns correctly or creating clean code, I don't see how Rust could help. Maybe the mentality of Rust developers?

We often have new people on the projects, teams split and there are people from other teams coming in, old people quit. Thousands of lines are committed in our product each day, we must have it well organized or it will descend into chaos pretty quickly.
And it's not like you say, patterns are common solutions to common problems. It's better to use a well-known solution in which the corner cases are covered instead of reinventing the wheel.

Attached: cutesquidgirl.jpg (1200x675, 116.26K)

Attached: 1642683256593.jpg (400x250, 33.36K)

>Java people seem to care a lot more.
We do, but more often than not our employers don't, so when we try to implement them they simply say "don't get too hung up on this gay pattern shit, just make it work"

Yup sounds like typical C++ code to me.
The more you try to make C++ "clean" the less performance and/or flexibility it has - It's a literal waste of time. It's better to just duct tape everything together and hope the compiler pulls through.

>the other day a SENIOR developer made a global pointer and called it a singleton, I was the only one who pointed out that it was absurd and people didn't seem to care
That's literally what singleton is. You're not as smart as you think you are.

This is why many unis here in eurabia teach python first. Python almost forces you to have easily readable code.

>People need to get shit done, not autistically worry about gay design patterns.
Creating a GLOBAL variable is a deadly sin. Calling it a singleton should be punished with eternal hellfire.

>don't get too hung up on this gay pattern shit, just make it work
Not getting too hung up is one thing, not giving a single fuck is another and after a year or two you'll have an unmaintainable codebase.
But why then Java people seem to care about this stuff?

>The more you try to make C++ "clean" the less performance and/or flexibility it has
You can have it clean and the compiler will optimize it for you if you know what you're doing. And if it's something that needs to be critically fast I don't think people should care about these small optimizations.

You have no idea what a singleton is. A singleton is a global instance of something but there's more to it such as lazy instantiation and not being able to assign another instance to the pointer.
And it's a bad idea to use singletons and global stuff, the guy was just too lazy to pass the object around.

Attached: yanderesimulator.png (828x801, 149.38K)

based

>A singleton is a global instance of something but there's more to it such as lazy instantiation and not being able to assign another instance to the pointer.
No. You just made that up because you're trying too hard for no practical reason.

>it's a bad idea to use singletons
t. Junior dev fresh from reddit

>Nothing in C++ prohibits people from using patterns correctly or creating clean code, I don't see how Rust could help. Maybe the mentality of Rust developers?
exactly, Rust forces you to write correct code.

>the other day a SENIOR developer made a global pointer and called it a singleton
This to me just reeks of mount stupid. You're probably just riding the high from uni + whatever OOP bullshit you were fed, and don't have any actual grasp on what you're doing. The fact that he made a global pointer doesn't say anything about code quality necessarily, it just tells me you're probably a pajeet who thinks gotos are the greatest evil in the world because you were told that.

>he'll write functions with 100~200+ LOC and doesn't give a fuck.
In the vast majority of cases, if a function does a laundry list of things that ends up being 100 to 200 lines of code, it is much better to just have a large function. That makes the function much easier to read / maintain / change than splitting up that function into lots of little functions just because you don't like big functions.

I'm not saying he's good at it, mind you, I'm just saying that you complaining about these things and expecting us to just get why it's "le bad" tells me you're a massive dunning kruger. Many such cases, to be fair.

Tl;dr: S O Y Y Y Y

>>A singleton is a global instance of something but there's more to it such as lazy instantiation
Making global thing lazy is literally a waste of cycles. What a retarded thing to say.

>the other day a SENIOR developer made a global pointer and called it a singleton,
The real complaint here is that it's a pointer, instead of being stack allocated.

ONIONS...
Who uses Singletons in the year of our lord? Both of you are retards. Are you Indian? You are why Indians are hated.

Nah man either you're trolling or just too fucking dumb to realize that a global point can't be considered a design pattern.

I'm talking about something that was made global because of laziness, not because it makes sense to be global.
In some cases it makes sense to have globals or even to use gotos, not in this.
And the problem was that he called a global pointer a singleton, which it wasn't.

>In the vast majority of cases, if a function does a laundry list of things that ends up being 100 to 200 lines of code, it is much better to just have a large function
It isn't the case

>m just saying that you complaining about these things and expecting us to just get why it's "le bad" tells me you're a massive dunning kruger.
I'm saying that a global pointer isn't a singleton, that's the "le bad" I'm pointing to.

It's almost impossible to create an easily readable and accessible code base in C++ because of how many different ways there are to do things. The ability to do everything C can makes it even worse.
This problem gets only worse with each standard update that adds new "features".
I wish I could just program in pure C but the shitty libraries that I have to use have only C++ versions.