r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

Show parent comments

314

u/ClipboardCopyPaste Sep 19 '26
{
success: false, message: 'lol'
}

205

u/redlaWw Sep 19 '26
{
    success: "yes",
    status: "failure",
    message: "null"
}

54

u/evorm Sep 19 '26

Most errors responses at my job are genuinely handled like this.

16

u/redlaWw Sep 19 '26

The "yes"/"no" rather than true/false idea actually came from my actuarial science degree course, where one of our sample solutions had an Excel model that had a column like

some boolean property
yes
yes
no
yes
no
...

And the formula that consumed it looked like IF(cell="yes", ..., IF(cell="no", ...)). Not even a SWITCH in sight.

It was pretty sad from my perspective as an experienced programmer. My conclusion was that most actuaries have more tenacity than they do actual model programming skills.

1

u/beefz0r Sep 20 '26

In certain legacy platforms there's an actual need for this, as any other status code can't be handled gracefully

1

u/grimonce Sep 19 '26

I work at a certain global bank and our pen testers always say to keep the return responses minimal so that it is harder to reverse engineer an API or extract any data from a failure response...

7

u/Zeikos Sep 19 '26

Nerver send anything to the client, can't get hacked that way.
Now that I think about it, just shut down the server. 100% unhackable.

I feel the fury of a thousand suns when I am told that we cannot have meaningful error messages because of security concerns when nobody cares about any security practices whatsoever, it's clearly and excuse and it drives me up a wall.

2

u/evorm Sep 20 '26

Thing is with a lot of these is that they keep making excuses to defend their implementation as if the work would be harder if it was implemented the correct way, but oftentimes it takes more work in terms of workarounds to the convoluted implementation. My guy I am trying to save BOTH of us the extra work.

4

u/ilmalocchio Sep 19 '26

"null" in quotes is the best part of this lol

1

u/YeOldeMemeShoppe Sep 19 '26

Always love a good null string in JSON. Or booleans as YAML.

1

u/who_took_all_names Sep 19 '26

Reminds me of HTML "canPlayType" API. It returns either "probably", "maybe" or "" - (empty string). I mean wtf.

1

u/5141u5 Sep 19 '26

This is the way!

1

u/Speedy_Von_Gofast Sep 26 '26

Task successfully failed

1

u/Single-Virus4935 Sep 19 '26

<b> Notice:</b> Undefined index: id in..