I am reading through the book Clean Code by Robert C. Martin. It is a book of advice on how to write more readable, and consequentially, more maintainable code. There is a chapter on writing good functions. His section on how small functions should be seems pretty extreme, and I wanted to hear the communities opinion on what he says. The following are some brief excerpts, followed by a couple examples.
Originally Posted by pg. 34Originally Posted by pg. 35There is another example found at this link of a team who tried implementing the small function advice in their java code base.Originally Posted by pg. 302
I have not made up my mind what I think about breaking functions apart like this. What do you guys think?