Murphy's Law states: "Anything that can go wrong will go wrong."
Murphy's Law is often applied to software systems and hardware devices. When designing and building systems, it's important to think about all the possible ways a system might fail - because at some point those things will probably happen. Defensive programming is the practice of writing code that anticipates problems and handles them before they can cause bigger problems. One principle that is often applied in software is to fail fast when problems arise. The sooner bad input is detected, the less damage it can cause, the fewer system resources are consumed dealing with it, and the faster the user can correct the issue.
Murphy's Law(Wikipedia)Edit this page on GitHub