Skip to content

Instantly share code, notes, and snippets.

@garbados
Created July 27, 2014 23:07
Show Gist options
  • Save garbados/f82604ea639e0e47bf44 to your computer and use it in GitHub Desktop.
Save garbados/f82604ea639e0e47bf44 to your computer and use it in GitHub Desktop.
Falsehoods Programmers Believe About Gender
  1. There are two and only two genders.
  2. Okay, then there are two and only two biological genders.
  3. Gender is determined solely by biology.
  4. Okay, it’s mostly determined by biology, right?
  5. Please tell me it’s determined by DNA.
  6. Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
  7. Once gender is set, it never changes.
  8. Even if the gender can change, it will only change from the one value to the other value.
  9. Only one gender can be “active” at the same time.
  10. We’re tracking gender now, so we’ve always tracked it.
  11. I only need to be concerned with human gender.

Source: http://www.cscyphers.com/blog/2012/06/28/falsehoods-programmers-believe-about-gender/

@norwd
Copy link

norwd commented Dec 28, 2024

I’ve distilled these falsehoods down to the following:

  1. Gender is bool
  2. Gender is enum
  3. Gender is const
  4. Gender is static
  5. Gender is public
  6. Gender is readonly

(the rest of the falsehoods listed in this thread are valid but not programmer specific)

Edit: Typo "Liston" instead of "listed in" 🤦

@thomasjwebb
Copy link

I've seen people use a boolean for gender. True = male and false = female, or vice versa.

Haha yeah that's definitely something I can picture a programmer who thinks they're being clever doing. No ability to even encode "unknown" and unclear unless it's named something like is_male which would lump unknown and non-binary with female.

(the rest of the falsehoods Liston this thread are valid but not programmer specific)

I would argue that my point about there not being a single gender value would also be relevant to programmers and not necessarily covered by this list. You could say that's just point #2, but practically speaking it's not that gender should be a python Dict but that we shouldn't assume database entries or struct instances are describing different people just because the gender fields are present and don't match.

@norwd
Copy link

norwd commented Dec 28, 2024

(the rest of the falsehoods listed in this thread are valid but not programmer specific)

I would argue that my point about there not being a single gender value would also be relevant to programmers and not necessarily covered by this list.

Of the original 11 falsehoods, only 1. There are two and only two genders (i.e. Gender is bool), 7. Once gender is set, it never changes (i.e. Gender is readonly), and 11. I only need to be concerned with human gender, (which I've mentioned that in a previous comment) could be seen as developer specific. The rest are just falsehoods that everybody (in the 21st century anyway) believes.

...we shouldn't assume database entries or struct instances are describing different people just because the gender fields are present and don't match.

That's a valid point that isn't covered in my reduction. I'll have to think of a way to fit it into the "Gender is keyword" format. Maybe "Gender is IComparable<Gender>"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment