🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #620764

Re: Nostalgia

#620764
From: Peter Flass
Date: Tue, 27 Feb 2018 22:44
84 lines
4963 bytes
J. Clarke <jclarke...@gmail.com> wrote:
> On 26 Feb 2018 11:32:49 GMT, Jorgen Grahn <grahn...@snipabacken.se>
> wrote:
> 
>> 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 used to do that but realized that it's a bad habit for a variety of
> reasons.  (Working in insurance and using APL has a lot to do with it
> I think).  First, single letter variable names are hard to search on.

Cross-reference is your friend.

> So are variable names that form parts of common words.  Second, once
> the habit develops, it's easy to run out of variable names and end up
> using "l" (lower case L), which is identical to "1" (one) in many
> fonts which can lead to very difficult to identify bugs.  Third,
> actuarial science has its share of accepted one letter values--"Q" for
> example is mortality.
> 
> Then there's the guy who used Z for whatever was returned by a
> function, _any_ function..  But somehow Z managed to escape and become
> globalized, so finding out what changed Z becomes a major undertaking.
> 
>> I allow global names to be longer, but look
>> for ways to abbreviate them too.
>> 
>> /Jorgen
> 



-- 
Pete
Technical Details
Message-ID: <616749937.541463692.671658.peter_flass-yahoo.com@news.eternal-september.org>
Path: mbox-mo1.pugleaf.net!a2ni1289ite.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
References: <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> <slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid> <3ve99dtbi7vu0jda6ut1kcbemr6j4ta28v@4ax.com>

Show Full Headers
Complete Article Headers
X-Received: by 10.107.199.6 with SMTP id x6mr12310891iof.98.1519771499116;        Tue, 27 Feb 2018 14:44:59 -0800 (PST)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 10.107.101.12 with SMTP id z12ls452659iob.20.gmail; Tue, 27 Feb 2018 14:44:57 -0800 (PST)
X-Received: by 10.107.30.16 with SMTP id e16mr12053603ioe.22.1519771497884;        Tue, 27 Feb 2018 14:44:57 -0800 (PST)
Path: mbox-mo1.pugleaf.net!a2ni1289ite.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Peter Flass <peter...@yahoo.com>
Newsgroups: alt.folklore.computers
Subject: Re: Nostalgia
Date: Tue, 27 Feb 2018 15:44:57 -0700
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <616749937.541463692.671658.peter_flass-yahoo.com@news.eternal-september.org>
References: <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> <slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid> <3ve99dtbi7vu0jda6ut1kcbemr6j4ta28v@4ax.com>
Mime-Version: 1.0
Injection-Info: reader02.eternal-september.org; posting-host="6322ff1da9a35ea82bbc95f9044cc2fb"; logging-data="11780"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX19OKCm7PZ4ucuTo035pP5rQ"
User-Agent: NewsTap/5.3.1 (iPad)
Cancel-Lock: sha1:8UPCjGIyHw8gk4SmtJoXMcyQHK8= sha1:FxNCOOUkmy5fdofN2Rgdpet8iIk=
Bytes: 4605
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit