By bloid
via hans-eric.com
Published: Oct 31 2007 / 13:14
I just read a post by Uncle Bob that discusses the optimal length of a function. He quite correctly claims that the old functions-should-fit-on-a-screen rule lost its validity. He further states that “A well written function might be 4, 5, perhaps 8 lines long; but no longer.”



Comments
robse replied ago:
Yeah LOC per function is really not that important, MUCH more important to me is
-how usable is it, e.g. can it be used easy, does it return relevant information?
-how readable is it, e.g. does it a have meaningful, not misleading name
Following these guidelines I usually get very short and reusabe functions as well as readable code automatically.,
Voters For This Link (12)
Voters Against This Link (1)