this post was submitted on 04 Apr 2024
971 points (97.5% liked)

Programmer Humor

19623 readers
4 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] Zagorath@aussie.zone 234 points 7 months ago (24 children)

The meme says "IRS", so it's obviously intended to refer to America.

But outside of that context, they'd fucking deserve it for their shitty dark pattern UX trying to export American tipping culture into the civilised world. If people want to tip, they can do it using cash (so the money actually goes to the person you intended it to!). Or at most, there could be a little "tip" button in the corner somewhere that then takes you to a page like this. It shouldn't be shoved in our faces like this.

[–] Taalen@lemmy.world 61 points 7 months ago* (last edited 7 months ago) (3 children)

Live in a country where tipping is practically unheard of. Lately pay terminals have started appearing in restaurants that have asking for tip enabled by default, and restaurants often don't know how to disable it.

Well, at least there are some safeguards. I was handed the terminal so I put in my PIN code, not realising it was actually asking for a tip. I was pretty confused when it said "value too high" or something like that.

[–] freebee@sh.itjust.works 45 points 7 months ago

Taalen's PIN > 0001 confirmed.

load more comments (2 replies)
[–] Gradually_Adjusting@lemmy.world 41 points 7 months ago* (last edited 7 months ago) (8 children)

I, an American, was ashamed when I had to ask that a tip be removed from my bill at a restaurant in Camden.

CAMDEN WAS SUPPOSED TO BE WOKE AND Y'ALL FUCKING DOG OVER HERE

Pay your damn staff a good wage

load more comments (8 replies)
[–] kevincox@lemmy.ml 19 points 7 months ago

In most places even if you tip cash they are supposed to keep that for the tip pool and it is split. Often among the cook staff and other people at the restaurant.

load more comments (21 replies)
[–] fubarx@lemmy.ml 226 points 7 months ago (1 children)

Little Bobby Tables says hi.

[–] bobbytables@feddit.de 116 points 7 months ago (3 children)
[–] LordTrychon@startrek.website 13 points 7 months ago

You're not so little anymore!

load more comments (2 replies)
[–] JeffreyOrange@lemmy.world 102 points 7 months ago (1 children)

the adjectives on the tip options are so weird lol What a shitty system to even exist

[–] Obi@sopuli.xyz 41 points 7 months ago (5 children)

I want to know what it says under 30%.

[–] samus12345@lemmy.world 20 points 7 months ago

"Best Service Ever!"

[–] Kolrami@lemmy.world 14 points 7 months ago* (last edited 7 months ago) (1 children)
load more comments (1 replies)
[–] evranch@lemmy.ca 13 points 7 months ago

"I'm drunk"

[–] LeroyJenkins@lemmy.world 12 points 7 months ago
[–] umbraroze@lemmy.world 85 points 7 months ago (1 children)

One day someone will use the SQL injection to execute code on the remote server to add message to the web site that tells the workers to unionise and demand actually fair wages and put an end to the whole tipping nonsense

[–] melpomenesclevage@lemm.ee 14 points 7 months ago* (last edited 7 months ago)

Please write this code and I'll do it ~~tomorrow~~ when stuff opens today.

[–] Coasting0942@reddthat.com 70 points 7 months ago (3 children)

Jokes on you. Restaurant owner too rich, behavior is within normal range for IRS AI.

Though the AI is interested on how your bank account is higher than it’s supposed to be.

load more comments (3 replies)
[–] xlash123@sh.itjust.works 40 points 7 months ago (1 children)

Too complicated. Just enter a negative number.

[–] kevincox@lemmy.ml 36 points 7 months ago (1 children)

No negative sign on the keyboard. But you can enter 2147483647

[–] ripcord@lemmy.world 49 points 7 months ago

Risky gamble there

[–] RavenFellBlade@startrek.website 37 points 7 months ago* (last edited 7 months ago) (4 children)

I'd love to know what this would actually do.

Edit: Thanks for the responses and lively discussion!!

[–] BombOmOm@lemmy.world 86 points 7 months ago (15 children)

