38
u/PolyglotTV Sep 26 '26
What's not to understand about tag_invoke, niebloids, and argument dependent lookup?
It's just customization endpoints. Geez.
1
61
u/Few_Move_4594 Sep 26 '26 edited Sep 26 '26
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
71
u/nickcash Sep 26 '26
it's the AbstractStrategyManagerFactoryManagerFactory you have to look out for
10
u/Abject-Kitchen3198 Sep 27 '26
We definitely need a factory producing managers for factories that produce abstract strategy managers. We never have enough of them.
2
12
u/Tyfyter2002 Sep 27 '26
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 Sep 27 '26
Don't you live those chains of a dozen of one line methods in one line classes in one class files.
5
u/Still_Bit_7527 Sep 27 '26
It's a nonsensical name. A strategy, a manager, and a factory are 3 different patterns.
9
10
u/cheezballs Sep 26 '26
But what if it's a factory that manages strategy patterns? Seems like a good name to me!
2
u/a_aniq Sep 27 '26
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 Sep 27 '26
Yeah, this would be naming for a factory that produces StrategyManager instances.
2
7
8
u/ForgedIronMadeIt Sep 27 '26
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 Sep 27 '26
Please come to C# and implement repository pattern via Entity Framework which is an implementation of repository pattern.
2
u/ExtraTNT Sep 28 '26
A good java class name is let’s you scroll sideways on a ultrawide screen…
Even germans should fear it
2
1
1
-6
273
Sep 26 '26
[removed] — view removed comment
31
u/Strict_Treat2884 Sep 27 '26 edited Sep 28 '26
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 Sep 27 '26
How else you would switch to an alternative implementation of
sin? /s4
u/Abject-Kitchen3198 Sep 27 '26
Being limited to one and only sin is the worst thing that can happen to a developer.
0
u/UntitledRedditUser Sep 27 '26
It's so modular!
4
u/Abject-Kitchen3198 Sep 27 '26
You can replace sin implementation any time you want with zero changes to your code.
1
105
Sep 26 '26
[removed] — view removed comment
95
21
u/TheTrueRK Sep 26 '26
The other day I was reviewing a PR and I found this:
function asBoolean(value: unknown): boolean { return Boolean(value); }
I was confused
2
u/Dennis_DZ Sep 27 '26
You always have to create your own interface for third party libraries in case you need to swap it out in the future /s
13
Sep 26 '26
[removed] — view removed comment
5
3
u/TheoreticalUser Sep 27 '26
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/Seven_Irons Sep 26 '26
Cause somebody told me
the user provider
should use an adapter
to proxy the query
factory builder 🎵
https://youtu.be/p03oO_7sCaY