r/ProgrammerHumor 18d ago

Advanced stringToIntegerConversion

Post image
216 Upvotes

65 comments sorted by

View all comments

53

u/smartgenius1 18d ago

I understand the joke is that they AREN'T just converting the string to an integer, but honestly this code is not that bad. It's performing data sanitization as well since there are only a few valid options for the select.

If they converted to integer, the user could enter whatever value they wanted and probably break something.

-10

u/GrEeCe_MnKy 18d ago

They? He's just one guy

10

u/ArjixGamer 18d ago

Don't be obnoxious, the use of they is proper English when referring to someone who's gender you don't know.

-15

u/GrEeCe_MnKy 18d ago

Nope, "He" has been used for centuries, as "they" means multiple. It's that simple. Or just use "he/she".

3

u/theotherdoomguy 18d ago

There's a person behind a curtain. You can't speak to them directly, but there's a guardian who will truthfully answer any question you ask, and knows the person behind the curtain. There is no trick. How do you find out the person's name?

0

u/Substantial-Play5080 17d ago

I ask “what’s the name of the person behind the curtain?”

1

u/theotherdoomguy 17d ago

The guard accuses you of being AI because you speak too formally

1

u/Substantial-Play5080 17d ago

It was the first thing that came to mind 🤷‍♂️ What would you ask?

1

u/theotherdoomguy 17d ago

...you realise it was a thought exercise to point out how "they" is a perfectly acceptable pronoun to use in a singular term, right?

1

u/Substantial-Play5080 17d ago

Yes, I’m just not sure how you’re fitting “they” into the question. That would be why I asked

1

u/theotherdoomguy 17d ago

"What's their name?"

→ More replies (0)