Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday conversation, we can simply drop the idiom completely and say something akin to Let's check to ensure everything is working.

If this doesn't help, consider one of these many alternatives. I'm prone to using the first two in my own code, though these are gleaned from many developers:

  • Quick check
  • Initial check
  • Confidence check
  • Coherence check
  • Soundness check
  • Calibration check
  • Rationality check

One to avoid? Health check. Along with again tieing in discussions of health and disability, this phrase already carries a lot of previous implications from other products that may obfuscate what you're actually trying to say.

@arichards-unity
Copy link

arichards-unity commented Nov 13, 2019

I think Rationality Check is a great alternative, thanks!

@pelevesque
Copy link

pelevesque commented Jul 5, 2020

sanity check -> cleanliness check
sanitizer -> cleanitizer or cleaner

@paulirish
Copy link

paulirish commented Aug 7, 2020

I've been using "Gut check" also, though admittedly it's a bit more vernacular

@richvle
Copy link

richvle commented Oct 7, 2020

I asked my wife to do a "sanity check" on a procedure I was doing the other day. She's doesn't know what that is, and thought I said "Sandy Check" because our friend Sandy (another software engineer) sometimes help me to check my work as well. So to avoid using ableist language, how about something that sounds like what we are familiar with, so it can easily be replace. And it has an easy story behind it.... like..... Sandy Check. I've submitted it to Urban Dictionary already and if it gets more regular usage, I can get it submitted to the Webster and Oxford dictionaries.

@micseydel
Copy link

micseydel commented Nov 21, 2020

Thank you for sharing this!

@dkadish
Copy link

dkadish commented Dec 3, 2020

Thanks for this! Just what I was looking for. Appreciate all of the alternative options!

@micseydel
Copy link

micseydel commented Dec 3, 2020

Came across this later - "reality check" I think can be good too.

@seanmhanson
Copy link
Author

seanmhanson commented Dec 3, 2020

Came across this later - "reality check" I think can be good too.

@micseydel
This one I'll weigh in on. I'm close to some folks who experience hallucinations, and "reality check" is a rough phrase, since it comes from alienating people with Bipolar I mania, Schizoaffective, Schizophrenia, Narcolepsy, etc. I am totally grateful for the comment, because this one totally evaded my radar, and I am pretty sure when I wrote this gist, I was pretty unaware of these associations. Thanks for bringing it up! I may edit it into the original when I'm not on mobile, if that's okay!

@kaitlingee
Copy link

kaitlingee commented Dec 3, 2020

I strongly advise against "Reality check", "Sanity check", and any variation of or play on "sanity/reality check" as it does, as @seanmhanson acknowledges, ostracize a population of people diagnosed with a real brain disease that, when untreated as is often the case, attacks their sense of reality/sanity through audio and visual hallucinations. I say this as someone who is close to an individual diagnosed with paranoid schizophrenia, which is just one example of a more severe subset of mental illness known as "serious mental illness".

It's great to see this thread coming back to life as folks become increasingly mindful of the language being used in everyday speech. Thank you for keeping the conversation going.

@kaitlingee
Copy link

kaitlingee commented Dec 3, 2020

@richvle - I applaud you for taking initiative to submit a new entry in effort to get a new term to catch on, however I'm afraid this risks more harm and confusion than intended.

"Sandy check" is more likely than not problematic for two reasons:

  1. Most notably, it is a wordplay on the already problematic term "Sanity Check". A newer term with roots in a problematic term remains problematic. See my above comment and do let me know if you have questions!
  2. It's forcibly anecdotal. "Sandy check" is derived from a single individual's experience in having a "Sandy" to check their work, but it would be presumptuous to think that rest of the industry knows someone named "Sandy" to check their work, so it's more difficult for others to relate to.
  3. Lastly, because it sounds so close to "Sanity check", others who hear or rather, mis-hear "sandy check" are more likely to use, "sanity check," one of the problematic term from which we're trying to move away.

Would you be willing to remove the "Sandy check" entry from urbandictionary and anywhere else where it may have been published?

Thank you again for your efforts to help make the industry a more inclusive one!

