Hacker News new | ask | show | jobs
by jamesbritt 5517 days ago
Write small chunks of code: a function over 50 lines is probably really hard to read. This is a rule of thumb, not a commandment, but I found it to be true in at least > 51% of cases.

Peter Seibel, in Practical Common Lisp, has a footnote about this:

"A friend of mine was once interviewing an engineer for a programming job and asked him a typical interview question: how do you know when a function or method is too big? Well, said the candidate, I don't like any method to be bigger than my head. You mean you can't keep all the details in your head? No, I mean I put my head up against my monitor, and the code shouldn't be bigger than my head."

http://www.gigamonkeys.com/book/practical-a-simple-database....