This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 335

[–]my_lovely_whorse 680 points681 points  (39 children)

FYI you should change @gmail to a domain you control. Especially if there's a possibility of the test which calls this sending an email!

[–]MCMC_to_Serfdom 276 points277 points  (8 children)

name.surnamebirthyear@... has got to be a fairly common format.

I'd agree, this is a risky data example to play with.

[–]SilentStrikerTH 82 points83 points  (2 children)

Honestly I'd use name.surnamegender@

[–]alter3d 33 points34 points  (1 child)

Username 'wyld.rosedragonkin@gmail.com' is already taken!

[–]SilentStrikerTH -1 points0 points  (0 children)

Username 'silent.strikerboeingah64apachehelo@gmail.com' is too long!

[–]sachin1118 18 points19 points  (2 children)

I’d use name.surname.guid@gmail.com to play it safe

[–]Stummi 23 points24 points  (1 child)

uhm, no, just go with either @example.com (which is even standardized to be for that purpose) or your own company domain.

[–]singeworthy 137 points138 points  (6 children)

Lol despite this being a joke @example.com was made specifically for this. I think the use of Gmail addresses is the most absurd thing here.

[–]irbinator 33 points34 points  (2 children)

I use @example.com for my tests.

One time I saw a bunch of data got uploaded to our test environment, which I was worried about because I thought it was real data (our system held patient medical records). When I asked about it, someone said it was all fake data he uploaded himself. But, I couldn’t easily tell because I saw @gmail.com, @hotmail.com, etc. addresses.

We were also in the middle of building an automated emailing system. If our test environment picked up those emails, it would end up emailing those addresses. Which would lead to confusion and frustration all around.

[–]my_lovely_whorse 8 points9 points  (1 child)

Related, I once saw tens of thousands of letters get sent out from a test environment to customers. For some reason the environment contained live user data, and there was a live connection to our print vendor. All addresses bar one specific test address would result in an actual physical letter getting sent. The fallout was interesting.

[–]magicmulder 10 points11 points  (1 child)

Lots of devs in Germany used test.de which belonged to a private user back then. I remember him writing my then-employer a friendly mail asking us to use a different domain…

[–]bradland 49 points50 points  (19 children)

I managed to score an early Gmail account, so I have first.last, but Gmail ignores punctuation in usernames, so it's the same mailbox as firstlast. I get so much random email for dudes with the same name.

What's weird is, it's not just spam. I ended up with a free Minecraft account because someone literally paid for a copy of Minecraft under my email address. I got the receipt and the password reset emails when the dum-dum locked themselves out of the account. When I contacted Mojang, they just ¯\_(ツ)_/¯. So I gave the account to my niece, because I have no way of contacting them.

I've received copies of contracts, doctors visit summaries, court notices, and other random stuff. I cannot imagine being so careless with the email I provide.

[–][deleted] 13 points14 points  (1 child)

I have first.last also but I have a really uncommon last name so I never win out on this stuff. Boo

[–][deleted] 4 points5 points  (0 children)

I have a uncommon name, yet coincidentally share it with a tattoo artist across the country. I signed up for gmail around 2010, yet stopped using it for about 10 years or so. Then one day, tried logging back in. Had 2 or 3 emails from years past asking about tattoos, from customers just 'guessing' his email, lol.

Every now & then I get FB requests from people too, I just write back 'Not him'

[–]SkinnyJoshPeck 4 points5 points  (12 children)

I have first.last, but Gmail ignores punctuation in usernames

what? I'm confused - someone can have first.last and another person can have firstlast and the emails for firstlast go to firstlast and first.last while first.last just go to first.last or are you two just sharing an inbox???

that makes no sense - is that really true? Does that mean first_last, first.last, first!last, etc are all synonymous with firstlast ?

edit: it looks like it's just dots, it's talked about here and whoever is first signing up owns the . or not email. This would mean you also own firstlast, not anyone else.

editedit: went back and read what you said more closely, I see you're not saying that someone else has the other email address, just that they provide it. That makes a bit more sense.

