HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 50469 thumbnail
User 111696 avatar

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.”
  • 12
  • 1
  • 1298
  • 0

Comments

Add your comment
User 249616 avatar

robse replied ago:

0 votes Vote down Vote up Reply

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.,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (12)



Voters Against This Link (1)