Jul 23, 2017 · 1 min read
First is that no amount of dev toolchain can prevent you from writing bugs. Otherwise everybody can become a good programmer.
The interesting thing here is one other big flaw. There are great costs for writing additional checks. I notice that catching all failure conditions usually makes code 2–3 times longer. If people are discouraged to put extra checks in the code, that will inevitably lead to using short cuts like the one described. Even if initially save, changes to the library or some other code later, may make the shortcut dangerous.
e.g. initially the library doesn’t have dangerousMethodX, later that method is added and makes Y% of the code depending on that library dangerous.