[net.lang.c] Style Flambe

cottrell@nbs-vms.ARPA (02/01/85)

/*
Mark Terribile replies to my plea for form feeds: 

> 	And please DON'T put the maddog form feeds in.  White space
> ought to communicate something just as much as code.  With the proper
> use of white space and the proper and consistant placement of blocks
> of code and the conditions that govern them, program structure is
> communicated ... but FORMFEEDS introduce spacing of random lengths
> in synchronization NOT with the structure of the program but rather
> in synchronization with an ARBITRARY and IRRELEVANT event -- the
> passing of a fold in the paper on which the listing (if any) may be printed.

Some people rarely make listings but I do. I regard a paper fold as VERY
significant if I have to keep flipping the maddog page to see the other
half of a IF or WHILE. Opinion being what it is, this doesn't bother
everyone, including my own brother. However, the minute I get my hands
on a program, that's what I do. Funxions should be small enuf to fit
on a page, just as lines should be small enuf to fit on a tty. I often
put many funxions on a page if they fit in order to save paper.
*/

Dave Nelson <daven@LLL-CRG.ARPA> (02/01/85)

<>
Regarding formfeeds and how big functions SHOULD(?) be:

> Some people rarely make listings but I do. I regard a paper fold as VERY
> significant if I have to keep flipping the maddog page to see the other
> half of a IF or WHILE. Opinion being what it is, this doesn't bother
> everyone, including my own brother. However, the minute I get my hands
> on a program, that's what I do. Funxions should be small enuf to fit
> on a page, just as lines should be small enuf to fit on a tty. I often
> put many funxions on a page if they fit in order to save paper.
> 

Come on, let's get into the 1980's.  Functions, or groups of functions,
should be small enough that they fit onto an even-odd page pair when
typeset in 9-10 point type using a grinder like vgrind.

Dave Nelson

zarth@drutx.UUCP (CovartDL) (02/05/85)

What's all this talk about functions and style!!!!

No one has yyet to mention for what purpose one is writting the program.
I almost always make lines fit on the tty screen but, if the program has
a real time consideration I will often let my printf's become very long to
eliminate the overhead of function calls. Likewise, my functions/subroutines
are generally rather small but, as above real time considerations sometime
change this.

What use is a function no matter how small if its called only once or twice??
What about everyones use of MACROS??

Well these are my hurried opinions on the subject. I thought I would get
something on the net so as to get involved with the discussions a little
bit more.

				Zarth Arn

						P.S. BTW I feel programming
						     style is the one thing
						     that distinquishes us
						     programmers from each
						     other. Personnal touch!

henry@utzoo.UUCP (Henry Spencer) (02/07/85)

> 		P.S. BTW I feel programming
> 		     style is the one thing
> 		     that distinquishes us
> 		     programmers from each
> 		     other. Personnal touch!

Yeah, it distinguishes the good ones from the bad ones.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

cottrell@nbs-vms.ARPA (02/07/85)

/*
zarth arn asks: "what use is a funxion no matter how small if it's called
only once or twice?" well mr. vader (:-), it seems that everyone uses one.
it's called "main".

p.s. i said 'lines' should fit on a tty screen, not statements. there should
be a new line at least every eighty chars.
*/

david@ukma.UUCP (David Herron, NPR Lover) (02/10/85)

Yet Another Comment From Cottrel (YACFC):
>/*

>>	[...A quote of a reply to a previous posting of his ...]

>Some people rarely make listings but I do. I regard a paper fold as VERY
>significant if I have to keep flipping the maddog page to see the other
>half of a IF or WHILE. Opinion being what it is, this doesn't bother
>everyone, including my own brother. However, the minute I get my hands
>on a program, that's what I do. Funxions should be small enuf to fit
>on a page, just as lines should be small enuf to fit on a tty. I often
>put many funxions on a page if they fit in order to save paper.
>*/

Ok.  We all live on Unix systems, right?  Isn't there this filter
named "pr"?  Doesn't it make sure none of the code gets printed
on the form breaks?  (Nod your head up and down please...we all
know this is true).  However, pr gets confused when it has text
that contains form feeds.  (I would go fix it except the code
is a little dense).

I do agree however that functions (notice the spelling) should 
fit on one page.  However I also know that sometimes they simply
HAVE to drag on for pages and pages.


-- 
-:--:-
David Herron;
		ARPA-> "ukma!david"@ANL-MCS or david%ukma.uucp@anl-mcs.arpa
		UUCP-> {ucbvax,unmvax,boulder,research}!anlams!ukma!david
		UUCP-> {mcvax!qtlon,vax135,mddc}!qusavx!ukma!david
		UUCP-> {A-Large-Portion-of-The-World}!cbosgd!ukma!david

No stupid sayings (I can't think of one).

No stupid disclaimers (Nobody else would claim my statements anyway).

robert@gitpyr.UUCP (Robert Viduya) (02/12/85)

><
Posted from  david@ukma.UUCP (David Herron, NPR Lover)
> Ok.  We all live on Unix systems, right?  Isn't there this filter
> named "pr"?  Doesn't it make sure none of the code gets printed
> on the form breaks?  (Nod your head up and down please...we all
> know this is true).  However, pr gets confused when it has text
> that contains form feeds.  (I would go fix it except the code
> is a little dense).
> 

Pr gets confused by formfeeds?  I don't think so.  Pr should expand the
formfeed into enough lines to get to the next page (pr under System V R.1.
does, 4.2BSD pr leaves the formfeeds in and assumes it will cause a real
formfeed on the printer (dual universe Pyramids have their advantages)).

Besides, I don't believe Cotrell was complaining about lines appearing right
on the page break.  He was complaining about things like a block 'if' starting
on one page and finishing on the next page.

I always put a formfeed before every function of my code.  I don't have
problems with seeing "ugly" ^Ls when I'm in the editor.  I also don't have
any problems wasting paper with a lot of blank space after each function.
I feel the same way that Cotrell feels.  I don't like having to page back
and forth just to see a whole 'if' or 'while' block.

I'm not saying everyone should use my style.  Use any style you want, just
leave me the right to use my own as well.

				robert
-- 
Robert Viduya
Georgia Institute of Technology

...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert
...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert

mike@enmasse.UUCP (Mike Schloss) (02/20/85)

> > Ok.  We all live on Unix systems, right?  Isn't there this filter
> > named "pr"?  Doesn't it make sure none of the code gets printed
> > on the form breaks?  (Nod your head up and down please...we all
> > know this is true).  However, pr gets confused when it has text
> > that contains form feeds.  (I would go fix it except the code
> > is a little dense).
> > 
> 
> Pr gets confused by formfeeds?  I don't think so.  Pr should expand the
> formfeed into enough lines to get to the next page (pr under System V R.1.
> does, 4.2BSD pr leaves the formfeeds in and assumes it will cause a real
> formfeed on the printer (dual universe Pyramids have their advantages)).
> 

Not on a Version 7 based system.  It will just print your form feed,
increment the line counter, and when it gets to 60, issue another form
feed right in the middle of your formatted code.  Also, although it does
exist in Sys 5 R2 it is not documented anywhere.  Can you say:

	"Undocumented 'Features' have a habit of going away unexpectedly"