Assuming the accounting system this thing links with both does not protect from SQL injection attacks (many don't, despite it being easy to protect against) and also has a table named "Bills" with a field named "amount"; what this would do is go through every single Bills record and half the value in the amount field. This would completely fuck the system, particularly when it came to billing and tax filing as the numbers for accounts billing and receivable wouldn't even come close to matching each other. The accounting department would have a hell of a time fixing the damage.

[–] Aquila@sh.itjust.works 103 points 7 months ago (1 children)

Need to throw a rand() in there to make it less easy to unfuck

[–] Gork@lemm.ee 16 points 7 months ago (1 children)
[–] Mic_Check_One_Two@reddthat.com 47 points 7 months ago (3 children)

Yup. Rand() chooses a random float value for each entry. By default I believe it’s anywhere between 0 and 1. So it may divide the first bill by .76, then the second by .23, then the third by 0.63, etc… So you’d end up with a completely garbage database because you can’t even undo it by multiplying all of the numbers by a set value.

[–] proper@lemmy.world 23 points 7 months ago
[–] Buddahriffic@lemmy.world 15 points 7 months ago

Also, by dividing by a number between 0 and 1, you increase the amount it looks like it billed. So income will look like it's higher than outgoing funds, which will raise suspicions of embezzlement. And if someone actually is embezzling, whatever accounting tricks they've been using to hide it might just stop working because everything might need to be examined with a fine tooth comb. "Oh, the billing numbers aren't right, and also it turns out the invoice numbers aren't right either. Billing issue was tracked to a hack, but what's going on with these invoices?"

load more comments (1 replies)
[–] lightnsfw@reddthat.com 12 points 7 months ago (1 children)

Couldn't they just *2 all the bills from before this was ran and straighten it out?

[–] dfc09@lemmy.world 17 points 7 months ago (7 children)

I imagine they could if they knew exactly what you did and when, but if it doesn't get discovered until later and nobody knows what happened, it would probably be a bitch to figure out

load more comments (7 replies)
load more comments (13 replies)
[–] Kerb@discuss.tchncs.de 37 points 7 months ago* (last edited 7 months ago) (1 children)

its an sql injection attack.
its rather unlikely that it works in a modern app.

assuming this would work,
it injects a command in the sql database.

it is assumed that the app runs a sql querry with the input field as a parameter e.g.
INSERT INTO "bills" (item, ammount, tip) VALUES ("steak", "20,00 $", "content of the custom tip goes here");

the semicolon indicates the end of the querry,
so the the text would cause the app to run an unfinished querry, and then start a new querry that messes up the content of the bills table.

[–] some_guy@lemmy.sdf.org 14 points 7 months ago (1 children)
load more comments (1 replies)
[–] diffcalculus@lemmy.world 28 points 7 months ago

Nothing. For one, it won't let you enter letters. Two, the table structure to these POS systems are more nuanced than a simple bills table with am amounts field.

It's amusing and all, but it's not something you can do.

Source: work with, and develop around, these types of POS systems.

load more comments (1 replies)
[–] Kolanaki@yiffit.net 30 points 7 months ago (2 children)

What code could I enter there to get them to pay me for the food? 🤔

[–] PrinceWith999Enemies@lemmy.world 11 points 7 months ago

Negative tip value.

[–] Alexstarfire@lemmy.world 11 points 7 months ago
[–] tiefling@lemmy.blahaj.zone 22 points 7 months ago* (last edited 7 months ago) (11 children)

I wish 15% and 18% were options. Normally it's more like 20%, 25% (default), 28%, 30%

[–] Rediphile@lemmy.ca 21 points 7 months ago

Eventually people will say that about the current options lol.

There should be no default percent options at all. None.

'complete transaction' or 'add optional tip'.

load more comments (10 replies)
[–] RagnarokOnline@programming.dev 21 points 7 months ago (3 children)

Now if I could only bypass the float only input field…

[–] Maalus@lemmy.world 11 points 7 months ago (1 children)

F12 lol. The only issue with a dev console helping would be serverside checking

[–] grue@lemmy.world 13 points 7 months ago (4 children)

How do you press F12 on a touchscreen interface?

load more comments (4 replies)
load more comments (2 replies)
[–] northendtrooper@lemmy.ca 16 points 7 months ago (7 children)

Can't they trace it back to you since you're using a card to get that prompt?

[–] survivalmachine@beehaw.org 13 points 7 months ago (1 children)

In my country, we can buy pre-paid credit cards in the supermarket using cash. I guess that is still traceable using supermarket security cameras and facial recognition, but if you're attempting this, I'd make it as difficult as possible.

load more comments (1 replies)
load more comments (6 replies)
load more comments
view more: next ›