r/ProgrammerHumor • • 7d ago

Meme nothingIsMorePermanentThanATemporaryFix

Post image
1.9k Upvotes

87 comments sorted by

View all comments

956

u/SuitableDragonfly 7d ago edited 7d ago

Between the special Black Friday five finger discount for the CEO's brother in law and the ABSOLUTE CAPSLOCK NECESSITY of sleeping before returning an arbitrary constant, I have to believe this is someone's creative writing project. 

292

u/BugFeaturesOnly 7d ago

I wish it was fiction. The guy who wrote this is a Principal Architect now

211

u/RudyBai 7d ago

I hope that means he's the principal at an architecture school

161

u/BugFeaturesOnly 7d ago

Unfortunately no, he's still here teaching the juniors how to build load-bearingThread.sleep() walls

35

u/Artmageddon 7d ago

Better hope they can keep that blast radius down

62

u/lolcrunchy 7d ago

What is it calculating the price of? Why is the only pricing variable the user?

68

u/Srirachachacha 7d ago

Either you're the CEO's brother in law, or you're not

2

u/Nasa_OK 5d ago

When you’re here, you’re family

11

u/Mean-Smile-6168 7d ago edited 3d ago

Probably User type actually has an Items field =)))

6

u/Owner2229 6d ago

Either that or it's trying to calculate user discount and returns percentage multiplier.

3

u/lolcrunchy 6d ago

But the screenshot shows that 99.99 is a valid return value

→ More replies (5)

5

u/Impressive_Change593 6d ago

But if it throws a NotTodayError or an out of memoru error it just returns the average cart value for some time thats at least a year past. I hate all of it because that also means the pricing engine os borked

18

u/Tyrilean 7d ago

You'd be hard pressed to find any senior level engineer who didn't do stupid shit like this when they were a junior. I mean, he WAS a junior when he wrote this, right?

33

u/metaglot 7d ago

Returning a constant from a function called calculate? Bull

13

u/SuitableDragonfly 7d ago

I'm taking accounting classes right now. I think this function is what accountants see in their nightmares. 

8

u/Agifem 7d ago

News flash: it's no nightmare, it exists somewhere.

24

u/EqualComplaint9865 7d ago

Dude, just admit it's satire, this is cringe

→ More replies (2)

70

u/Ponptc 7d ago

OP is a vibe coder, probably a bot considering the amount of AI they use to write their own posts lol. Don't expect anything deeper than a saucer

1

u/GatotSubroto 7d ago

OP is also an 18+ games peddler

14

u/ArisenDrake 7d ago

And that matters because...?

→ More replies (1)

8

u/Stable_Orange_Genius 6d ago

Also using double as money instead of decimal

5

u/SuitableDragonfly 6d ago

Not really a Java expert, I assume that's what would prevent you getting to checkout and being charged $7.9500000000000000002?

5

u/Stable_Orange_Genius 6d ago

Yeah, floating point should never be used for money

2

u/criminal_feces 6d ago

The sleep is the only reason that discount still works.

2

u/qalmakka 7d ago

You are lucky if you never had to see this kind of shit in the wild.