@micseydel
Copy link

micseydel commented Dec 12, 2020

@SeanHanson my thinking was that "reality check" would be nicer than "rationality check" because the first is checking in with something external, whereas the second one I would think would be more stressful for someone who is struggling with their internal stuff. Why would the latter be preferred? (Thanks for creating this by the way! I definitely want to learn what is best for folks.)

@gerardmarquina
Copy link

gerardmarquina commented Dec 19, 2020

Coherence check is a perfect replacement for when "sanity check" would be used for unit testing. I also thought about "Assertion check" but that becomes confusing with languages that have an "assert" feature.

@lychaxo
Copy link

lychaxo commented Apr 7, 2021

I'm going to say I actually really dislike "coherence check." As someone who has seen the inside of a mental facility, I've heard nurses and doctors say "patient not coherent" more times in my life than I care for. I've heard it way more, as a mental health patient, than language about "sanity."

Soundness or consistency check can be pretty good as an easy substitution. I know someone people have said "consistency check" feels like something more sophisticated and shouldn't be used for quick checks that don't actually ensure data is consistent -- gut check might be good for that, as suggested above. Or, just be more specific: parameter check, bounds check or bounds check, string check, value check, etc. "Validity check" is a maybe -- I'm not sure if individuals who are not able-bodied or need an aide for common tasks still get called "invalids" or not (I used to hear it as a geriatric medical term a lot, but I'm not sure if there are negative connotations for the patients and their families.)

@pelevesque
Copy link

pelevesque commented Apr 7, 2021

reliability check or stability check?

@calittle
Copy link

calittle commented Apr 14, 2021

+1 for confidence check. As in, I'm confident that this bit of code will actually wo--whoops, never mind.

@ShadezTP
Copy link

ShadezTP commented Jun 5, 2021

Hey, look. I'm gonna say this once. I Hallucinate, I have been diagnosed with schizophrenia. Not once have I, or anyone else I know with similar mental illness within my profession, had any qualms with the phrase "sanity check". Seriously, look up the word "sanity". Please don't baby people, please don't single people out so you can white knight them so you feel all good an warm inside. You are part of a problem.

@seanmhanson
Copy link
Author

seanmhanson commented Jun 11, 2021

Please don't baby people, please don't single people out so you can white knight them so you feel all good an warm inside. You are part of a problem.

I'm glad this isn't an issue that impacts you negatively, and wish I could say the same for so many people I've met! For many years I've been a trained facilitator in a major support group program here in NYC and help out also with risk assessment and harm reduction, especially with folks who haven't yet been able to find therapy and/or psychiatry. Our collective diagnoses span depression, bipolar disorders, OCD, PTSD, psychosis, schizophrenia/schizoaffective, dissociative identity disorder, depersonalization-derealization disorder, eating disorders, and more, and I live with a handful of these myself that at times skew my perception of reality and have made it hard to find acceptance in engineering communities, especially amongst open-source.

All that is to say, no white knighting intended. This gist was originally written after the topic came up over, and over, and over amongst the communities I am in, across working in D&I in several companies, in online communities of disabled and chronically ill software engineers, at conferences and through giving talks, and often alongside examination of other terminology like "Blacklist/Whitelist", "Master/Slave", etc., that is outdated and harmful to marginalized folks trying to find a place in tech. As a result, I'm not inclined to remove this or the perspectives folks are posting as comments, as it's also meant to amplify all those people and events that caused me to post this. You're welcome to ignore it though, or encourage other ways to help address concerns like these.

@fuzzymo
Copy link

fuzzymo commented Aug 2, 2021

I'm a bit late to the conversation here but I did want to chime in. As someone who is neurodivergent (autistic and ADHDer) and has dealt with mental health issues (both my own and those I care about), I agree about "sanity check." I am less sure about "reality check" but I certainly get why it should be avoided.

However, I don't agree with "health check." It is not singling out individuals or groups. The idea (maybe just to me) is that a health check is a holistic view of the "organism." Just as one should go to their primary doctors regularly to get check-ups (blood work, eye tests, hearing, dental, etc), a "health check" is meant to look for parts of the organism that need help/attention to be able to carry out their intended purpose effectively. It has been applied a bit more broadly than is needed, I will grant that.

