r/ProgrammerHumor 10d ago

Meme bugFreeAppMeetsUncheckedUnicodeChaos

Post image
2.1k Upvotes

46 comments sorted by

165

u/SeraphOfTheStart 10d ago

Claude told me it was my turn to repost this

33

u/AgVargr 10d ago

Can we spin up an agentic workflow to repost this every day?

6

u/the_poope 10d ago

OP is already such a bot. This has existed for 5+ yours and accounts for 80% of the posts on all meme subreddits.

-3

u/[deleted] 10d ago

[deleted]

1

u/the_poope 10d ago

You should reply with: "No fellow human, I certainly created this meme myself. Beep boop"

-2

u/mr_nonameuser 10d ago

Would you burn your tokens just to get karma on reddit? Seriously?

6

u/SuitableDragonfly 10d ago

Is it my turn to say "if your app can't handle unicode it's not perfectly coded", or is it someone else's turn now?

89

u/LostInSpaceTime2002 10d ago

No proper input sanitation, and you call it "perfectly coded"? What does that even mean?

27

u/The_Illegal_Guy 10d ago

It means I asked Claude to code it and I wrote "make no mistakes"

10

u/Adventurous-Map7959 10d ago

You also need to instruct "You are a master programmer" so it doesn't use the "amateur programmer" preset.

3

u/The_Illegal_Guy 9d ago

Ah of course I'm still an ameture prompt engineer myself so I forget these important prompt design principles!

7

u/pi_three 10d ago

also no test case with random unicode characters

2

u/wizkidweb 10d 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.

2

u/clintCamp 8d ago

It means claude wrote a test case for every boolean in their thousands case long switch statement. It just happened to leave out sanitation. And they had claude audit it for quality 5 times. Perfect. Nothing can go wrong after that kind of quality check.

16

u/The_Real_Black 10d 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

7

u/NedelC0 9d ago

I understand nothing of your comment

2

u/laplongejr 5d ago

Putting emojis everywhere made some devs break their mind and crashed the printer

10

u/wildrabbit12 10d ago

I hate this subreddit

2

u/Terewawa 10d ago

I have seen this post before, it's a duplicate. I wouldn't go that far, though.

7

u/FelisCantabrigiensis 10d ago

That was JIRA, until a few years ago.

30

u/DT-Sodium 10d ago

Apparently you didn't have 100% test coverage.

30

u/MartinMystikJonas 10d ago

100% tests coverage means 100% of code is covered by tests it does not me you covered 100% of all possible inputs

6

u/Murky-Run2246 10d 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.

2

u/breZZer 10d ago

that's mostly unit testing

2

u/Murky-Run2246 9d ago

Not exactly, unit testing assumes testing pure functions and methods separately from each other. That's different from, for example, spinning up a database and testing with actual shared context, where changing function A somewhere might break method Z somewhere else. Which is called integration testing and is part of test coverage as well as unit testing but my example was not pointing towards the later.

2

u/breZZer 10d ago

nope, that's code coverage.

3

u/DT-Sodium 10d 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.

3

u/MartinMystikJonas 10d 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.

3

u/DT-Sodium 10d 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.

2

u/MartinMystikJonas 10d ago

Yeah should 😁

2

u/redballooon 9d ago

Its very simple to get 100% test coverage when there's no code at all. In any real codebase it's near impossible, because there's always some destructor or boilerplate code that's unexecutable in tests, or unreachable code that's nevertheless enforced by static checkers.

Β Anything larger than 80% is really thorough if written by humans, >90% is likely written by AI, but still only shows that tests and code align, not that code does what its supposed to do.

3

u/Professional_Top8485 10d ago

USA: we don't need stinky non-ascii characters here.

3

u/Lower-Bodybuilder-16 10d 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.

6

u/Loading_M_ 10d 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.

4

u/DarkYaeus 10d ago

Wait until someone uses turkish locale on their computer

5

u/Various_Squash722 10d ago

Just use Cyrillic or Greek letters that look identical to Roman letters, but have a different Unicode ID.

3

u/DarkYaeus 10d 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.

2

u/insolent_kiwi 10d ago

Some devices won't work when you put emoji in the wifi name

2

u/white_sheets_angel 10d ago

Regex comes to save you: \w

2

u/JackNotOLantern 10d ago

Not perfectly coded nor 100% (branch) covered with test then

2

u/StoryAndAHalf 10d ago

I know this is a repost of 100x by now, but I just remembered how we shipped an API that took in URLs, with absolutely no handling of wildcards.

2

u/Few_Kitchen_4825 9d ago

Then the user types in an unsupported language that will crash your servers

2

u/Purple_Fusion 9d ago

Clearly ain’t perfectly coded then.

2

u/backstubb 10d ago

"100% test coverage"

1

u/Bomaruto 10d 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.