indentation: enough already!

mcdonald at uxe.cso.uiuc.edu mcdonald at uxe.cso.uiuc.edu
Mon Dec 12 00:47:00 AEST 1988


>Back in my school days, one professor tried to enforce his indentation style
>on the class (you could lose up to 25 points for violations!!).  I in
>addition to others found "his" style impossible to work with and quickly 
>reverted to our own.  When the grades came out, it was as expected:  DOCKED!
>Then we took all this to the dean and got the grades reversed.  The dean's
>reason was that he felt such requirements had no bearing on a student's
>ability to learn how to write good programs.  


You were right, and the dean was right, and bully for you, but ...
(on the other hand, I object to deans changing grades, PERIOD) 
there is a reason for imposing a "pretty printing" style on
class assignments: easier to grade, much easier. In fact, simply
having students run things through "indent" might make it easier.

The big problem in computer language courses (except COBOL :-) )
is that professors often refuse to teach the whole language, and 
nothing but the language. For example, around here goto's are
forbidden (for sure in Fortran, and I believe so in C), and
the Fortran professor ABSOLUTELY INSISTS on using control constructs
that have never been in any standard Fortran ( no suffix, II, IV, 66,
or 77), and have never been, to my knowledge, in any a published draft
of F8X. That's like REQUIRING students in a C course (NOT
"Programming the 8086 in C") to use "near" and "far". 

One of my coding rules is that every non-trivial thing I write
(more than two pages) MUST contain at least one goto or continue.
There are two reasons for this: remind me what "continue" does,
as I always forget and have to look it up, and cause me great
pleasure sometimes as, just while I'm walking down the street,
I think of the consternation one of those constructs might cause
if I posted the code in comp.sources.???. :-)



More information about the Comp.lang.c mailing list