@tzual
Copy link

tzual commented Aug 23, 2021

very late to the party, but still relevant 4 years later.

my suggestions in order of preference:

  1. happy/sound tests - implies the functionality under test is only used correctly
  2. main/primary tests - implies the functionality under test is the most important
  3. basic/rudimentary tests - implies the functionality under test is the most simple (to use/test/understand)
  4. core/essential tests - implies the functionality under test is mandatory for the program to work

we can combine happy with the other three, creating:

  1. happy main tests - implies the functionality under test only considers correct usage of the most important functionality.
  2. happy basic tests - implies the functionality under test only considers correct usage of the most simple to use functionality.
  3. happy core tests - implies the functionality under test only considers correct usage of the functionality that is mandatory for the program to work.

combining any of main, basic, and core with each other might make sense, but I couldn't think of a useful combination.

IMO, sanity check is a very loaded term that can have very different meanings for different people, teams, and companies, and that is only considering the professional interpretation, rather than the mental health interpretation. as such, I think we can be more accurate and use other terms that better define our goals in testing. the terms I suggested can express slightly different things and can even be used together to describe intentions more accurately.

in the context of math, a sanity check is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true.

in the context of programming, a sanity check is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis, to assure that part of the system or methodology works roughly as expected, which is a slightly different meaning.

to the best of my knowledge, sanity testing roughly means testing the happy path of the basic functionality. it is more comprehensive than smoke testing and less comprehensive than other types of testing.

so the general escalation of the testing suites is as such:

  1. smoke testing: see if you can start using it.
  2. sanity tests happy testing: see you can use it correctly.
  3. ...more comprehensive or focused tests.

also, if we want to contrast happy to express tests that check incorrect usage, we might use sad, but shouldn't really because happy stems from happy path, and sad path is not a generally used term in the industry, so perhaps we can use faulty? but that's out of bound for this discussion. maybe next time.

that's all from me. I truly wish this highly important topic will get the attention it deserves. let's talk about it some more!

@tzual
Copy link

tzual commented Aug 24, 2021

another suggestion:
sanity foundations test
this might align more closely with the original intent of the phrase sanity check, which is to see you are operating under an acceptable frame of mind. but I feel it diverges a bit from the contemporary meaning, which is to see that the simplest stuff works to justify escalating to more complex testing suites.

@jesslark
Copy link

jesslark commented Sep 12, 2021

I've been trying to replace "sanity check" in my own vocabulary for a while. I really appreciate this discussion.

What are we really saying when we suggest our code needs a "sanity check"? It seems like we are saying that we have a set of assumptions about the code, and we are wanting to verify that those assumptions are correct. So what if we say more specifically what we mean?

"Can you do a quick assumptions check on that?"
"I am verifying my assumptions, the PR should be ready soon."

Assumptions check
Verify assumptions

@jonnysmith1981
Copy link

jonnysmith1981 commented Jan 21, 2022

I agree with the sentiment here but, for the same reasons mentioned in the initial gist, I would be loathed to use a lot of the synonyms suggested, including:

  • Stability
  • Coherence
  • Confidence
  • Rationality

The antonyms of these words carry just as much negativity and (mostly) unintended ableism as "sanity".

@tzual
Copy link

tzual commented Jan 21, 2022

I have two more suggestions.

  • preliminary tests
  • base tests

both can expresses the same sentiment as sanity in a clearer more direct manner, and to the best of my knowledge without any baggage associated with them. personally I prefer "base" solely because it is a shorter word but I think either will be better than "sanity" at least.

@elsandosgrande
Copy link

elsandosgrande commented Apr 27, 2022

I'd say that a good substitute is “integrity verification”.

@GeoGriffin
Copy link

GeoGriffin commented Jun 24, 2022

MVP (minimum viable product) is used in describing features for a product. Could this be used for this sort of basic testing?
MVP Test would check minimum viable functionality for a product. Can we connect to the endpoints for a service. Does the service connect to the database or other external resources. Does the home screen display for a UI application.

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