Functions
Functions are the first line of organization in any program.
Small!
The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.
Do One Thing
Functions should do one thing. They should do it well. They should do it only.
Switch Statements
It's hard to make a small switch statement. Even a switch statement with only two cases is larger than I'd like a single block or function to be.