Comments on book review (cstyle and personal choice)

Laura Creighton laura at utzoo.UUCP
Sat May 19 07:58:58 AEST 1984


>From Henry Spencer (utzoo!henry)
	I've heard too many people say "well, everybody knows that <THING> is
	all just a matter of personal taste, so I'll do <THING> any way I damn
	well please and you have no right to object".  Admitting the importance
	of personal factors does not imply admitting that they are the only
	important factors.

Reply from (ea!mwm)
	Sorry, Henry, but in programming, the personal factor *is* the dominant
	one. You should use whatever method gets the results you need,
	preferably minimizing over pain to you.

Sorry mike. The assumption you are making is that everybody knows how
to minimize pain, and that one isn't valid, though  most people *think*
they know how to minimize pain. Case in point, me:

I used to write very ugly looking code (by the Henry Spencer look test,
which looks like the Indian Hill C style guide in a great many ways)
which passed lint. Now, this is to be preferred over code that doesn't
pass lint, or do error checking, but passes the look test, and at the
point in time when I was writing it I thought that it was the neatest
thing to ever come down the pipe. (Otherwise I would have been doing
it differently, you see.)

Then, on one day, Henry handed me a copy of the Indian Hill Style
Guide (with additions that he made) and let me know that my own code
could look any way I liked, but anything installed on the system
(utzoo) was going to look like that.

Did I think that this was the greatest inconveninece since Income Tax?
Yes. Did I think that Henry was an incosiderate, unnreasonable, perhaps
even tyranical monster? Yes. Did I think there was a damn thing I could
do about it? No. So after a few grumblings (to test and make sure that
there was nothing I could do about it) my code looked like the Indian
Hill Style sheet.

The trick is: Henry was right, I was wrong, it saves me much more pain
to write code the way I do now. It actually makes certain sorts of
common logical bugs harder to write and easier to find. But I sure didn't
know that before -- it is only after fixing miles of code that I now 
consider ugly that I realise *why* Henry was right. 

moral: being right is beyond all considerations of personal taste.

	
-- 
Laura Creighton
utzoo!laura

	"Not to perpetrate cowardice against one's own acts!
	 Not to leave them in the lurch afterward! The bite
	 of conscience is indecent"	-- Nietzsche
					The Twilight of the Idols (maxim 10)



More information about the Comp.lang.c mailing list