#26 Don’t add Methods and Classes that you don’t need.

This should be obvious, but it is a rule that is violated quite often. This is one corollary to the YAGNI (You Aren’t Gonna Need It) Principle.    This post discusses that there is a proper time to do things, and it is a waste to do them ahead of time. Continue reading

#19 Reduce Cognitive Load

Deeply nested IF statements can be hard for the brain to unwind and process correctly.  In many cases, the branch statements are selecting for a single, or a small set of conditions for which processing will be done, and outside of those conditions nothing will be done.  Given this, the code can be structured to avoid complexity, make it easier to understand, and less costly to maintain. Continue reading