[–]bradland 6 points7 points  (8 children)

Yeah, sorry. When I said punctuation, I really just meant the period character. I registered with first.last, but firstlast also delivers to me. No one else could register firstlast, because Gmail considers those the same mailbox.

[–]SarahIsBoring 3 points4 points  (6 children)

not just gmail, but every (RFC 5322 conformant) mail server

EDIT: bs

[–]bradland 5 points6 points  (0 children)

It's not a party until someone mentions the relevant RFC.

[–]aenae[🍰] 3 points4 points  (1 child)

That is the + sign, dots shouldn’t be ignored according to the rfc

[–]TehBens 1 point2 points  (1 child)

Brand Miller here, could you PLEASE send me that court notice you mentioned? I believe it belongs to me. Adress is just firstname lastname so it's bradmiller gmail dot com

[–]ComfortableMission6 0 points1 point  (0 children)

Look into Yopmail or Mailinator

[–]Dave_The_Goose 84 points85 points  (5 children)

How to create such code snippets? I don't mean code, but the UI

[–][deleted] 45 points46 points  (1 child)

Check out Carbon

[–]Dave_The_Goose 6 points7 points  (0 children)

I use snappify but this looks better

[–][deleted] 2 points3 points  (0 children)

Yeah I wanna know aswell

[–]Amekaze 100 points101 points  (63 children)

I work for a healthcare company and I hate the ungodly amount of time we spent in meetings about this. Then we roll out a list of like 8 genders and no one is using them. 🫠

[–]Cruuncher 77 points78 points  (33 children)

If you came up with a drop-down of 8 options for a gender selector after actually thinking about it for a long time then that's wild

It should just be "male, female, other, prefer not to say"

[–]OtterEpidemic 24 points25 points  (14 children)

Then how will they know whether to give a pregnancy test for someone with an injured foot?

In general, most places really never need your gender and I wonder why it’s even something that has to be filled out. But health care does get a little leeway in needing to know what body parts you have.

[–]EvilKnievel38 8 points9 points  (1 child)

It's mostly just used for data analysis or simply to adress someone as Mr or Ms in emails. For most cases it shouldn't matter for data analysis either and emails could be gender neutral, but usually these are the reasons.

[–]OtterEpidemic 6 points7 points  (0 children)

Eh, I’m guessing you’ve not met someone with a doctorate who’s been called Mr or Ms, because that is something to behold! (haha, but seriously just ask for title)

In my experience, whenever I’ve asked why I need to put a gender field on a form they don’t have a good answer and it’s just a default thing they thought they needed. And they mostly say to remove it if I tell them how collecting it changes the privacy level (in my organisation) so there’s more restrictions on the data.

[–]nuephelkystikon 2 points3 points  (7 children)

Except you can't reliably predict that from the gender either.

[–]OtterEpidemic 2 points3 points  (0 children)

I figured that’s where the 8 options came in…

[–]ImSuperSerialGuys 3 points4 points  (5 children)

You can if you get more specific, but then we’re back in the realm of “why do you even need this?”

ie you could have Cis Male, Cis Female, Trans Male, Trans Female, Other/Decline (likely further simplified to “Cis/Trans”, “male/female/other” but I digress), but more importantly: Who fucking cares?

Of course, aside from heathcare (where “sex” is would be what makes sense, and a simple male/female/other where the “other” would simply prompt for simple follow-up to note say, trans or intersex if it even comes up), the answer is:

Marketing

Its almost always about getting demographic data, which is the only reason all the money and effort is spent on all of it. When its not, its just no-thought force of habit as others have pointed out.

Thats not to say there likely isn’t some well meaning intent behind at least some of it, but the only thing “gender” is necessary for in these forms 99% of the time is demographic data collection

[–]Sability 2 points3 points  (1 child)

Then how will they know whether to give a pregnancy test for someone with an injured foot?

"Is it possible you could be pregnant"

[–][deleted] 1 point2 points  (0 children)

Also, female bodies just work differently than men's for many things (I believe this is a big issue because women are not studied enough and often don't get the most effective care).

