| Store | Cart

Grouping code by indentation - feature or ******?

From: Roy Smith <r...@panix.com>
Tue, 29 Mar 2005 08:35:47 -0500
Antoon Pardon <apardon at forel.vub.ac.be> wrote:
> 1) The stuff doesn't has to be spread over multiple pages. One>    can have 2 functions, each about three quarter of a page.>    The second function will then cross a page boundary.

The advice "don't write a function longer than a page" is as good advice 
today as it was 30 years ago, but the definition of "a page" has changed.  
In the old days, "a page" pretty much meant 66 lines, because that's what 
fit on a standard sheet of line printer paper (minus a few lines for 
headers and footers).

These days, "a page" pretty much means "a window", which are scrollable so 
your function always starts at the top of one.  Of course, there is no 
standard for how long a window is, but...

> 2) How long is a page? I have worked in differend kind of>    environments where the number of lines per page could>    differ from 35 to 70.

I would say 35 to 70 lines seems like a reasonable limit for how long a 
function should be :-)  The system I'm working with now is fill with 500 
line functions and 700 line functions.  Believe me, 70 lines would be a 
blessing compared to that.

The bottom line is not a rigid line count.  The goal is to be able to 
understand what the function is doing in one gulp.

Recent Messages in this Thread
Tim Tyler Mar 25, 2005 08:11 am
Peter Otten Mar 25, 2005 08:48 am
Skip Montanaro Mar 25, 2005 12:52 pm
Tim Tyler Mar 26, 2005 03:30 pm
Antoon Pardon Mar 25, 2005 12:56 pm
John Roth Mar 25, 2005 01:22 pm
Antoon Pardon Mar 25, 2005 02:26 pm
Antoon Pardon Mar 29, 2005 07:57 am
Antoon Pardon Mar 29, 2005 07:47 am
Roy Smith Mar 29, 2005 01:35 pm
Kent Johnson Mar 25, 2005 01:51 pm
Carl Banks Mar 25, 2005 02:15 pm
Antoon Pardon Mar 25, 2005 02:41 pm
Diez B. Roggisch Mar 25, 2005 03:02 pm
Antoon Pardon Mar 25, 2005 03:16 pm
Diez B. Roggisch Mar 25, 2005 03:33 pm
Antoon Pardon Mar 29, 2005 07:34 am
Diez B. Roggisch Mar 29, 2005 09:43 pm
Rocco Moretti Mar 25, 2005 05:21 pm
Tim Roberts Mar 26, 2005 09:03 am
Peter Otten Mar 26, 2005 10:29 am
Kent Johnson Mar 26, 2005 12:09 pm
Skip Montanaro Mar 26, 2005 12:41 pm
Peter Otten Mar 26, 2005 07:02 pm
Kent Johnson Mar 27, 2005 02:43 am
Peter Otten Mar 27, 2005 05:42 am
Reinhold Birkenfeld Mar 27, 2005 05:08 pm
projecktzero Mar 25, 2005 02:43 pm
Larry Bates Mar 25, 2005 04:15 pm
Ivan Van Laningham Mar 25, 2005 04:39 pm
James Stroud Mar 25, 2005 07:31 pm
Robert Kern Mar 25, 2005 07:38 pm
Bill Mill Mar 25, 2005 07:47 pm
Larry Bates Mar 25, 2005 09:56 pm
Jeremy Bowers Mar 26, 2005 05:50 am
Ron_Adam Mar 26, 2005 05:36 pm
Mike Meyer Mar 26, 2005 10:52 pm
Terry Reedy Mar 25, 2005 06:42 pm
Paul McGuire Mar 26, 2005 06:13 am
Javier Bezos Mar 26, 2005 09:02 am
Tim Tyler Mar 26, 2005 03:42 pm
Jeremy Bowers Mar 26, 2005 11:17 am
Jacob Lee Mar 27, 2005 07:00 am
Javier Bezos Mar 27, 2005 03:30 pm
Reinhold Birkenfeld Mar 27, 2005 05:11 pm
Javier Bezos Mar 27, 2005 06:04 pm
Myles Strous Mar 30, 2005 06:08 am
Myles Strous Mar 30, 2005 06:13 am
Javier Bezos Mar 30, 2005 06:00 pm
Greg Ewing Apr 01, 2005 06:05 am
Steve Holden Apr 01, 2005 11:54 pm
Javier Bezos Apr 02, 2005 07:43 am
Javier Bezos Mar 28, 2005 06:05 pm
Reinhold Birkenfeld Mar 27, 2005 05:10 pm
Scott David Daniels Mar 27, 2005 09:41 pm
Terry Reedy Mar 30, 2005 01:55 am
Tim Roberts Mar 30, 2005 06:48 am
James Stroud Mar 26, 2005 11:36 pm
Terry Reedy Mar 25, 2005 06:41 pm
Messages in this thread