A different opinion: Clean Code In the book Clean Code1, Robert Martin argues that functions should be broken up based on length alone. He says that functions should be extremely short, and that even 10 lines is too long: The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.... Blocks within if statements, else statements, while statements, and so on should be one line long. Probably that line should be a function call.... This also implies that functions should not be large enough to hold nested structures. Therefore,
...more
This highlight has been truncated due to consecutive passage length restrictions.