On writing small functions
A function should do one thing. If you can’t name it clearly, it’s probably doing too much. Small functions are easier to test, easier to read, and easier to replace. The overhead of a function call is negligible; the overhead of a confused reader is not.