this post was submitted on 16 Nov 2024
1154 points (99.3% liked)

Programmer Humor

23135 readers
1100 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
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 5 months ago

I'm not american and I'm glad I'm not but intended if someone could enter a bunch of zero width spaces

[–] [email protected] 51 points 5 months ago

C programmers would ask whether a null-terminated name would be acceptable

[–] [email protected] 48 points 5 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 79 points 5 months ago* (last edited 5 months ago) (2 children)

Once I was tasked with doing QA testing for an app which was planned to initially go live in the states of Georgia and Tenessee. One of the required fields was the user's legal name. I therefore looked up the laws on baby names in those two states.

Georgia has simple rules where a child's forename must be a sequence of the 26 regular Latin letters.

Tenessee seemed to only require that a child's name was writable under some writing system, which would imply any unicode code point is permissible.

At the time, I logged a bug that a hypothetical user born in Tenessee with a name consisting of a single emoji couldn't enter their legal name. I reckon it would also be legal to call a Tenessee baby 'John '.

[–] [email protected] 33 points 5 months ago

im sure the devs tasked at fixing that bug loved u ;-)

[–] [email protected] 52 points 5 months ago (3 children)

Sounds like you did a thorough job as a QA tester. As a software engineer, I love to see it.

load more comments (3 replies)
[–] [email protected] 23 points 5 months ago (2 children)

why settle for \n when you can go for the stylish carriage return

[–] [email protected] 10 points 5 months ago* (last edited 5 months ago) (1 children)

so John\r Doe ? depending on the software, when it gets printed, the carriage return will move the cursor to the start of the line without moving a line down, becoming \x20Doe.

load more comments (1 replies)
[–] [email protected] 10 points 5 months ago (1 children)

¿Porqué no los dos? A nice \r\n, Windows style.

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

Gotta band it Windows tho, it just feels right, I want to enjoy my fake typewriter

[–] [email protected] 65 points 5 months ago* (last edited 5 months ago) (1 children)

No, cause "John\nDoe" messes up my regex. Sorry, out of the question. I'm not good with regex.

[–] [email protected] 26 points 5 months ago (4 children)

no one is "good" with regex.

load more comments (4 replies)
load more comments
view more: ‹ prev next ›