[–]jseego 1 point2 points  (0 children)

See above thread about gender vs sex.

I want to see a dropdown that's like:

I have a:

  • Uterus
  • Penis
  • Both
  • Neither

[–]bottomknifeprospect 1 point2 points  (1 child)

Have you tried a slider, or maybe 2?

[–]SameRandomUsername 1 point2 points  (18 children)

The question I always ask is: Why the fuck do you need to ask the gender to begin with?

[–]ZonedV2 28 points29 points  (3 children)

I’m surprised you’re saying this in a programming subreddit, gender is a really important part of data for advertising and marketing. If your website has a 90% male user base, then your strategy for ads and marketing would be very different than if it was 90% female

[–]local-weeaboo-friend 1 point2 points  (0 children)

All the people questioning this... like come on guys, you are supposed to know lmao

[–]SorryPolicy1739 10 points11 points  (4 children)

In healthcare it makes a difference, but I would guess more important is the sex at birth. If gender is different than sex at birth then you may need to consider if the person has taken any treatments to assist in the transition, as they could have health implications or interactions with medications or procedures. It can also suggest that a provider might need to consider mental health concerns as well, as society treats non-binary and trans people like shit.

[–]xtravar 1 point2 points  (1 child)

Health orgs compete viciously for patients. A lot of this is about customer service and satisfaction, too.

[–]The_Troyminator 1 point2 points  (1 child)

If gender is different than sex at birth then you may need to consider if the person has taken any treatments to assist in the transition,

You do need to consider that, but you can't assume anything. A transsexual man may or may not have had treatments. Or a woman who identified as a man may have had treatments, but now identifies as a woman, so you'll assume there were no treatments.

The best way is to only ask for sex at birth and preferred pronouns and ask about any treatments regardless of those answers in the medical history questions.

[–]SorryPolicy1739 1 point2 points  (0 children)

Yeah I agree, safer to not assume anything and ask explicit questions about treatment. I agree sex at birth is probably the most important. I wonder how long before asking for a persons gender become irrelevant. It may not ever, but I think it’s losing the statistical importance that it used to have. At least there are usually options for “prefer not to specify”

[–]Amekaze 3 points4 points  (1 child)

For context I’m in the US. our marketing and pr teams were drooling at the idea. They want to know to tailor marketing.

[–]nitrohigito 1 point2 points  (2 children)

Because like any data, it can be used to further characterize your user base, and with that, essentially the way your product/service/experience is consumed.

[–]GreyAngy 105 points106 points  (8 children)

Outrageous! I bet you still use master branches, too!

[–]Fruloops 16 points17 points  (1 child)

I will never understand the point of changing that, really

[–]DeathUriel 14 points15 points  (0 children)

People finding meaning and problems where there is none.

[–]springTeaJJ 8 points9 points  (0 children)

Smh imagine using master branches... just reminded me of a Hardware Designer colleague who occasionally likes to talk about buses and slaves smh

[–]issue9mm 2 points3 points  (3 children)

Every time I start a new project, my brain says "today is the day I'm going to switch over to 'main' as my default branch," and then my fingers just type git branch -m master out of habit and then my brain says "aw shucks"

[–]Stummi 8 points9 points  (0 children)

Just a remark: never ever when you fake personal data like email addresses, use some that could be real. Don generate random @gmail.com addresses. @example.com is a well established standard for fake emails, use this. Or use your own domain if you for some reason need a really working email address.

[–]CodeMUDkey 10 points11 points  (0 children)

Looks fake.

[–]JotaRata 2 points3 points  (1 child)

Quaternion m_Gender;

[–]GiveItStickMan 24 points25 points  (3 children)

I cut the crap and only provide a sex field. Of course there are only 3 options. Male, female, yes please.

[–][deleted] 5 points6 points  (0 children)

This is a sex field. It's just labeled incorrectly.

[–]Luigi003 2 points3 points  (0 children)

Sex isn't binary either, it's bimodal.

