Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!laura From: laura@utzoo.UUCP (Laura Creighton) Newsgroups: net.lang.c Subject: Re: Comments on book review (cstyle and personal choice) Message-ID: <3878@utzoo.UUCP> Date: Fri, 18-May-84 17:58:58 EDT Article-I.D.: utzoo.3878 Posted: Fri May 18 17:58:58 1984 Date-Received: Fri, 18-May-84 17:58:58 EDT References: <219@cubsvax.UUCP>, <5700004@ea.UUCP> Organization: U of Toronto Zoology Lines: 53 From Henry Spencer (utzoo!henry) I've heard too many people say "well, everybody knows that is all just a matter of personal taste, so I'll do 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)