Paranoid programming
<programming> A programming style that tries to prepare for the worst external conditions, including incorrect input, resource limitations, hardware and software failure and even
can't happen errors, to the fullest possible extent.
While some believe in the motto "professional programming is paranoid programming", the expression usually has the connotation that the efforts are unnecessary or too costly ("Maybe this code is just paranoid programming, but I think it is necessary to avoid a possible overflow condition".)