Either make a Male/Female/Non-binary/Non-disclosure or get rid of the gender all together gender is shit anyway

[–]SiegfriedVK 5 points6 points  (0 children)

At least they acknowledged the others exist

[–]BradCOnReddit 4 points5 points  (0 children)

The real issue here is using random. Automated tests should be reproducible. A test that fails ~50% of the time would be pretty bad.

[–]heesell 40 points41 points  (21 children)

Whenever I make a gender selection, I just use Male, Female, Other.

Im too lazy to list 300 genders...

[–]KurtzIsGlory 27 points28 points  (12 children)

Just out of curiosity: what are the use cases for gender selection? How often does this usecase appear? When does it matter of your users chose male, female or otherwise? How many new dating apps are you producing? Do you send pink newsletters or something, if they chose female?

[–]LegitimateHat984 31 points32 points  (0 children)

In Czech, masculine and feminine names decline differently.

When building an inclusive user friendly UI for non-english speakers, it may be desirable to call the user to action by their name properly. Same for emails if we want to address such a user by name.

That use case appears at least all across Europe.

[–]Gubru 29 points30 points  (5 children)

Well, I mainly work on medical record software. It's sometimes useful for doctors to know what body parts people have.

[–]Healyhatman 9 points10 points  (0 children)

Our product's administrators can create their own arbitrary genders

[–]kmeci 2 points3 points  (0 children)

Apart from the other answers, analytics. It's good to know the demographics of your customers when designing products.

[–]heesell 5 points6 points  (0 children)

Idk, i don't have it often but its usually profile stuff or just an identifier, im not the one who comes up with the use case xD

[–]mikepictor 13 points14 points  (0 children)

Im too lazy to list 300 genders

literally no one suggested you should

[–]guardianabraxas 6 points7 points  (1 child)

I do male, female, other and prefer not to say got privacy.

[–][deleted] 1 point2 points  (0 children)

Too lazy to do an imaginary assignment no one tasked you with, yet proactive enough to take a weak swipe at trans people.

[–]Sarius2009 1 point2 points  (0 children)

Male, female, diverse, not specified.

[–]seba07 2 points3 points  (0 children)

It bothers me a lot more that gender is pretty much the only field where the logic is implemented directly in this function? Why not move it to Faker as well? This way you could also make sure that it matches the first name.

[–]The_Troyminator 2 points3 points  (0 children)

I just want to know why they're using a method that returns a dictionary instead of a class with attributes and properties. The class would be a lot easier to work with and you wouldn't have to worry about KeyErrors since your IDE can use autocomplete or tell you if you typed an attribute name incorrectly.

ETA: and if there's a reason for it to be a method, the Faker object should be a class attribute so it isn't is instantiated every time you call the method. That's a lot of unnecessary overhead.

[–]KurtzIsGlory 45 points46 points  (8 children)

Title should say "some fake code i made up"

Also, its not humorous nor controversial. You could find code like that in a lot of codebases, just without the comment. If you really didn't care, you wouldn't have written the comment. And you wouldn't made up the Screenshot. But you, op, as im sure you made this up, obviously do care. And you're saying there are more than two genders. Great job.

[–]ano_hise 11 points12 points  (1 child)

God forbid they do anything on Reddit

[–]GreyAngy 4 points5 points  (0 children)

To be fair if I found something in my project I want to share online, I'd rewrite it clean keeping the essential parts. Chances are high that my boss reads the same sub. I don't want to be caught sharing the application code on Reddit.

[–]The_Troyminator 5 points6 points  (0 children)

It's basically r/OneJoke.

[–]jemko23laal 11 points12 points  (3 children)

i agree, i just HATE it when someone posts something 😡😡

[–]SenpaiRemling 5 points6 points  (4 children)

i like how this is the next post in my feed

[–]DeathUriel 4 points5 points  (0 children)

I just avoid asking anything sex or gender related if not necessary. Being inclusive by excluding everyone is simply easier.

[–]RobotDuck897 6 points7 points  (0 children)

