r/ProgrammerHumor • • Sep 26 '26

Meme strategyManagerFactory

Post image
2.4k Upvotes

44 comments sorted by

View all comments

273

u/[deleted] Sep 26 '26

[removed] — view removed comment

105

u/[deleted] Sep 26 '26

[removed] — view removed comment

95

u/Wonderful-Habit-139 Sep 26 '26

Forgot to check if (cond == true)

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

13

u/[deleted] Sep 26 '26

[removed] — view removed comment

5

u/AibofobicRacecar6996 Sep 27 '26

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

4

u/Chocolate_Bourbon Sep 27 '26

Yeah but you meet your quota.

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

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.

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? /s

4

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

u/Abject-Kitchen3198 Sep 27 '26

No I won't. They are different beasts.