Subject: Re: Time to update KNF?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Mike Cheponis <mac@Wireless.Com>
List: tech-kern
Date: 01/19/2000 12:05:57
Well, I believe these shoot-from-the-hip ambushes of academic research do 
us no good.

I therefore phoned Professor Ben Shneiderman at UMD, a co-author of the
study in question.  He's a wonderfully congenial and bright guy!

He said (paraphrasing):

1) The "eyescan" distances of 2- vs 8-indents is significant.  There is time
   lost with the more distance the eye must go.  (This result, interestingly,
   holds for more than code, too).

2) With 8-spaces, you need to break lines more often, and line breaks are a
   bad idea, because they cause more scrolling, and scrolling takes time.
   (This also is appropriate for web pages; for example, a good web page is
    Yahoo's).

3) Interestingly, very_long_variable_names_like_this_one are a problem, too
   because they also force more line breaks.  So perhaps the unix penchant
   for brevity (can you spell "creat" or "mv" ? ;-)  ) is useful.


There is good evidence for reducing the spacing to 2-4, and I'd like to 
see KNF changed.

As one pithily said, "Hello, it's 2000!"  Please, let's fix KNF.

(I agree that there are other parts of KNF that need updating, too.)

-Mike

KNF is at:

http://cvsweb.netbsd.org/bsdweb.cgi/sharesrc/share/misc/style?rev=HEAD&content-type=text/x-cvsweb-markup



On Wed, 19 Jan 2000, der Mouse wrote:

> > What I fail to understand is that if we have data that supports that
> > 2-4 space indents produces more comprehensible code,
> 
> If we did, yes, you might have a point.
> 
> But what we have is a study that shows that code written at 2-4 space
> indents is more comprehensible than that same code mechanically (ie,
> stupidly) reformatted to six-space indents.
> 
> For a sample of people including supposed experts who saw nothing wrong
> with a zero-space indent (ie, unindented) version.
> 
> A study which openly admits that it started out with the intent of
> showing that small indents are better, and doesn't say how many
> methodologies and data sets they had to throw away before they got the
> result they wanted.
> 
> In short, I see no reason to think the study in question has any
> relevance to NetBSD KNF.
> 
> 					der Mouse
> 
> 			       mouse@rodents.montreal.qc.ca
> 		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
>