r/ProgrammerHumor • u/Lower-Bodybuilder-16 • 14h ago
Meme bugFreeAppMeetsUncheckedUnicodeChaos
43
u/LostInSpaceTime2002 12h ago
No proper input sanitation, and you call it "perfectly coded"? What does that even mean?
9
u/The_Illegal_Guy 11h ago
It means I asked Claude to code it and I wrote "make no mistakes"
2
u/Adventurous-Map7959 10h ago
You also need to instruct "You are a master programmer" so it doesn't use the "amateur programmer" preset.
4
1
u/wizkidweb 11h ago
This exact thing happened to me, and we were sanitizing our input. In our case, the database system was using an older version of Unicode, so we had to validate against that explicitly.
6
17
u/DT-Sodium 13h ago
Apparently you didn't have 100% test coverage.
21
u/MartinMystikJonas 13h ago
100% tests coverage means 100% of code is covered by tests it does not me you covered 100% of all possible inputs
2
u/Murky-Run2246 12h ago
Yeah, 💯 test coverage is like the safety check you run after editing the code to make sure your changes did not break something somewhere.
Does not mean your code is tested for all possible scenarios though.
1
u/DT-Sodium 11h ago
In this case, either it causes an encoding issue of some kind and crashes your app, in which case your code is not tested properly, or the result will simply be that the username will display an emoji, which isn't a bug per say.
1
u/MartinMystikJonas 11h ago
This is usally problem on database layer that uses utf8mb3 that does not support emoji characters. Your app works and all code is 100% covered and tested. But it still crashes in prod because DB uses utf8mb3 not utf8mb4 (dont ask how I know 😁). But you cannot test all posible inputs and run environments because there is infinite posibilites.
2
u/DT-Sodium 10h ago
Bro my database system doesn't even support the € symbol, don't talk to me about utf8mb3. Anyway, your dev environment, pre-production and deploy environment should be using the exact same database system.
1
3
u/Professional_Top8485 12h ago
USA: we don't need stinky non-ascii characters here.
3
u/Lower-Bodybuilder-16 11h ago
They can accept only those rules good for their business. If not they create their own rule. Like tomato 🍅 is a vegetable by business. Scientifically it's a fruit.
4
u/Loading_M_ 10h ago
"Vegetable" is a social construct. There isn't a biological definition of term vegetable. Every vegetable actually falls into one of several different biological categories, like leafs, roots, stalks, etc. Tomatoes are classified biologically as a fruit. However, since vegetable isn't a biological classification, a tomato can also be considered a vegetable at the same time.
2
2
2
u/PrestigiousGuava8005 11h ago
The database really said 'I can survive anything' and then met someone named 👁️👄👁️
3
u/The_Real_Black 5h ago
The moment I learned Window and point opend the emoji menu
User: 🍣
Password: 🍣💣❄️🔥🥓🍔💥🤡
Item 🍕
Variants 🔥❄️
Info 🪵🪵🪵🪵🪵🪵
5 minutes later a scream in the office, why is the test database so colorfull?
We know now, the PDF printer is old and a API really disliked it also...
got 5 new tickets that day. :-P
the user still works
2
u/DarkYaeus 13h ago
Wait until someone uses turkish locale on their computer
3
u/Various_Squash722 12h ago
Just use Cyrillic or Greek letters that look identical to Roman letters, but have a different Unicode ID.
2
u/DarkYaeus 12h ago
I am not sure what you are referring to outside of the use of unicode letters. I was talking about how people in Turkish locale would have the toLowerCase() function turn I into a letter that is not i.
1
1
u/Bomaruto 8h ago
Where we don't want emojis we block it and where we don't care we don't block it. Doesn't cause any issues at all.
1
1
95
u/SeraphOfTheStart 14h ago
Claude told me it was my turn to repost this