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

Programmer Humor

19813 readers
154 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 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 234 points 8 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.

[–] [email protected] 61 points 8 months ago* (last edited 8 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.

[–] [email protected] 45 points 8 months ago

Taalen's PIN > 0001 confirmed.

load more comments (2 replies)
[–] [email protected] 41 points 8 months ago* (last edited 8 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)
[–] [email protected] 19 points 8 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)
[–] [email protected] 228 points 8 months ago (1 children)

Little Bobby Tables says hi.

[–] [email protected] 116 points 8 months ago (3 children)
[–] [email protected] 13 points 8 months ago

You're not so little anymore!

load more comments (2 replies)
[–] [email protected] 102 points 8 months ago (1 children)

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

[–] [email protected] 41 points 8 months ago (5 children)

I want to know what it says under 30%.

[–] [email protected] 20 points 8 months ago

"Best Service Ever!"

[–] [email protected] 16 points 8 months ago
[–] [email protected] 14 points 8 months ago* (last edited 8 months ago) (1 children)
load more comments (1 replies)
[–] [email protected] 13 points 8 months ago

"I'm drunk"

[–] [email protected] 12 points 8 months ago
[–] [email protected] 85 points 8 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

[–] [email protected] 14 points 8 months ago* (last edited 8 months ago)

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

[–] [email protected] 70 points 8 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)
[–] [email protected] 40 points 8 months ago (1 children)

Too complicated. Just enter a negative number.

[–] [email protected] 36 points 8 months ago (1 children)

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

[–] [email protected] 49 points 8 months ago

Risky gamble there

[–] [email protected] 37 points 8 months ago* (last edited 8 months ago) (4 children)

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

Edit: Thanks for the responses and lively discussion!!

[–] [email protected] 86 points 8 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.

[–] [email protected] 103 points 8 months ago (1 children)

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

[–] [email protected] 16 points 8 months ago (1 children)
[–] [email protected] 47 points 8 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.

[–] [email protected] 23 points 8 months ago
[–] [email protected] 15 points 8 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)
[–] [email protected] 12 points 8 months ago (1 children)

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

[–] [email protected] 17 points 8 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)
[–] [email protected] 37 points 8 months ago* (last edited 8 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.

[–] [email protected] 14 points 8 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 28 points 8 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)
[–] [email protected] 30 points 8 months ago (2 children)

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

[–] [email protected] 11 points 8 months ago

Negative tip value.

[–] [email protected] 11 points 8 months ago
[–] [email protected] 22 points 8 months ago* (last edited 8 months ago) (11 children)

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

[–] [email protected] 21 points 8 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)
[–] [email protected] 21 points 8 months ago (3 children)

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

[–] [email protected] 11 points 8 months ago (1 children)

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

[–] [email protected] 13 points 8 months ago (4 children)

How do you press F12 on a touchscreen interface?

load more comments (4 replies)
load more comments (2 replies)
[–] [email protected] 16 points 8 months ago (7 children)

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

[–] [email protected] 13 points 8 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 ›