this post was submitted on 04 Apr 2024
989 points (100.0% liked)

Programmer Humor

22274 readers
1892 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 1 year ago (17 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] 60 points 1 year ago* (last edited 1 year 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] 44 points 1 year ago

Taalen's PIN > 0001 confirmed.

load more comments (2 replies)
[–] [email protected] 42 points 1 year ago* (last edited 1 year 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] 18 points 1 year 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.

[–] [email protected] 17 points 1 year ago (1 children)

Americunts shit on you when you tell them tipping culture is bad. Like, here in my third world country, where we all earn a misery compared to the minimum wage in burger land, we can say no to tips or just give a few cents or some more...fuck this. Food is already expensive. I am not going to waste extra cash for my food.

[–] [email protected] 31 points 1 year ago (5 children)

Who the fuck defends tipping culture, you're just making shit up to justify your hatred of an entire country

[–] [email protected] 17 points 1 year ago (1 children)

I've seen plenty of wait staff show up to defend tipping in Reddit threads. They'd rather shame customers than demand fair wages from their employers. Or maybe they were all just bots.

[–] [email protected] 11 points 1 year ago

I think those people tend to make a lot of money off tips. There have been times I could get way more than you'd get from any paycheck a restaurant would ever be willing to pay, even with the laws changed for that sector, for "less" work. Depending on the place you work at you could have $300+ a night cash Friday-Sunday and that's me going back to what I remember from 12 years ago so who knows what they're able to get now.

I don't even make $900 a week now in a psudo-managment position in a factory. Not that the $900 is consistent there for those in food service, I just think that's one reason people would be openly resistant to the idea of changing how tipping works.

load more comments (4 replies)
load more comments (13 replies)
[–] [email protected] 228 points 1 year ago (1 children)

Little Bobby Tables says hi.

[–] [email protected] 116 points 1 year ago (3 children)
[–] [email protected] 13 points 1 year ago

You're not so little anymore!

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

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

[–] [email protected] 40 points 1 year ago (5 children)

I want to know what it says under 30%.

[–] [email protected] 20 points 1 year ago

"Best Service Ever!"

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

"I'm drunk"

[–] [email protected] 13 points 1 year ago
[–] [email protected] 86 points 1 year 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 1 year ago* (last edited 1 year ago)

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

[–] [email protected] 73 points 1 year 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] 39 points 1 year ago (1 children)

Too complicated. Just enter a negative number.

[–] [email protected] 34 points 1 year ago (1 children)

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

[–] [email protected] 48 points 1 year ago

Risky gamble there

[–] [email protected] 36 points 1 year ago* (last edited 1 year 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 1 year ago (4 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] 101 points 1 year ago (1 children)

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

[–] [email protected] 16 points 1 year ago (1 children)
[–] [email protected] 45 points 1 year 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 1 year ago
[–] [email protected] 14 points 1 year 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] 15 points 1 year ago* (last edited 1 year ago) (5 children)

does not protect from SQL injection attacks (many don't, despite it being easy to protect against)

Every modern database library automatically protects against SQL injection, usually by using prepared statements (where the query with placeholders, and the placeholder values, are sent as two separate things). so a system would have to be written extremely poorly to be vulnerable to it.

This post is just a joke as developers should hopefully be aware of the OWASP top 10 security vulnerabilities.

Edit: Bad developers will do bad things, but any reasonable developer should be well aware of these risks.

[–] [email protected] 11 points 1 year ago (4 children)

Oh sweet summer child.

First, injection attacks are third on the owasp list, although they do roll xss into it too, which changed the name, since "shit sanitization on input" and "shit escaping before use" are the cause of both.
https://owasp.org/Top10/A03_2021-Injection/

Secondly, SQL injection is freakishly common and easy. I don't know of any database libraries that prevent you from directly executing an SQL literal, they just encourage parameterized statements.

I have personally run into plenty of systems where people build SQL via string concatenation because for whatever reason they can't use an orm or "proper" SQL generator.

You can find them in the wild fairly often by just tossing ' or 1=1;-- into fields in forms. If it gets mad in a way that doesn't make sense or suddenly takes forever, you win!

Don't do that though, because it's illegal.

load more comments (4 replies)
[–] [email protected] 10 points 1 year ago (2 children)

Every modern database library automatically protects against SQL injection,

No. Every modern library allows using prepared statements, but very few (of any) force using them. If the developer doesn't use them the libraries won't do shit to protect you.

load more comments (2 replies)
load more comments (3 replies)
[–] [email protected] 11 points 1 year ago (1 children)

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

[–] [email protected] 16 points 1 year 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 (1 replies)
[–] [email protected] 38 points 1 year ago* (last edited 1 year 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] 29 points 1 year 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] 24 points 1 year ago* (last edited 1 year ago) (11 children)

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

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

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

load more comments (2 replies)
[–] [email protected] 16 points 1 year ago (7 children)

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

[–] [email protected] 11 points 1 year 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 ›