this post was submitted on 05 May 2025
78 points (91.5% liked)

Programmer Humor

23132 readers
2359 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
all 32 comments
sorted by: hot top controversial new old
[–] jia_tan@lemmy.blahaj.zone 16 points 3 days ago* (last edited 3 days ago) (4 children)

Genuine question. Why does a program need to know the user’s gender? (I’m asking in general, not in this particular case). Just use gender neutral pronouns to refer to the user, or, better yet, don’t talk to me at all!

Aside from niche things like targeted ads and gendered health tracking and stuff.

[–] verstra@programming.dev 6 points 2 days ago

Gender PHP extension is a port of the gender.c program ... The main purpose is to find out the gender of firstnames.

As of why, you don't need a why in open source. Some people treat gender as a function of their firstname, apparently, and need that information somewhere - maybe for localization, maybe for personalization, maybe for form-filling auto-suggestion purposes.

[–] Xanza@lemm.ee 15 points 3 days ago* (last edited 1 day ago) (1 children)

For some languages gender-neutral pronouns aren't possible or aren't appropriate. It's really only in English and maybe five other languages that gender-neutral pronouns are a real thing and even in these languages if you're not used to using neutral pronouns or reading them in common writing sounds like a mistake to begin with. It's generally just easier to automate the task based on names, and the library itself comes from a time when that wasn't a controversial thought. Lol

[–] Boomkop3@reddthat.com 1 points 3 days ago (3 children)

English, Dutch, German, Papiamento, Spanish

just from the top of my head. That can't be all of them?

[–] gerryflap@feddit.nl 3 points 2 days ago (1 children)

I'm Dutch and I have yet to see gender neutral pronouns etc that really work well. Unless you want to be called an "it", but I've only heard people use that to mock people. They/them works quite well, but we don't really have that afaik

[–] Boomkop3@reddthat.com 0 points 2 days ago* (last edited 2 days ago) (1 children)

It's a bit weird in dutch how part of the plural happens to be the same word. But hun/zij work fine. I'm dutch too, learn your own language m8

[–] gerryflap@feddit.nl 2 points 1 day ago (1 children)

I don't think "hun/zij" is invalid and I'll happily use it for someone if they want it, but what I mean is that it doesn't feel as natural to use it for a single person as they/them. They/them in English has a history of being used for singular people as well. Saying "someone lost their bag" is a pre-existing language feature. Unfortunately "iemand is hun tas verloren" doesn't sound as natural and I've never heard someone use it like that. It seems to be common to just use the masculine pronoun "z'n" in cases where the gender isn't known.

Again, I don't mean to invalidate anyone, I'd totally use these pronouns for a single person if they prefer that. It annoys me that our language doesn't have a clear neutral pronoun. But in my experience "hun" is exclusively plural whereas "their" has always also been in use as a singular pronoun next to its use as a plural pronoun.

[–] Boomkop3@reddthat.com 1 points 1 day ago

It sounds fine to me, and I've heard people use it that way. Mostly elderly though. And besides, it's not like this situation is very different from when they/them felt weird to a lot of people

[–] kazerniel@lemmy.world 6 points 3 days ago* (last edited 3 days ago)

https://en.wikipedia.org/wiki/Gender_neutrality_in_genderless_languages

English, Persian, Tagalog, Turkish, Hungarian, Finnish, Swahili, Armenian, Georgian of the more well-known languages

[–] palordrolap@fedia.io 2 points 3 days ago

Turkish has (and maybe related languages have) genderless pronouns, but I don't know whether that context shifts elsewhere in the sentence structure or not, and how necessary it might be in legal contracts.

[–] cjk@discuss.tchncs.de 4 points 3 days ago

HR software in Germany needs to know because we have to send this information to the government. Along with a lot of other information.

[–] lime@feddit.nu 5 points 3 days ago

i learned from a friend that used to work in banking that some countries have laws that basically make contracts and invoices void if they are not correctly gendered.

[–] savvywolf@pawb.social 43 points 3 days ago

Gender PHP extension is a port of the gender.c program originally written by Joerg Michael. The main purpose is to find out the gender of firstnames. The current database contains >40000 firstnames from 54 countries.

For anyone curious but not curious enough to go digging around.

[–] schnurrito@discuss.tchncs.de 37 points 3 days ago* (last edited 3 days ago) (2 children)

If you click around a bit more in that documentation, you can see that that isn't an enumeration of genders, it's an interface for answering the question which gender any given name belongs to. (For example, "Andrea" is understood as exclusively feminine for German speakers, but it's a common male first name in Italy.)

[–] PmMeFrogMemes@lemmy.world 7 points 2 days ago (1 children)

why on earth would such a weirdly specific thing be an official extension? lol

[–] verstra@programming.dev 3 points 2 days ago

Apparently, PHP has a low threshold for making something an "official" api

[–] Realitaetsverlust@lemmy.zip 9 points 3 days ago (1 children)

Ah, ITALY, my favorite gender

[–] ZILtoid1991@lemmy.world 5 points 2 days ago (1 children)

My favorite is true, but I also like gender 1901.01.01.

[–] MajesticElevator@lemmy.zip -1 points 2 days ago (1 children)

what are you talking about?

[–] thoughtfuldragon@lemmy.blahaj.zone 26 points 4 days ago (2 children)

Slightly less stupid than the list of constants would imply.

[–] T156@lemmy.world 5 points 3 days ago (1 children)

Only slightly though. It hardly seems practical to try and infer gender from names, in a way where it can't be obtained through historical records, or the user.

[–] skisnow@lemmy.ca 7 points 3 days ago (1 children)

For a given individual, sure. If you're trying to do some statistics over a whole group that you have no other record for, it could be useful.

[–] bss03@infosec.pub -1 points 3 days ago (1 children)

Sounds like those statistics output would the heavily biased by whatever process you were using to turn names into genders. In short, a bad idea.

[–] TangledHyphae@lemmy.world 3 points 2 days ago (2 children)

"Since the dataset isn't 100% perfectly annotated for analysis, we should give up the whole project entirely."

[–] Shanmugha@lemmy.world 2 points 2 days ago* (last edited 2 days ago)

No, since the dataset is bound to give nonsensical results, we search for sources that are more precise. Hint: "Andrea" already mentioned and Japanese names

[–] bss03@infosec.pub 1 points 2 days ago

"Since the data is incomplete, we decided to make shit up"

[–] Aatube@kbin.melroy.org 6 points 3 days ago

i've been trying to figure that out... why does each gender instance have a country getter? what's a "DSN to open"?

[–] coherent_domain@infosec.pub 17 points 4 days ago

Yes, my gender is Estonia.

[–] tauren@lemm.ee 3 points 3 days ago

Lol, this can't be real.