From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public X-Google-Thread: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Commenting (was Re: Hungarian notation) Date: 1996/05/31 Message-ID: #1/1 X-Deja-AN: 157881425 references: <4oehnp$onn@goanna.cs.rmit.EDU.AU> <4omejm$j3a@goanna.cs.rmit.EDU.AU> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel Date: 1996-05-31T00:00:00+00:00 List-Id: Richard said "A more expirenced programmer would be familiar wth the machine and would likely have commented on the logical effect of the statement. E.g. lda 3,dl We need to loop three times."" I don't like that as an example of experienced code, and in fact would regard it as poor from a beginning student. There is no point in repeating the 3, I can read a number. So the comment would better read something like "setup to loop through sensor inputs" And there is almost NEVER an excuse for a constant like 3 appearing directly in the code. Much better would be to declare a constant number_of_sensors equ 3 and then write lda number_of_sensors, dl in which case, the comment might well not be deemed so necessary.