Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cca.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!cca!g-rh From: g-rh@cca.UUCP (Richard Harter) Newsgroups: net.singles,net.cse Subject: Re: portable code Message-ID: <6571@cca.UUCP> Date: Fri, 7-Mar-86 01:22:42 EST Article-I.D.: cca.6571 Posted: Fri Mar 7 01:22:42 1986 Date-Received: Sat, 15-Mar-86 20:51:37 EST References: <653@moscom.UUCP> <569@hoptoad.uucp> <11569@watnot.UUCP> <1087@burl.UUCP> <> Reply-To: g-rh@cca.UUCP (Richard Harter) Organization: Computer Corp. of America, Cambridge Lines: 24 Xref: watmath net.singles:10962 net.cse:758 Summary: In article <> jjboritz@watnot.UUCP (Jim Boritz) writes: > >I have seen alot of assembly language programs some were comment extremely >well and others extremely bad. Most of the bad ones were the ones which >had a comment on every line. >A great many of the well commented programs had enough comments to make >code segments easy to understand, but they were far from the comment per >line guideline which you mentioned. > Just a, ah, comment. I tend towards the one comment per line school myself, both for assembler, and for HOLs that will support it. (Coupled, of course, with descriptive prologs for program sections -- my programs run about 70% comment material by character count.) My observation is that the comments on individual lines have their greatest value in explicating what you are doing while you are writing the code. I also find that the thing that it is really important to comment are the declarations. Repeat -- this is really important. The reason that it is really important is that it forces you to have a well defined meaning associated with each variable. In my experience (and I have a lot of it) conceptually ill defined variables is the second most common source of logic errors in programming (inability to think is first. No smiley, unfortunately.) Richard Harter, SMDS Inc.