Article View: alt.folklore.computers
Article #620753Re: Nostalgia
From: Jorgen Grahn
Date: Mon, 26 Feb 2018 11:32
Date: Mon, 26 Feb 2018 11:32
59 lines
3613 bytes
3613 bytes
On Mon, 2018-02-26, J Clarke wrote: > On 26 Feb 2018 06:43:24 GMT, Jorgen Grahn <grahn...@snipabacken.se> > wrote: > >>On Mon, 2018-02-26, Dan Espen wrote: >>> Peter Flass <peter...@yahoo.com> writes: >>> >>>> Bob Eager <news...@eager.cx> wrote: >>>>> On Sun, 25 Feb 2018 17:29:16 +0000, Huge wrote: >>>>> >>>>>> On 2018-02-25, Andrew Swallow <am.sw...@btinternet.com> wrote: >>>>>> >>>>>> [15 lines snipped] >>>>>> >>>>>>> Reading Fortran and Assembler code tells you how, it does not tell you >>>>>>> why. Comments are needed for that. >>>>>> >>>>>> *applause* >>>>>> >>>>>> Anyone who writes code like this should be shot; >>>>>> >>>>>> x=5; # Set x to 5 >>>>> >>>>> Strangely, I was doing generic feedback for an assignment about an hour >>>>> ago. I repeated this statement, but not in Huge terms. (the external >>>>> examiner will read it) >>>> >>>> When you start writing assembler everyone says you should put a comment on >>>> every line, so you tend to do a lot of this until you get the idea. >>> >>> Putting a comment on every line makes it simpler to >>> read the whole program as comments. With highlighting >>> this is an easy way to quickly absorb a module. >>> >>> Of course the comments may not be 100% right. >>> >>> In the above case, the code still needs a comment >>> but it should be something like: >>> >>> x=5; # Max supported fingers >> >>max_supported_fingers=5; # Nothing more to say > > But a lot more to type and that style tends to be hard to > read--operators get lost in the visual noise. A lot more to type, but a lot less to remember. I agree that the visual noise aspect is a problem, though. It depends on the context. For very local variables I tend to favor one-letter names like i (for iteration), p, q (pointers), n and m (quantities and sizes). I allow global names to be longer, but look for ways to abbreviate them too. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
Technical Details
Message-ID:
<slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid>Path:
mbox-mo1.pugleaf.net!a25ni1612itj.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<fennrjFber7U1@mid.individual.net> <p671b4212b3@news2.newsguy.com> <p672qv$74m$1@dont-email.me> <p67o2727bv@news1.newsguy.com> <p6967v$t5b$1@dont-email.me> <p6q0kb$t5$1@reader2.panix.com> <2MWdnbgKEKQjRA_HnZ2dnUU78XHNnZ2d@giganews.com> <ffga3cFrifbU1@mid.individual.net> <ffgu5uF5nalU15@mid.individual.net> <1313349967.541300884.430961.peter_flass-yahoo.com@news.eternal-september.org> <p6vrnc$ue5$1@dont-email.me> <slrnp97b4c.eu5.grahn+nntp@frailea.sa.invalid> <0lq79dpae03ai000r0690fja58qcud4udu@4ax.com>Show Full Headers
Complete Article Headers
X-Received: by 10.107.50.141 with SMTP id y135mr8008876ioy.45.1519644772515; Mon, 26 Feb 2018 03:32:52 -0800 (PST) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 10.107.164.230 with SMTP id d99ls1955267ioj.18.gmail; Mon, 26 Feb 2018 03:32:51 -0800 (PST) X-Received: by 10.107.39.84 with SMTP id n81mr8156669ion.130.1519644771353; Mon, 26 Feb 2018 03:32:51 -0800 (PST) MIME-Version: 1.0 Path: mbox-mo1.pugleaf.net!a25ni1612itj.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jorgen Grahn <grahn...@snipabacken.se> Newsgroups: alt.folklore.computers Subject: Re: Nostalgia Date: 26 Feb 2018 11:32:49 GMT Lines: 59 Message-ID: <slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid> References: <fennrjFber7U1@mid.individual.net> <p671b4212b3@news2.newsguy.com> <p672qv$74m$1@dont-email.me> <p67o2727bv@news1.newsguy.com> <p6967v$t5b$1@dont-email.me> <p6q0kb$t5$1@reader2.panix.com> <2MWdnbgKEKQjRA_HnZ2dnUU78XHNnZ2d@giganews.com> <ffga3cFrifbU1@mid.individual.net> <ffgu5uF5nalU15@mid.individual.net> <1313349967.541300884.430961.peter_flass-yahoo.com@news.eternal-september.org> <p6vrnc$ue5$1@dont-email.me> <slrnp97b4c.eu5.grahn+nntp@frailea.sa.invalid> <0lq79dpae03ai000r0690fja58qcud4udu@4ax.com> X-Trace: individual.net O01hwzTL359PFGJGtN2ZZwGAIYvSeM//8XW994aXFQhskkEjjY Cancel-Lock: sha1:XLIGA5GFvMzZeI9KVfHxBaN6S30= User-Agent: slrn/1.0.2 (OpenBSD) Bytes: 3140 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit