Friday, October 13, 2023

Sanity checks

If your software component is taking data from other components or sensors, that data should go through at least one sanity check. The world outside of your component is full of surprising errors, most of whom you won't be able to guess beforehand. A correctly working external component might get buggy after an update, don't assume that newer versions don't break existing functionality. Sanity checks prevent the simple ones from crashing your software, protecting you from embarrassment to even loss of life.

No comments:

Post a Comment