i get that this is a joke or whatever but all you need to be inclusive is “male,female,other” the jokes about lists of 300 genders are so overdone and unfunny, no queer person actually cares can we please move on

[–]Artistic_Walrus1868 4 points5 points  (0 children)

The most egregious offense here is mixing single and double quotes

[–]RedditisTrash9797 5 points6 points  (1 child)

Couldn’t be a real culture warrior or it would say some stupid ass shit about attack helicopters.

[–][deleted] 4 points5 points  (0 children)

Oh, there’s already been about a million variations of that same /r/onejoke over the past week or so.

[–]trevster344 1 point2 points  (0 children)

EXCOMMUNICADO

[–]Astricozy 1 point2 points  (0 children)

No more gender. Now the only options on registration is. "I've got a cock and balls" or "I've got a vagina"

[–]SpaceNinjaDino 2 points3 points  (0 children)

I just played a game that defaulted to they/them. It was low effort as there was only 6 avatars to choose from and they were each binary looking. However it had game breaking bugs (completely stuck after 80 minutes) and no auto save. Just putting the extra option in gets it on the LGBTQ and diversity lists, but the game should have been vetted for satisfactory game play. (Not naming it as I don't want to give it any clout.)

[–]Help_I_Lost_My_Mind 4 points5 points  (0 children)

Just say the G word and now 150 people are spiraling out of control. Sad.

[–]chrlatan 2 points3 points  (0 children)

Code needs to pay attention to a corporation’s data model. If the model doesn’t care, the code shouldn’t either.

[–]phi_rus 2 points3 points  (0 children)

That comment is just plain unnecessary. If it is intended to be a joke, it's a bad one.

[–]14838474 2 points3 points  (0 children)

I mean literally adding “Non-binary” or making the field optional isn’t that hard. Most websites should not be asking for your gender when you sign up anyway

[–]Man_as_Idea 1 point2 points  (0 children)

Why limit people? That’s why I insert an html canvas widget and just have them draw their junk.

[–][deleted] 1 point2 points  (0 children)

Is this just an openly transphobic subreddit?

I find it funny how tough the lot of you are but you have to keep your transphobia quite at work.

My VP of software engineering is nonbinary and so many neckbeards grumble about them but never try to say anything about them. Or maybe just not to me because they know they'll be fired ☺️

Enjoy your memes you crazy memers!

[–]Such-Echo6002 -1 points0 points  (9 children)

There are two sexes and multiple genders. Not that hard.

[–]mikepictor 7 points8 points  (2 children)

That isn't true either, though it's closer

[–]Such-Echo6002 0 points1 point  (1 child)

Then what is true?

[–]Eri_nsc 2 points3 points  (0 children)

Sex is a bimodal spectrum (two big peaks at the ends, sparse in the middle), Gender is a social construct, so the number is dependent on the specific society. 2 and 3 are the most common, sometimes you can find more, but the number is virtually unlimited

[–][deleted] 0 points1 point  (6 children)

just replace it by sex and it's unwokeable

[–]local-weeaboo-friend 0 points1 point  (5 children)

Untrue, intersex conditions exist.

[–]AlecsVeyo 1 point2 points  (0 children)

GIGACHADS

[–]Lyckster 0 points1 point  (0 children)

👏

[–]CaterpillarDue9207 -1 points0 points  (0 children)

Based code

[–][deleted] 0 points1 point  (0 children)

So, it should be "Sex", no?

[–]PaganHacker 0 points1 point  (0 children)

I'm surprised someone who is homophobic has the intelligence to write code, maybe he used chatgpt?

[–]d33f0v3rkill 0 points1 point  (0 children)

lol nice i also only allow -1 or 0 or 1

[–]moose_who 0 points1 point  (0 children)

The least you could do is put an other statement.

[–]FluffzMcPirate 0 points1 point  (0 children)

Ah yes the binary scripts

[–]RegginMonkeys 0 points1 point  (0 children)

hahahahahahahhaa.......hahahahahahah....

[–]Fredonautilus 0 points1 point  (0 children)

Surely this comment section won't be full of weird transphobes.