
Defensive coding is the practice of making your code error-resistant. The idea is to make your code handle unexpected circumstances gracefully, rather than just going wrong or crashing. It’s a pretty broad topic, but in its simplest form means checking for invalid values or references before attempting to do things. For example, consider the following….
Read More