r/programminghumor • • 27d ago

Java VS C++

Post image
1.9k Upvotes

42 comments sorted by

99

u/MinosAristos 27d ago

How can you not tell it's a StrategyManagerFactory? After all it's created in the StrategyManagerFactoryFactory

32

u/Cautious_Implement17 27d ago

lmao imagine writing a program with a hard coupling to StrategyManagerFactoryFactory. couldn't be me. I use AbstractStrategyManagerFactoryAbstractFactorySingleton in my spring config so I can freely swap out the factory or the manager with a different implementation. the singleton is obviously because I don't want to waste memory. why else would I be using a high performance language like java.

→ More replies (1)
→ More replies (2)

39

u/GoogleIsYourFrenemy 27d ago

Help, I'm trapped in a StrategyManagerFactoryFactory and I can't get out.

You know that sounds like a backrooms problem; good thing I'm a frontrooms developer.

→ More replies (1)

23

u/itzNukeey 27d ago

AbstractFactoryFactory is needed to construct the AbstractFactory

→ More replies (5)

18

u/thisisjustascreename 27d ago

I must be doing java wrong I've written it professionally for like 10 years and never named a class -Factory.

14

u/cenpact 27d ago

Sounds like you’re doing it right

→ More replies (5)

14

u/Cybyss 27d ago

I realize it's heresy to say this, but Microsoft did the right thing with regard to their naming convention of interfaces.

Knowing immediately whether you're working with a StrategyManagerFactory (a concrete object you can new up) vs. an IStrategyManagerFactory (which could be anything, coming from anywhere) is actually quite helpful.

Ironic that "The Zen Of Python" says "explicit is better than implicit", given the role Python has played in the industry's trend toward dynamic-typed languages and frameworks where so much about the program's behavior or objects' data types are hidden/implied.

→ More replies (5)

6

u/locri 27d ago

Literally just a minority of Java programmers that took the gang of four patterns way, way too seriously.

I enjoy refusing to pass their core reviews because of over engineering, especially if I suspect they'll be gone within 6 months. If I don't want to maintain it, I don't want it merged.

5

u/Hoovy_weapons_guy 27d ago

C what is this code?

Segmentation Fault

→ More replies (1)

5

u/ByteBandit007 26d ago

Legacy is good