79
leirbag
8y

I was refactoring the most underneath part of our server code and just found 'getUserGender' method. I think for a second:We don't have this info. Look inside:
return name.endsWith('a')?"female":"male";

πŸ˜‘ it's surprising how much it works in Brazil.

Comments
  • 4
    Isn't that traditionally the letter used to identify something as feminine or not? What a hack indeed...
  • 1
    @codeclod yep. Like the word 'cachorro' male for Dog and 'cachorra' is the female. Fucking trickπŸ˜‚ πŸ˜‚ πŸ˜‚ πŸ˜‚
  • 2
    Hahahaha. So true. Will also work in most other south American countries
  • 5
    Hah, that's brilliant. The only Brazilian I know is in fact called Gabriella. Afaic, that's a 100% success rate.
  • 1
    Works with most German names as well, but not all.

    Successes would he Hanna, Johanna, Anna, Elena, Thea, Sina

    Errors would be Hannah, Jenny, Jennifer, Marie
  • 0
    Will work for most Indian names too
  • 0
    in all slavic languages as well
  • 0
    in romanian also.
  • 0
    Albanian also. I hate it that I didn't come up with this haha
  • 0
    Romania has a few names that would get through : Carmen, Zoe, Ingrid, Iris... Etc.
  • 0
    Should work in Russia. I believe last name too.
  • 1
    Works on Muslim names too.
  • 2
    Am I the only one here seeing way too many corner cases?
  • 1
    http://studentsoftheworld.info/penp...
    Pretty high success rate indeed!
Add Comment