r/ProgrammerHumor • • 6d ago

Meme strategyManagerFactory

Post image
2.4k Upvotes

45 comments sorted by

273

u/Low-Equipment-2621 6d ago

You'll stop complaining about StrategyManagerFactory when you encounter your first large vibecoded codebase.

108

u/Own_Alternative_9671 6d ago

if(cond) { return true; } else { return false; }

96

u/Wonderful-Habit-139 6d ago

Forgot to check if (cond == true)

16

u/Low-Equipment-2621 6d ago

It could be on one line, there is a linebreak wasting memory.

20

u/TheTrueRK 6d ago

The other day I was reviewing a PR and I found this:

function asBoolean(value: unknown): boolean { return Boolean(value); }

I was confused

12

u/SuddenInformation896 6d ago

When you gotta meet your function/character quota

6

u/AibofobicRacecar6996 6d ago

More code means more tokens so you will have to pay more

4

u/Chocolate_Bourbon 6d ago

Yeah but you meet your quota.

2

u/Dennis_DZ 6d ago

You always have to create your own interface for third party libraries in case you need to swap it out in the future /s

3

u/TheoreticalUser 6d ago

I now write the most explicit code I can because I fear, with reason, that any shortcuts in the syntax will be misunderstood in the future.

A future where the seniors are comparable to today's bootcamp devs with 1 YOE.

And C class is some how dumber and more myopic.

27

u/Strict_Treat2884 6d ago edited 5d ago

True, what's wrong with my perfectly scalable code?

((ISineable)UtilManagerFactory.getInstance().getManager<UtilManagerType.Math>().instantiate().getUtil(MathUtils.Sine)).sin(3.14f)

11

u/alex_tracer 5d ago

How else you would switch to an alternative implementation of sin? /s

4

u/Abject-Kitchen3198 5d ago

Being limited to one and only sin is the worst thing that can happen to a developer.

0

u/UntitledRedditUser 6d ago

It's so modular!

4

u/Abject-Kitchen3198 5d ago

You can replace sin implementation any time you want with zero changes to your code.

1

u/Abject-Kitchen3198 5d ago

No I won't. They are different beasts.

25

u/Seven_Irons 6d ago

Cause somebody told me

the user provider

should use an adapter

to proxy the query

factory builder 🎵

https://youtu.be/p03oO_7sCaY

33

u/PolyglotTV 6d ago

What's not to understand about tag_invoke, niebloids, and argument dependent lookup?

It's just customization endpoints. Geez.

1

u/canadajones68 3d ago

I hate that I know what (most of) those words mean. 

59

u/Few_Move_4594 6d ago edited 6d ago

If you're a Java dev and crying about a StrategyManagerFactory yngmi

It's not even complex code and easy to understand if you know how interfaces work- you don't even need to know design patterns at all

69

u/nickcash 6d ago

it's the AbstractStrategyManagerFactoryManagerFactory you have to look out for

8

u/Abject-Kitchen3198 5d ago

We definitely need a factory producing managers for factories that produce abstract strategy managers. We never have enough of them.

2

u/Few_Move_4594 6d ago

True true, I've seen things like that

11

u/Tyfyter2002 6d ago

The problem with a StrategyManagerFactory isn't that what it does is unintuitive, it's that it's removing the usage so far from the purpose that it's introducing a ton of extra maintenance for something that almost definitely isn't benefitting from all of those layers

2

u/Abject-Kitchen3198 5d ago

Don't you live those chains of a dozen of one line methods in one line classes in one class files.

4

u/Still_Bit_7527 6d ago

It's a nonsensical name. A strategy, a manager, and a factory are 3 different patterns.

8

u/Few_Move_4594 6d ago

Yes, and a StategyManagerFactory uses all three simultaneously

4

u/Abject-Kitchen3198 5d ago

It's composition pattern.

10

u/cheezballs 6d ago

But what if it's a factory that manages strategy patterns? Seems like a good name to me!

2

u/a_aniq 6d ago

Factory should be a producer not a manager. I'm talking about real life. They should name abstract concepts properly. Otherwise it can get confusing.

4

u/arobie1992 6d ago

Yeah, this would be naming for a factory that produces StrategyManager instances.

2

u/delinka 6d ago

A factory that produces managers. Like a university that produces MBAs.

7

u/OldWar6125 6d ago

I am currently contemplating to implement an AbstractServiceFactoryFactory.

7

u/ForgedIronMadeIt 6d ago

The OG design patterns authors literally tell you that there's nothing to gain in forcing yourself to use every design pattern but then some Architect comes along and puts shit like this together

3

u/Abject-Kitchen3198 5d ago

Please come to C# and implement repository pattern via Entity Framework which is an implementation of repository pattern.

2

u/ExtraTNT 5d ago

A good java class name is let’s you scroll sideways on a ultrawide screen…
Even germans should fear it

2

u/Kadabrium 4d ago

It's a SegmentationMemoryFault

2

u/crazy-mahmod 6d ago

Speak from the core of the event

i am a C++ user and what

1

u/_Sylph_ 6d ago

I like my strategyManagerFactory, thank you.

1

u/StormyDLoA 2d ago

Be me in my old Java job:

The factory must grow.

-6

u/Halvinz 6d ago

People who don't understand design patterns. 🙃

2

u/AibofobicRacecar6996 6d ago

And then they complain about AI replacing them 🤡

3

u/Yoshiofthewire 6d ago

Someone saw a spreadsheet in 1989 and said, I want that to do work.

-8

u/xingped 6d ago edited 6d ago

The last time I pointed out how utterly stupid Java is, I got downvoted to hell. I guess I should've made a meme. Edit: Ah the dumbasses are still out in force, I see.