If you think my code's checking carefully for the validity of the input makes it bloated and ugly, you just failed my interview.
Re:How to Pass a Programming Interview
by greenleafjacob on Tuesday March 08, 2016 @11:41PM
(#11250981)
There's a correct place for every class of input validation. The point is that you don't want multiple levels of input validation for the same thing. Most of what passes for "defensive coding" is superfluous. For example, if you are passing a pointer into a function, you don't need to reflexively null check. However, null checks are important.
Or the other way around: I can imagine someone thinking "this person spent ages on checking for invalid input; I bet their code is always bloated and ugly".
The problem is that programmers do this one way or the other based on personal preference, not because of actual differences in ability. Once you know that, it makes less sense to care one way or the other.