styleguide/inclusive_code.md
Our Code of Conduct under "Be respectful and constructive" says:
Each of us has the right to enjoy our experience and participate without fear of harassment, discrimination, or condescension, whether blatant or subtle.
Emphasis is added: unnecessarily exclusive code is discriminatory and condescending, and reading biased code isn't enjoyable.
Some points in our code, documentation and comments contain needless assumptions about the gender of a future reader, user, etc. Example: "When the user logs into his profile."
These are only suggestions. You make the call.
Things to avoid:
Cases that are likely fine to leave alone include:
How to change the remaining awkward intrusions of gender:
For a long list of changes, see this bug. Some examples:
git grep -wiEIl \ '(he)|(she)|(his)|(hers)|(him)|(her)|(guy)|(guys)'
/\<he\>\|\<she\>\|\<his\>\|\<hers\>\|\<him\>\|\<her\>\|\<guy\>\|\<guys\>|\<man\>\c
Terms such as "blacklist" and "whitelist" reinforce the notion that black==bad and white==good. That Word Black, by Langston Hughes illustrates this problem in a lighthearted, if somewhat pointed way.
These terms can usually be replaced by "blocklist" and "allowlist" without changing their meanings, but particular instances may need other replacements.
For a long list of changes, see this bug. Some examples:
This document is based on an internal Google document by Rachel Grey and others, which can be found here (sorry, Googlers only).