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: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public From: atbowler@thinkage.on.ca (Alan Bowler) Subject: Commenting (was Re: Hungarian notation) Date: 1996/05/31 Message-ID: #1/1 X-Deja-AN: 157819316 sender: news@thinkage.on.ca references: <4oehnp$onn@goanna.cs.rmit.EDU.AU> <4omejm$j3a@goanna.cs.rmit.EDU.AU> organization: Thinkage Ltd. 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: In article <4omejm$j3a@goanna.cs.rmit.EDU.AU> ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) writes: > >This is actually part of the problem. Students are exposed to a *lot* >of "textbook" code, whose authors have put in comments *to explain the >LANGUAGE* as well as a the code. Things that a programmer who already >knows the language would call "junk comments" are put in to help students >who _don't_ know the language well, and students learn to imitate that. I don't think that it is the textbooks particularly. People add comments to document the stuff that is not immediately obvious to them. Beginning programmers or people new to a language thus often end up reminding themselves what the language construct does, and we end up with the classic lda 3,dl Put 3 into lower Q register "classic" because the programmer later changed to the A register but did not update the comment. 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.