functions should be small functions should be smaller than that! Functions should hardly ever be 20 lines long
Functions should do one thing. they should do it well. they should do it only!
One way you can know if a function is doing more than one thing is if you can extract another function from it with a name that is not merely a restatement of its implementation
The step down rule - the code should read like a top-down narrative. Every function should be be followed by the next level of abstraction one at a time