On 12/27/2017 1:00 PM, Atila Neves wrote:
I nearly always reorganise my code so that my `if` statements are positive precisely because of this. The only times I don't is when the negative branch is a lot shorter, so I "get it out of the way" sooner. Even then I try to rename the boolean value to not require negation.

I had a hard time convincing my colleagues at my previous job that this was an issue. Then again I had a hard time convincing them unit tests were a good idea, so there's that.

I once talked to a real estate agent who told me his proxy for a well-built house was whether the screw slots on the electrical outlets lined up or not.


Reply via email to