1001: Keep Methods Smaller Than Your Head

Share on:

Discussions about ideal function lengths are never-ending. My rule of thumb is that the ideal function should fit into your head. If it is longer, it will not fit there, and therefore you cannot reason about it.

To determine if the function is too long, place your head next to the screen, and compare its length with the size of your head. In the ideal case you should be taking into account only the part where is your brain located.

1000: Use Search-oriented ProgrammingKeep Files Smaller Than You: 1002