What is a sanity check?
A sanity check is a quick, rough test to make sure something seems reasonable or works at a basic level. It’s not a full, detailed test, but it helps catch obvious mistakes early.
Why do we use it?
- To save time by catching big errors soon.
- To build confidence before doing more work.
- To verify that ideas or results look sensible at a glance.
Simple examples
- Math: If you multiply 7 by 8, a quick sanity check might be: 7×8 should be around 56. If you get 100, something is off.
- Programming: If a program is supposed to add two numbers, you can quickly test with small, known values like 1 + 1 = 2 to see if the output makes sense.
- Science: If a plant needs water, and the soil is bone-dry, a sanity check is to see if watering makes the plant look a little healthier.
How to do a quick sanity check
- Ask: Does this result make sense given what I know?
- Check for obvious mistakes or typos.
- Test with simple, known values or a quick cross-check.
- Compare to a rough estimate or common sense.
Tips for students
- Use sanity checks as a first step, not the final answer.
- Explain your checks in writing so you remember what you did.
- When something doesn’t pass a sanity check, investigate further rather than ignoring it.