Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Whenever people agree with me, I always think I must be wrong. -- Oscar Wilde


devel / comp.lang.python / Re: The task is to invent names for things

SubjectAuthor
* The task is to invent names for thingsdn
`* Re: The task is to invent names for thingsStefan Ram
 +* Re: The task is to invent names for thingsStefan Ram
 |+* Re: The task is to invent names for thingsdn
 ||+- Re: The task is to invent names for thingsStefan Ram
 ||`* Re: The task is to invent names for thingsStefan Ram
 || +- Re: The task is to invent names for thingsKarsten Hilbert
 || +* Re: The task is to invent names for thingsKarsten Hilbert
 || |+- Re: The task is to invent names for thingsStefan Ram
 || |`- Re: The task is to invent names for thingsJulio Di Egidio
 || +- Re: The task is to invent names for thingsdn
 || +* Re: The task is to invent names for thingsPeter J. Holzer
 || |+* Re: The task is to invent names for thingsEli the Bearded
 || ||+- Re: The task is to invent names for thingsChris Angelico
 || ||+- Aw: Re: The task is to invent names for thingsKarsten Hilbert
 || ||+* RE: Re: The task is to invent names for thingsAvi Gross
 || |||+- Re: The task is to invent names for thingsStefan Ram
 || |||+* Re: The task is to invent names for thingsStefan Ram
 || ||||+* RE: The task is to invent names for thingsAvi Gross
 || |||||`- Re: The task is to invent names for thingsJulio Di Egidio
 || ||||+- Re: The task is to invent names for thingsStefan Ram
 || ||||`* Re: The task is to invent names for thingsdn
 || |||| `- Re: The task is to invent names for thingsStefan Ram
 || |||`* Re: Re: The task is to invent names for thingsJulio Di Egidio
 || ||| `* Re: The task is to invent names for thingsEli the Bearded
 || |||  `- Re: The task is to invent names for thingsJulio Di Egidio
 || ||`- Re: The task is to invent names for thingsalister
 || |`- Re: The task is to invent names for thingsalister
 || `- Re: The task is to invent names for thingsMartin Di Paola
 |+- Re: The task is to invent names for thingsChris Angelico
 |+- Re: The task is to invent names for thingsKarsten Hilbert
 |+- Re: The task is to invent names for thingsChris Angelico
 |+- Re: The task is to invent names for thingsPeter J. Holzer
 |+* Re: The task is to invent names for thingsKarsten Hilbert
 ||`- Re: The task is to invent names for thingsStefan Ram
 |+- Re: The task is to invent names for thingsChris Angelico
 |`- Aw: Re: The task is to invent names for thingsKarsten Hilbert
 `* Re: The task is to invent names for thingsdn
  `* Re: The task is to invent names for thingsStefan Ram
   `- Re: The task is to invent names for thingsDavid L Neil

Pages:12
Aw: Re: The task is to invent names for things

<mailman.111.1635404312.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15816&group=comp.lang.python#15816

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Karsten....@gmx.net (Karsten Hilbert)
Newsgroups: comp.lang.python
Subject: Aw: Re: The task is to invent names for things
Date: Thu, 28 Oct 2021 08:58:30 +0200
Lines: 19
Message-ID: <mailman.111.1635404312.23718.python-list@python.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<mailman.55.1635285142.23718.python-list@python.org>
<dough-20211026231056@ram.dialup.fu-berlin.de>
<words-20211026232015@ram.dialup.fu-berlin.de>
<27138c0a-9db1-bdc1-fcc3-0942c860e5e0@DancesWithMice.info>
<CAPTjJmqiAv9vzLJ+c32zaMCeHytn9ppOox9wobk5VGZabwo9LA@mail.gmail.com>
<YXkslIVbGR2yHpee@hermes.hilbert.loc>
<CAPTjJmpZscNbqCzyoUp0aYnS6wD9oTDovgPpbnQDRq+Ma01obA@mail.gmail.com>
<YXm8FgKdKYsUrCUh@hermes.hilbert.loc>
<mailman.94.1635367961.23718.python-list@python.org>
<unite-20211027220820@ram.dialup.fu-berlin.de>
<trinity-c703ea33-0108-4851-8d4b-4c20c2460ede-1635404310432@3c-app-gmx-bs13>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de Xbv7sWdOcnJHXEqBjSDvmwwdu+rvULU5XoONq/9XWx8A==
Return-Path: <Karsten.Hilbert@gmx.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="1024-bit key; unprotected key"
header.d=gmx.net header.i=@gmx.net header.b=Y+wBldCK;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.070
X-Spam-Evidence: '*H*': 0.89; '*S*': 0.03; 'received:212.227': 0.07;
'cc:addr:python-list': 0.09; 'karsten': 0.09; 'rate,': 0.09;
'writes:': 0.09; 'cc:no real name:2**0': 0.14; 'hilbert': 0.16;
'received:(via http)': 0.16; 'uses': 0.19; 'cc:addr:python.org':
0.20; 'written': 0.22; 'cc:2**0': 0.25; 'it,': 0.29;
'subject:for': 0.33; 'there': 0.33; 'header:In-Reply-To:1': 0.34;
'two': 0.39; 'to:none': 0.60; 'received:212': 0.62;
'received:217': 0.67; 'stand': 0.67; 'subject:The': 0.70; '"to':
0.84; 'go,': 0.84; 'transcribed': 0.84; 'convey': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
s=badeba3b8450; t=1635404310;
bh=LqUZzlyo6MYZuuItLvEZ2OYYqF05kC+sFOdUBA0AgbE=;
h=X-UI-Sender-Class:From:Cc:Subject:Date:In-Reply-To:References;
b=Y+wBldCK3jOuX/XGpHjxQzuRhjy7j+ipP+wTObvm5+r19LUsp/3kS2lqAEek0QkXv
31HVnASU9RcpNPuhjibW8SGPmTbw+uXJCmVKBMi91vIBzxesUDMG+uhyuU1g9ufUUM
Z7J+16y1RePS3ZnFXT70hSnQwPkbomOOnaI/lrMI=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Importance: normal
Sensitivity: Normal
In-Reply-To: <unite-20211027220820@ram.dialup.fu-berlin.de>
X-UI-Message-Type: mail
X-Priority: 3
X-Provags-ID: V03:K1:q7dsLstcJjIPSLCBLODCGtFQXa61vbY1BbpsIRCvgp6jir4q2gFRoZEa3S/1lSCxaIvnG
63QAd84d3VnqrEdtgaNa5TbOYo2t4oJ/zW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MN7qvvlfoX6xS6
6E6jkJO
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <trinity-c703ea33-0108-4851-8d4b-4c20c2460ede-1635404310432@3c-app-gmx-bs13>
X-Mailman-Original-References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<mailman.55.1635285142.23718.python-list@python.org>
<dough-20211026231056@ram.dialup.fu-berlin.de>
<words-20211026232015@ram.dialup.fu-berlin.de>
<27138c0a-9db1-bdc1-fcc3-0942c860e5e0@DancesWithMice.info>
<CAPTjJmqiAv9vzLJ+c32zaMCeHytn9ppOox9wobk5VGZabwo9LA@mail.gmail.com>
<YXkslIVbGR2yHpee@hermes.hilbert.loc>
<CAPTjJmpZscNbqCzyoUp0aYnS6wD9oTDovgPpbnQDRq+Ma01obA@mail.gmail.com>
<YXm8FgKdKYsUrCUh@hermes.hilbert.loc>
<mailman.94.1635367961.23718.python-list@python.org>
<unite-20211027220820@ram.dialup.fu-berlin.de>
 by: Karsten Hilbert - Thu, 28 Oct 2021 06:58 UTC

> Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> >ite is the -te form (in some uses like a gerundium) of aru
> >(to go, to walk)
>
> This form, "行って", is written with two "t", as "itte",
> in many transcriptions to convey the gemination (っ) of
> the "t". There is, however, "ite", "居て", the -te form of
> "居る" ("iru" - "to be"), which usually is transcribed "ite".

I stand corrected, thanks. Not the first time that ite/itte
slipped :-/

At any rate, it, eh, is rather malleable to word play.

Karsten

RE: Re: The task is to invent names for things

<mailman.120.1635441831.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15826&group=comp.lang.python#15826

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: avigr...@verizon.net (Avi Gross)
Newsgroups: comp.lang.python
Subject: RE: Re: The task is to invent names for things
Date: Thu, 28 Oct 2021 13:23:46 -0400
Lines: 77
Message-ID: <mailman.120.1635441831.23718.python-list@python.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
Mime-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 4/VH7UVBu8yleiBuXpmXhQrPF2yMNYmygcxD6rBCl7ww==
Return-Path: <avigross@verizon.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=verizon.net header.i=@verizon.net header.b=pILptB86;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.057
X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'this:': 0.03; 'fairly':
0.05; 'variable': 0.05; 'underlying': 0.07; 'cc:addr:python-list':
0.09; 'depend': 0.09; 'hard.': 0.09; 'karsten': 0.09; 'language,':
0.09; 'parse': 0.09; 'trivial': 0.09; 'cc:no real name:2**0':
0.14; 'url:mailman': 0.15; 'alias': 0.16; 'another.': 0.16;
'characters.': 0.16; 'easily.': 0.16; 'hilbert': 0.16; 'humans':
0.16; 'received:(vzm hermes smtp server)': 0.16;
'received:74.6.131': 0.16; 'october': 0.17; 'instead': 0.17;
'name.': 0.19; 'cc:addr:python.org': 0.20; 'languages': 0.22;
'code': 0.23; '(and': 0.25; 'skip:- 10': 0.25; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'python,': 0.25; 'actual': 0.25; 'url:listinfo': 0.25; 'cc:2**0':
0.25; 'url-ip:188.166/16': 0.25; 'seems': 0.26; 'task': 0.26;
'else': 0.27; 'done': 0.28; 'sense': 0.28; 'thinking': 0.28;
'code,': 0.31; 'url-ip:188/8': 0.31; 'program': 0.31; 'concept':
0.32; 'python-list': 0.32; "wouldn't": 0.32; 'but': 0.32;
'subject:for': 0.33; 'able': 0.34; 'same': 0.34; 'header:In-Reply-
To:1': 0.34; 'trying': 0.35; 'people': 0.36; 'change': 0.36;
'really': 0.37; 'hard': 0.37; 'could': 0.38; 'copies': 0.39;
'least': 0.39; 'enough': 0.39; 'decide': 0.39; 'prompt': 0.39;
'hand': 0.40; 'happen': 0.40; 'something': 0.40; 'want': 0.40;
'skip:o 10': 0.61; 'from:': 0.62; 'reasonable': 0.62; 'copy':
0.63; 'once': 0.63; 're:': 0.64; 'skip:t 40': 0.64; 'upon': 0.64;
'parts': 0.65; 'saw': 0.65; 'named': 0.65; 'improve': 0.66;
'lead': 0.67; 'back': 0.67; 'role': 0.68; 'know.': 0.68; 'cc:':
0.69; 'latter': 0.69; 'obvious': 0.69; 'readers': 0.69; 'times':
0.69; 'within': 0.69; 'subject:The': 0.70; '2021': 0.71; 'care':
0.71; 'longer': 0.71; 'sent:': 0.78; 'dangerous': 0.81; 'moment':
0.81; '2:50': 0.84; 'combinations': 0.84; 'conveys': 0.84; 'of:':
0.91; 'plays': 0.91; 'consists': 0.93; 'pain': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verizon.net; s=a2048;
t=1635441828; bh=Fve86723dJx4/NeanZE5UC93LBl+hs+5P53ucjHonPE=;
h=From:To:Cc:References:In-Reply-To:Subject:Date:From:Subject:Reply-To;
b=pILptB86nVAvoHHLIZICjCyfF5gJbcXsoIjE5tsdAv0ypMxvTek6FoXuhTnlvyew0aZgq5JjGg+4liTyVccDlKPY5b3ZOJ5JHv+EhjtQyWsGmjZnskuvUsdyvK7g2mG+UQ5IznxzTZBPoqG2U9sIEC3dhY1XfXc3rO7hb+yawksAItLolYzylFWLM46A888iWu9gvaNyPCbgmsPfkK7wKsZlrw0FMgUK7nJd/hxOfFmu7zLiSWsVpOGgYYE+jbrgZSIY1GIQZ7ypYdbTgQUrh83wsNAbbHCYYSXhegRse7U04bsrwvuL8DU3Mx5VkTJP6eyRcl7G+J2HSoaHuzJQrg==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
t=1635441828; bh=cXKWk1fiVH+sDn3t+tZPa89uM0GPyHAO6PxrWwNOZjx=;
h=X-Sonic-MF:From:To:Subject:Date:From:Subject;
b=dKcqqcY1Z7Y8OWXm33MnC41x18R+M4D7jrPYGqdMeBJq5u9VrrpVMwaL05WGi34WOJvVuVSHDsChQYQfyL8X9DnCqBzOmoGICMomqqSUafNy01MEnIF4U7cZ68OddYaT3E3pKdEfgOpHbu0OX5qtE58+vWWgd+p0z8D4W2b7Pnu/bykUWxvhiaGjdmHt1ppWsPin8NF5mksu9Zvx+CTTdrZh3TxKT6Wk1mLMaU0DLBn3ykHCp0ypbvJrtMuBYRF77YfovUVS1Brjm2ovhp5+DeG2+mJmkXw6VxRW3iKvzw3SfZI8S/mr602tTQ4j+YY131dVk+7h/7bmHfLbEZZCnA==
X-YMail-OSG: VhpMqe4VM1mvnvuHbmh8Pe5j0C4BLHk4nucoLUsIeRZfkWfhQ0GlczZCU_Ad.nk
bAp.jhO41KrYrGDXWzWt18brAZn9gmVaMx7chdHekWrHYcg2BtlVcm2ugH48bWny.gEGyL1H.J.U
eyiDKEmPntsQJq1HNfv8UVFRep5Af6gsP4h_hbn27Nj.VZjIkA6EeB8X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cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUeq71AAMA==
Content-Language: en-us
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
X-Mailman-Original-References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
 by: Avi Gross - Thu, 28 Oct 2021 17:23 UTC

Names can be taken too far as the same variable may have different
connotations in one place than another.

Say I am counting how many of something and incrementing variable HowMany as
I go along and initialized to zero. Then I want to test if I have any and
instead of:

if (HowMany > 0)

I decide to be cute and depend on the truthiness of HowMany like:

if (HowMany)

The latter is a tad hard to parse for some people and if it had been named
WeHaveAny then the code would sort of make sense:

if (WeHaveAny)

Somewhere else in the code some other names might make sense and make the
program easier to read.

So, the obvious solution is to ask the language, like Python, to allow
variables that are synonyms. In languages with pointers, this can often be
done fairly easily. In some languages with some optimizations, it can be
dangerous as some copies of this kind can later be changed to an actual copy
when the underlying data changes.

So, since at the moment you might not be able to do this:

HowMany = 0
alias HowMany WeHaveAny

Then if this feature matters to you, you could cautiously write code that
declares a second variable and copies either the current value of the first
or a Boolean true/false.

I am sure many of us (meaning me) have often named a variable and later
reconsidered once we saw the role it plays in various parts of the program
and had to go back and change everything. As other have noted, it is not a
trivial task and really good names often end up being really long names
which are also a pain especially when other really long names start with the
same characters. Compilers don't care but humans reading the code may give
up!

Worse, many times the code consists of longer combinations and trying to
keep within reasonable (printable) line lengths gets hard.

MyHumoungousDictionaryContainingElectionResults[SomeCountyInSomeStateOfTheUS
] =
MyHumoungousDictionaryContainingElectionResults[SomeCountyInSomeStateOfTheUS
] + TheOfficialCertifiedVoteCountOfThisRegion

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net@python.org> On
Behalf Of Karsten Hilbert
Sent: Thursday, October 28, 2021 2:50 AM
Cc: python-list@python.org
Subject: Aw: Re: The task is to invent names for things

> > I don't know. A mediocre name conveys at least some information, and
> > that seems to be better than none. On the other hand it might be
> > just enough to lead the reader astray which wouldn't happen with a
> > non-sensical name.

I was thinking that a nonsensical name might lead readers to go beyond the
name when trying to understand code, and would prompt me to improve upon the
name upon reading my own code (and having acquired, likely, a better
understanding of the concept that's to be named).

Karsten

--
https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

<names-20211028185041@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15829&group=comp.lang.python#15829

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: 28 Oct 2021 17:57:56 GMT
Organization: Stefan Ram
Lines: 47
Expires: 1 Dec 2021 11:59:58 GMT
Message-ID: <names-20211028185041@ram.dialup.fu-berlin.de>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info> <YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at> <mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13> <004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <mailman.120.1635441831.23718.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de xPDVj20YtUVA6sCtMQ98/gY6G5i9yW0qiRxgWfTpBAlCEg
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
User-Agent: nn/6.7.3
 by: Stefan Ram - Thu, 28 Oct 2021 17:57 UTC

"Avi Gross" <avigross@verizon.net> writes:
>if (WeHaveAny)

|Function names should be lowercase, with words separated by
|underscores as necessary to improve readability.
|Variable names follow the same convention as function names.
PEP 8 (2019)

The name should not be "optimized" for a certain use case
(as for the use in an if expression) only. "We", "have",
and "any" carry little information. A name should pack as
much information as possible in as least characters as
possible. So, for me, it'd be something like:

if word_count:

.

>So, the obvious solution is to ask the language, like Python, to allow
>variables that are synonyms.

Programs already have too many names in them.
There is no need to add even more, especially
when they equivalent, and the average human can
only hold 7 ± 2 objects (like names) in his short-
term memory.

>really good names often end up being really long names

If they are really long, they are not really good,
/except/ when they have a really large scope.

Names for a small scope can and should be short,
names for a large scope may be longer.

Some very short names have traditional meanings
and are ok when used as such:

for i in range( 10 ):

. And, as a "golden rule" for refactoring, I'd say:
When you see:

i = 0 # word count

, then remove the comment and rename "i" to "word count"!

Re: The task is to invent names for things

<mailman.123.1635444217.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15830&group=comp.lang.python#15830

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: martinp....@gmail.com (Martin Di Paola)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: Thu, 28 Oct 2021 18:03:30 +0000
Lines: 42
Message-ID: <mailman.123.1635444217.23718.python-list@python.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<mailman.55.1635285142.23718.python-list@python.org>
<dough-20211026231056@ram.dialup.fu-berlin.de>
<words-20211026232015@ram.dialup.fu-berlin.de>
<27138c0a-9db1-bdc1-fcc3-0942c860e5e0@DancesWithMice.info>
<mailman.58.1635290116.23718.python-list@python.org>
<naming-20211027003540@ram.dialup.fu-berlin.de>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc>
<20211028180330.jjg73g6wx56zg4hf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Trace: news.uni-berlin.de hlteYeOm0t0lfJcuQr0kOAS1IHsEYMErkVmMapuVD0MA==
Return-Path: <martinp.dipaola@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=JuZdHTCX;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '"it': 0.05; '26,': 0.07;
'27,': 0.09; 'karsten': 0.09; 'received:209.85.219': 0.09;
'schrieb': 0.09; 'situation,': 0.09; 'sometimes,': 0.09; 'thinks':
0.09; 'coding': 0.13; 'url:mailman': 0.15; 'problem.': 0.15;
'"what': 0.16; '+0200,': 0.16; '1713': 0.16; 'coding,': 0.16;
'hilbert': 0.16; 'imho,': 0.16; 'lambda': 0.16; 'preferable':
0.16; 'refactor': 0.16; 'splitting': 0.16; 'wrote:': 0.16;
'message-id:@gmail.com': 0.18; 'name.': 0.19; 'tue,': 0.19;
'to:addr:python-list': 0.20; 'lines': 0.23; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'url:listinfo': 0.25; 'url-ip:188.166/16': 0.25; 'stefan': 0.26;
'wrong': 0.28; 'it,': 0.29; 'url-ip:188/8': 0.31; 'realize': 0.32;
'but': 0.32; "i'm": 0.33; 'subject:for': 0.33; 'header:In-Reply-
To:1': 0.34; 'received:google.com': 0.34; 'yes,': 0.35;
'from:addr:gmail.com': 0.35; 'people': 0.36; 'those': 0.36;
'really': 0.37; 'using': 0.37; 'received:209.85': 0.37; 'class':
0.37; 'way': 0.38; 'received:209': 0.39; 'two': 0.39; 'wed,':
0.39; 'should': 0.40; 'come': 0.62; 'once': 0.63; 'saw': 0.65;
'look': 0.65; 'time.': 0.66; 'lead': 0.67; 'back': 0.67; 'mind.':
0.67; 'time,': 0.67; 'choose': 0.67; 'pieces': 0.70;
'subject:The': 0.70; '2021': 0.71; 'easy': 0.74; 'thousands':
0.78; 'weird': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=date:from:to:subject:message-id:mail-followup-to:'user-agent
:references:mime-version:content-disposition:in-reply-to;
bh=HFWXZfF5lju56bdoEoRnXc0h14tySEIL3ScB/wn0GT0=;
b=JuZdHTCX2UJBllQ0o8DSaH2TKJVas4ORDvksav94WKHWkAWa3xlq9/avp9SAtaSRAV
AU3HbAicd1qVWa5dLSuzSAkGfEdotPkU/RihQupXbGsbO26wZU20xrOgl0nPU/cz1Ibs
VL5BC90scjin/uqnJBVGHksJnnQuyedSmUfjGMBH+UYoRS3pP0ljCbaYQ12/GFs6kcGv
AWuFIx+h+xNW4RaSLps7U25b1lKo9GI6Dn7oo1eiqdaO7wjnLp+37C54OnQUc/5duYQy
mDAZT8auHg31KyH8cwOXzG7DPYjF8GFTZiykZjFwJ8DgteBf3xWQijFK81WiH0MlOdOH
FC2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:'user-agent:references:mime-version:content-disposition:in-reply-to;
bh=HFWXZfF5lju56bdoEoRnXc0h14tySEIL3ScB/wn0GT0=;
b=Ze/mgPcC3v7EE0hlycHPtFWuHuE9Zc2JXos21OPHPO4V5go41dxuWwZWieUcV3l1sL
uB4resiEnY3Id8JprJBga8y9+8rkm3rlEWqXTANDEWarhW50JvnmnwCpS2EsjZi+AZ92
hFgrLZXbAyPrlkX4TgBuP7DCXCq5Dgi0mk/0C8RCD3H2aVQuYsJi5ObtJh8gkP/izlhe
UZq8ne4aowp2zJzt2iIhl0nFeSui9jWtYzras8241L3Ky/YTmVkzydp/j4LVU8VXIrlr
P6AcGHQ/V4McQz5RXohOZJrSKVtiXWnSd+QARfYGSwXycDIpbFjJQBZAp1qp1+PJC7m3
cIvA==
X-Gm-Message-State: AOAM532MEv6oiVQsCqfog8RmPPzX54pLbveS87dl+4dqtoM1abBH3wng
SIiX+w1W4ZRtRo1yz/++e+HLb66ImPCCRg==
X-Google-Smtp-Source: ABdhPJyOo3Y2+64Ocof/EB8xsYONuXnLZHRMQZ3XRz1ZEjQ0wD1J+CZFmDYs9uSqA8hLMjxfK53dUw==
X-Received: by 2002:ad4:494d:: with SMTP id o13mr5621943qvy.51.1635444214509;
Thu, 28 Oct 2021 11:03:34 -0700 (PDT)
Mail-Followup-To: python-list@python.org
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2 Lightning/5.4.5.2'
Content-Disposition: inline
In-Reply-To: <YXks9MObZ0JYBpP8@hermes.hilbert.loc>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20211028180330.jjg73g6wx56zg4hf@gmail.com>
X-Mailman-Original-References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<mailman.55.1635285142.23718.python-list@python.org>
<dough-20211026231056@ram.dialup.fu-berlin.de>
<words-20211026232015@ram.dialup.fu-berlin.de>
<27138c0a-9db1-bdc1-fcc3-0942c860e5e0@DancesWithMice.info>
<mailman.58.1635290116.23718.python-list@python.org>
<naming-20211027003540@ram.dialup.fu-berlin.de>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc>
 by: Martin Di Paola - Thu, 28 Oct 2021 18:03 UTC

IMHO, I prefer really weird names.

For example if I'm not sure how to name a class that I'm coding, I name it
like XXXYYY (literally). Really ugly.

This is a way to avoid the so called "naming paralysis".

Once I finish coding the class I look back and it should be easy to see "what
it does" and from there, the correct name.

If the "what it does" results in multiple things I refactor it, splitting it
into two or more pieces and name each separately.

Some people prefer using more generic names like "Manager", "Helper",
"Service" but those names are problematic.

Yes, they fit in any place but that's the problem. If I'm coding a class and I
name it as "FooHelper", I may not realize later that the class is doing too
many things (unrelated things), because "it is a helper".

The thing gets wrong with the time; I bet that most of us saw a "Helper" class
with thousands of lines (~5000 lines was my record) that just grows over time.

On Wed, Oct 27, 2021 at 12:41:56PM +0200, Karsten Hilbert wrote:
>Am Tue, Oct 26, 2021 at 11:36:33PM +0000 schrieb Stefan Ram:
>
>> xyzzy = lambda x: 2 * x
>>
>> . Sometimes, this can even lead to "naming paralysis", where
>> one thinks excessively long about a good name. To avoid this
>> naming paralysis, one can start out with a mediocre name. In
>> the course of time, often a better name will come to one's mind.
>
>In that situation, is it preferable to choose a nonsensical
>name over a mediocre one ?
>
>Karsten
>--
>GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
>--
>https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

<names-20211028185829@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15831&group=comp.lang.python#15831

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Supersedes: <names-20211028185041@ram.dialup.fu-berlin.de>
Date: 28 Oct 2021 18:07:07 GMT
Organization: Stefan Ram
Lines: 51
Expires: 1 Dec 2021 11:59:58 GMT
Message-ID: <names-20211028185829@ram.dialup.fu-berlin.de>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info> <YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at> <mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13> <004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <mailman.120.1635441831.23718.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de AmWeBoRA2LkAElzGf35TTQzaJSdHxorlFId1vxhAZHUeEG
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Thu, 28 Oct 2021 18:07 UTC

Supersedes: <names-20211028185041@ram.dialup.fu-berlin.de>
[corrected two typos]

"Avi Gross" <avigross@verizon.net> writes:
>if (WeHaveAny)

|Function names should be lowercase, with words separated by
|underscores as necessary to improve readability.
|Variable names follow the same convention as function names.
PEP 8 (2019)

The name should not be "optimized" for a certain use case
(as for the use in an if expression) only. "We", "have",
and "any" carry little information. A name should pack as
much information as possible in as least characters as
possible. So, for me, it'd be something like:

if word_count:

.

>So, the obvious solution is to ask the language, like Python, to allow
>variables that are synonyms.

Programs already have too many names in them.
There is no need to add even more, especially
when they are equivalent, and the average human can
only hold 7 ± 2 objects (like names) in his short-
term memory.

>really good names often end up being really long names

If they are really long, they are not really good,
/except/ when they have a really large scope.

Names for a small scope can and should be short,
names for a large scope may be longer.

Some very short names have traditional meanings
and are ok when used as such:

for i in range( 10 ):

. And, as a "golden rule" for refactoring, I'd say:
When you see:

i = 0 # word count

, then remove the comment and rename "i" to "word_count"!

Re: Re: The task is to invent names for things

<b44d03e0-c81b-444d-8c53-cdcd0b3d2747n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15832&group=comp.lang.python#15832

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:ad4:4ea6:: with SMTP id ed6mr5749393qvb.30.1635445895014;
Thu, 28 Oct 2021 11:31:35 -0700 (PDT)
X-Received: by 2002:a05:6214:226c:: with SMTP id gs12mr6207878qvb.58.1635445894786;
Thu, 28 Oct 2021 11:31:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Thu, 28 Oct 2021 11:31:34 -0700 (PDT)
In-Reply-To: <mailman.120.1635441831.23718.python-list@python.org>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.97.174; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.97.174
References: <AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUeq71AAMA==>
<b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<mailman.120.1635441831.23718.python-list@python.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b44d03e0-c81b-444d-8c53-cdcd0b3d2747n@googlegroups.com>
Subject: Re: Re: The task is to invent names for things
From: jul...@diegidio.name (Julio Di Egidio)
Injection-Date: Thu, 28 Oct 2021 18:31:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 24
 by: Julio Di Egidio - Thu, 28 Oct 2021 18:31 UTC

On Thursday, 28 October 2021 at 19:24:10 UTC+2, Avi Gross wrote:

> I am sure many of us (meaning me) have often named a variable and later
> reconsidered once we saw the role it plays in various parts of the program
> and had to go back and change everything.

The best practice is as best as reasonably possible, which does cover the above (though, should you really have to "change everything", that's again rather a "smell"). And the fact that people will rather build on top of it instead of fixing it later is a totally common fact in nowadays production.

> As other have noted, it is not a
> trivial task and really good names often end up being really long names
> which are also a pain especially when other really long names start with the
> same characters. Compilers don't care but humans reading the code may give
> up!

Very long names are *not* good names...

Julio

Re: The task is to invent names for things

<eli$2110281554@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15837&group=comp.lang.python#15837

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: Thu, 28 Oct 2021 19:54:52 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2110281554@qaz.wtf>
References: <AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUeq71AAMA==> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13> <mailman.120.1635441831.23718.python-list@python.org> <b44d03e0-c81b-444d-8c53-cdcd0b3d2747n@googlegroups.com>
Injection-Date: Thu, 28 Oct 2021 19:54:52 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="12611"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Thu, 28 Oct 2021 19:54 UTC

In comp.lang.python, Julio Di Egidio <julio@diegidio.name> wrote:
> The best practice is as best as reasonably possible, which does cover
> the above (though, should you really have to "change everything", that's
> again rather a "smell"). And the fact that people will rather build on
> top of it instead of fixing it later is a totally common fact in
> nowadays production.

That just restates the problem. "The best practice is to do a good job."

> On Thursday, 28 October 2021 at 19:24:10 UTC+2, Avi Gross wrote:
>> As other have noted, it is not a
>> trivial task and really good names often end up being really long names
>> which are also a pain especially when other really long names start with the
>> same characters.

I'm usually not thrown by starting with the same string, but start
and end with the same string, with different things in the middle,
then it begins to trip me up.

>> Compilers don't care but humans reading the code may give up!

Modern compilers don't care. I've certainly come across code written
with "must be unique in the first N characters" for N somewhere in
8 to 32.

> Very long names are *not* good names...

I remember that book.

https://en.wikipedia.org/wiki/Tikki_Tikki_Tembo

Hard to recommend it now since it takes a Japanese story, puts it in
China, but uses English nonsense for the name instead of Chinese (or
Japanese) syllables.

Elijah
------
not to be confused with Kipling's mongoose story

Re: The task is to invent names for things

<ced70b85-328d-40e3-b944-7fcb40c36f83n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15839&group=comp.lang.python#15839

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:620a:1035:: with SMTP id a21mr5608185qkk.354.1635453728429;
Thu, 28 Oct 2021 13:42:08 -0700 (PDT)
X-Received: by 2002:a05:622a:2c6:: with SMTP id a6mr7263017qtx.3.1635453728131;
Thu, 28 Oct 2021 13:42:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Thu, 28 Oct 2021 13:42:07 -0700 (PDT)
In-Reply-To: <eli$2110281554@qaz.wtf>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.97.174; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.97.174
References: <AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUeq71AAMA==>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<mailman.120.1635441831.23718.python-list@python.org> <b44d03e0-c81b-444d-8c53-cdcd0b3d2747n@googlegroups.com>
<eli$2110281554@qaz.wtf>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ced70b85-328d-40e3-b944-7fcb40c36f83n@googlegroups.com>
Subject: Re: The task is to invent names for things
From: jul...@diegidio.name (Julio Di Egidio)
Injection-Date: Thu, 28 Oct 2021 20:42:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 24
 by: Julio Di Egidio - Thu, 28 Oct 2021 20:42 UTC

On Thursday, 28 October 2021 at 21:55:10 UTC+2, Eli the Bearded wrote:
> In comp.lang.python, Julio Di Egidio <ju...@diegidio.name> wrote:
> > The best practice is as best as reasonably possible, which does cover
> > the above (though, should you really have to "change everything", that's
> > again rather a "smell"). And the fact that people will rather build on
> > top of it instead of fixing it later is a totally common fact in
> > nowadays production.
>
> That just restates the problem. "The best practice is to do a good job."

No, it doesn't, you just miss the context and the point. I initially said:

"Take your time and do choose a proper name in any case (the best you can)"

and that is totally general and a best practice, period. As the rest of what I said.

> > Very long names are *not* good names...
>
> I remember that book.

I could actually explain it technically. Just not today, not to those who can't even actually read.

Have fun,

Julio

RE: The task is to invent names for things

<mailman.129.1635462739.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15841&group=comp.lang.python#15841

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: avigr...@verizon.net (Avi Gross)
Newsgroups: comp.lang.python
Subject: RE: The task is to invent names for things
Date: Thu, 28 Oct 2021 19:12:16 -0400
Lines: 124
Message-ID: <mailman.129.1635462739.23718.python-list@python.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
<mailman.120.1635441831.23718.python-list@python.org>
<names-20211028185829@ram.dialup.fu-berlin.de>
<00c501d7cc51$403dfae0$c0b9f0a0$@verizon.net>
Mime-Version: 1.0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de vADam7CVbQLb7GtQZFLXeAyHz2G8pTlX3bbwEh7olD0w==
Return-Path: <avigross@verizon.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=verizon.net header.i=@verizon.net header.b=t1+7HxUe;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.065
X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'variable': 0.05; 'have,':
0.07; 'loop': 0.07; 'pep': 0.07; 'ram': 0.07; 'compiler': 0.09;
'consistency': 0.09; 'humor': 0.09; 'int': 0.09; 'language,':
0.09; 'like,': 0.09; 'memory.': 0.09; 'obviously': 0.09; 'say:':
0.09; 'writes:': 0.09; 'url:mailman': 0.15; 'that.': 0.15;
'another.': 0.16; 'arbitrary': 0.16; 'caps': 0.16; 'char': 0.16;
'descriptive': 0.16; 'elsewhere': 0.16; 'explanatory': 0.16;
'instance': 0.16; 'interpreter': 0.16; "it'd": 0.16; 'longer.':
0.16; 'outlining': 0.16; 'received:(vzm hermes smtp server)':
0.16; 'reuse': 0.16; 'rule"': 0.16; 'rules.': 0.16; 'somewhat':
0.16; 'subset': 0.16; 'ways.': 0.16; 'october': 0.17; 'to:addr
:python-list': 0.20; 'languages': 0.22; 'way.': 0.22; 'code':
0.23; "i'd": 0.24; 'idea': 0.24; 'skip:- 10': 0.25; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'python,': 0.25; 'actual': 0.25; 'discussion': 0.25; 'examples':
0.25; 'url:listinfo': 0.25; 'url-ip:188.166/16': 0.25; 'classes':
0.26; 'object': 0.26; 'stefan': 0.26; 'task': 0.26; 'function':
0.27; 'sense': 0.28; 'ideas': 0.28; 'suggest': 0.28; 'comment':
0.31; 'convention': 0.31; 'looked': 0.31; 'url-ip:188/8': 0.31;
'think': 0.32; '(as': 0.32; 'concept': 0.32; 'context': 0.32;
'corporation': 0.32; 'objects': 0.32; 'programmers': 0.32;
'python-list': 0.32; 'structure': 0.32; 'but': 0.32;
'subject:for': 0.33; 'there': 0.33; 'hold': 0.33; 'same': 0.34;
'mean': 0.34; 'header:In-Reply-To:1': 0.34; 'words': 0.35;
'count': 0.36; 'functions': 0.36; 'people': 0.36; 'change': 0.36;
'those': 0.36; 'currently': 0.37; 'main': 0.37; 'really': 0.37;
'using': 0.37; 'others': 0.37; 'skip:i 20': 0.62; 'lower': 0.62;
'follow': 0.62; 'american': 0.63; 'involved': 0.63; 'feel': 0.63;
'assure': 0.64; 'pack': 0.64; 're:': 0.64; 'schools': 0.64; 'his':
0.65; 'parts': 0.65; 'plans': 0.65; 'similar': 0.65; 'well': 0.65;
'improve': 0.66; 'time.': 0.66; 'back': 0.67; 'foreign': 0.67;
'generally': 0.67; 'more,': 0.67; 'prevent': 0.67; 'choose': 0.67;
'right': 0.68; 'matter': 0.68; 'and,': 0.69; 'obvious': 0.69;
'only.': 0.69; 'times': 0.69; 'average': 0.70; 'rules': 0.70;
'subject:The': 0.70; '2021': 0.71; 'carry': 0.71; 'compared':
0.71; 'longer': 0.71; 'free': 0.72; 'little': 0.73; 'preferences':
0.73; 'quote': 0.74; 'combination': 0.76; 'ranging': 0.76;
'short,': 0.76; 'sent:': 0.78; 'need.': 0.84; '(like': 0.84;
'breast': 0.84; 'cancer': 0.84; 'characters': 0.84; 'chose': 0.84;
'disagree': 0.84; 'good,': 0.84; 'hold,': 0.84; 'parts.': 0.84;
'patients': 0.84; 'periods': 0.84; 'pink': 0.84; 'readability.':
0.84; 'scope': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verizon.net; s=a2048;
t=1635462736; bh=O+B1m5JfqlLaAmjxmy9Q+fKwCl1rLJijNKdGU+R4yNs=;
h=From:To:References:In-Reply-To:Subject:Date:From:Subject:Reply-To;
b=t1+7HxUeCEyDYkY98qC4gJz4bZiA/+YHYbnhnh2N2e8EHFaYRlO/dfOC03A5E3v6907nvon5q7QcuNDUywi7AYjFL2WTFu68nQCSWtbdceWHY8EMRjZNHFQTJh41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EnGsTL0YcwxFFtgx7W0F6z5yYL8u5IvgF
3vDlSuf8Lm1DXn_76eBioPcvCH7gEqG6_ppqs38yn9czxwb3zBrITsGdHBwbdGF9vTKgy8jbc_.O
4vVWwiRfLqcMKvWSrj4V5q_QIL4Akx.VsHwKJ58F8ZmCxpBpCHPdeEncfF4H1ltt0agm1NNBAr6o
CPtjoos8aTjCuPVtvuGO4UNsWDm8KAgoR9fcaNaC7DHKkekvtuQUqBocw13ESnOV7eWYSZDiO4vZ
7QqClMFdMIi8uxG1A8jxvbpTFQtOyYzfETExtZ5Jz.Yua94o8aNZHHGohHlIDvd6ppOIhywp8VTO
FthimxdxBgXIT4KdoC2iazeRpaRZGFMVSUGX3_5S.WbNWC_SwBIeax2bZx1Yuno_5SEex1IY3qTx
WyT91cuHevhyzMy6pIJzGmDNE6wh9RBp1mQxLPHj_QmjvDoszwQFvmLbiSRnVbnvmTWh2PkDfog.
bmnQWDQfXfxxcF6ChGjNFymdnzkPjGaF93ekKNmQukFJPc0jmEhIO9hVutRyODRrCKpnCH8friYO
A1cOk3L8kNIYi75qeK3ip3ALdVylYOi1J1VwR8eoAP5ayUgpUK1U3eaLnWdLRSM_be7eGltq1YiA
LPEkVGg.LBJJDpRes8ZpekaFF.P8Yv.DhZ0Xu3tcrX3C.RdJNUY_uAX9XEwoDEsktRbOsNUxSBRm
gdZqmC8GOKn9a41_8lPnd0Opii7gzVMGQoUTYYWJoL4t1htFy6tRNkE8ZkCg.xID5AfBazl2uBds
DOVzBKKQS59Adb5A9jX2p3qTzeazeOjzJiNPBJD69lO_ebIjp45gqyw6TxTez.8n1uYluhoFYZ7z
6BN1._zSDa8ekB1IgFbFK
X-Sonic-MF: <avigross@verizon.net>
In-Reply-To: <names-20211028185829@ram.dialup.fu-berlin.de>
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUcAwAfdMAFvBPdwAtic8Jyqx3GpcA==
Content-Language: en-us
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <00c501d7cc51$403dfae0$c0b9f0a0$@verizon.net>
X-Mailman-Original-References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
<mailman.120.1635441831.23718.python-list@python.org>
<names-20211028185829@ram.dialup.fu-berlin.de>
 by: Avi Gross - Thu, 28 Oct 2021 23:12 UTC

Stefan,

I choose not to get involved in a discussion about arbitrary naming rules as many languages and programmers have their own ideas and preferences and rules.

My examples were EXAMPLES and the actual names are irrelevant. Feel free not to use them and I assure you I have no plans to either.

My POINT was that people choose names as being descriptive in many ways, often unique to themselves or to their organizations. A name that may be considered quite useful and explanatory in one context is not in another. Specifically, names chosen using American English may mean little if looked at by programmers elsewhere or if they are chosen with a sense of humor or the like, may not make sense to those who are not in on the ideas involved. Naming a variable PINK (in any combination of upper or lower case you feel like may make you think it fits when using it to count Breast Cancer patients but many will have no idea why you chose that.

I strenuously disagree with many things you quote as being obviously true. Nonsense! Programs need whatever number of variables they need. There is no reason you must reuse the same variable of "i" or "index" for every loop nor why it must be different every time. Nor must names lengths be determined by the length of scopes. You are quoting, presumably, from some document outlining what a corporation or University or such are doing to try to get a consistency across their programmers. Fine, I have seen multiple CONTRADICTORY such declarations and it is often a matter of taste. In some languages I use periods in longer variable names and in others I use underscores and many times I use camelCase, Hungarian notation and others. The compiler and interpreter generally do NOT care.

To bring this back to python, does it have any serious rules or informal ones as compared to others? I have seen places that suggest constants be all CAPS and Classes should be capitalized and regular variables never capitalized and endless variations on such themes. I have seen places they suggest adding parts to names such as the units so you have xxxDollars versus xxxFeet or where they want each variable to contain a similar suffix (or prefix) specifying the type of the object such as int or char or objectXY as one way to make things clearer or help prevent errors. There are MANY schools of thought and I suggest no one right way.

My thought was that no matter what methodology for naming you have, it may not work quite well if the same variable is used in contexts ranging from does it currently exist, how much does it hold, is it "true" as in non-empty, or the value it has when switched to another form of measurement. It is common often to encapsulate something into an object and then use instance variables or functions to address it different ways. So an object called incomedata might be used as incomedata.count in one context and incomedata.nonempty() in another. That is not the same as my talking about synonyms. And note many languages allow you to create somewhat dynamic synonyms such as a view of a subset of something like an array using another variable and allowing it to represent the current state of the main data structure or even change selected parts. It is not at all a foreign concept to have multiple names point to the same things. Often, it helps make the code clearer.

-----Original Message-----
From: Python-list <python-list-bounces+avigross=verizon.net@python.org> On Behalf Of Stefan Ram
Sent: Thursday, October 28, 2021 2:07 PM
To: python-list@python.org
Subject: Re: The task is to invent names for things

Supersedes: <names-20211028185041@ram.dialup.fu-berlin.de>
[corrected two typos]

"Avi Gross" <avigross@verizon.net> writes:
>if (WeHaveAny)

|Function names should be lowercase, with words separated by underscores
|as necessary to improve readability.
|Variable names follow the same convention as function names.
PEP 8 (2019)

The name should not be "optimized" for a certain use case
(as for the use in an if expression) only. "We", "have",
and "any" carry little information. A name should pack as
much information as possible in as least characters as
possible. So, for me, it'd be something like:

if word_count:

.

>So, the obvious solution is to ask the language, like Python, to allow
>variables that are synonyms.

Programs already have too many names in them.
There is no need to add even more, especially
when they are equivalent, and the average human can
only hold 7 ± 2 objects (like names) in his short-
term memory.

>really good names often end up being really long names

If they are really long, they are not really good,
/except/ when they have a really large scope.

Names for a small scope can and should be short,
names for a large scope may be longer.

Some very short names have traditional meanings
and are ok when used as such:

for i in range( 10 ):

. And, as a "golden rule" for refactoring, I'd say:
When you see:

i = 0 # word count

, then remove the comment and rename "i" to "word_count"!

--
https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

<5527d01a-68ee-4086-ba2f-979f92467850n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15849&group=comp.lang.python#15849

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:620a:bc1:: with SMTP id s1mr7577237qki.49.1635487152566;
Thu, 28 Oct 2021 22:59:12 -0700 (PDT)
X-Received: by 2002:a37:9307:: with SMTP id v7mr7199617qkd.371.1635487152382;
Thu, 28 Oct 2021 22:59:12 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Thu, 28 Oct 2021 22:59:12 -0700 (PDT)
In-Reply-To: <mailman.129.1635462739.23718.python-list@python.org>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.99.218; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.99.218
References: <AQIsO84/6d0mmDBqQGevts3pjsApGALGgNeJAnL8M0IBlTWVWwIPGRX5ATDkiUcAwAfdMAFvBPdwAtic8Jyqx3GpcA==>
<b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <mailman.120.1635441831.23718.python-list@python.org>
<00c501d7cc51$403dfae0$c0b9f0a0$@verizon.net> <names-20211028185829@ram.dialup.fu-berlin.de>
<mailman.129.1635462739.23718.python-list@python.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5527d01a-68ee-4086-ba2f-979f92467850n@googlegroups.com>
Subject: Re: The task is to invent names for things
From: jul...@diegidio.name (Julio Di Egidio)
Injection-Date: Fri, 29 Oct 2021 05:59:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Julio Di Egidio - Fri, 29 Oct 2021 05:59 UTC

On Friday, 29 October 2021 at 01:12:40 UTC+2, Avi Gross wrote:
> Stefan,
>
> I choose not to get involved in a discussion about arbitrary naming rules as many languages and programmers have their own ideas and preferences and rules.

The majority of people in this area for the most part are simply and utterly incompetent, so incompetent that you can't even guess how incompetent you are, nor you can see competence when you encounter it.

Because building software is *the most complex engineering that there is*: add to that the sorry state of an entire industry thanks to 25+ years of the fake agility and the most insane speculations ad nauseam.

> My POINT

You should just shut up and learn for a change (from me of course, not from some other fraudulent wannabe such as Stefan). But that is sci-fi of course, you stupid cunts rather take any advice as a personal insult...

Fuck off you and the permanent shithole for everybody.

(EOD.)

Julio

Re: The task is to invent names for things

<names-20211029140714@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15855&group=comp.lang.python#15855

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: 29 Oct 2021 13:10:34 GMT
Organization: Stefan Ram
Lines: 40
Expires: 1 Dec 2021 11:59:58 GMT
Message-ID: <names-20211029140714@ram.dialup.fu-berlin.de>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info> <YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at> <mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13> <004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <mailman.120.1635441831.23718.python-list@python.org> <names-20211028185829@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de craSbX+zVYRFDIDwaJ7ijwo0zM5mPw6AkfFs9m5ZdMhqCg
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Fri, 29 Oct 2021 13:10 UTC

ram@zedat.fu-berlin.de (Stefan Ram) writes:
>Some very short names have traditional meanings
>and are ok when used as such:

Since this is comp.lang.python, one might add that a special
property of Python is that several common words already are
taken by the language or library.

list
set
pass
as
is
....

The standard solution is to add an underscore when one wants
to use such words as names.

list_
set_
pass_
as_
is_
....

As a kind of a metonymy, classes are often named like their
objects. For example, "list" is not /a/ list, but the /class/
of lists. When one writes:

list = list()

, this then will hide the name for the class by the name of
one of its object. Recently, I have been naming some classes
with names ending in "_class", so that I can write, for example,

text = text_class()

.

Re: The task is to invent names for things

<slhltu$10bn$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15857&group=comp.lang.python#15857

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!0BUoxIKeUVSm8bQj8XmtkA.user.46.165.242.75.POSTED!not-for-mail
From: alister....@ntlworld.com (alister)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: Fri, 29 Oct 2021 20:35:10 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <slhltu$10bn$1@gioia.aioe.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<mailman.55.1635285142.23718.python-list@python.org>
<dough-20211026231056@ram.dialup.fu-berlin.de>
<words-20211026232015@ram.dialup.fu-berlin.de>
<27138c0a-9db1-bdc1-fcc3-0942c860e5e0@DancesWithMice.info>
<mailman.58.1635290116.23718.python-list@python.org>
<naming-20211027003540@ram.dialup.fu-berlin.de>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="33143"; posting-host="0BUoxIKeUVSm8bQj8XmtkA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378
git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: alister - Fri, 29 Oct 2021 20:35 UTC

On Thu, 28 Oct 2021 00:41:41 +0200, Peter J. Holzer wrote:

> On 2021-10-27 12:41:56 +0200, Karsten Hilbert wrote:
>> Am Tue, Oct 26, 2021 at 11:36:33PM +0000 schrieb Stefan Ram:
>> > xyzzy = lambda x: 2 * x
>> > . Sometimes, this can even lead to "naming paralysis", where one
>> > thinks excessively long about a good name. To avoid this naming
>> > paralysis, one can start out with a mediocre name. In the course of
>> > time, often a better name will come to one's mind.
>>
>> In that situation, is it preferable to choose a nonsensical name over a
>> mediocre one ?
>
> I don't know. A mediocre name conveys at least some information, and
> that seems to be better than none. On the other hand it might be just
> enough to lead the reader astray which wouldn't happen with a
> non-sensical name.
>
> But since perfect names are hard to find, using nonsensical instead of
> mediocre names would mean choosing nonsensical names most of the time.
> So I'll stick with mediocre names if in doubt.
>
> hp

Although if a mediocre name is chosen there is less impetus on the
programmer to change it, "its not great but it'll do"
where as a nonsense name sticks out like a saw thumb until it is
corrected.
I am firmly undecided

--
Riches cover a multitude of woes.
-- Menander

Re: The task is to invent names for things

<slhm3u$10bn$2@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15858&group=comp.lang.python#15858

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!0BUoxIKeUVSm8bQj8XmtkA.user.46.165.242.75.POSTED!not-for-mail
From: alister....@ntlworld.com (alister)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: Fri, 29 Oct 2021 20:38:22 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <slhm3u$10bn$2@gioia.aioe.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org>
<eli$2110272038@qaz.wtf>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="33143"; posting-host="0BUoxIKeUVSm8bQj8XmtkA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378
git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: alister - Fri, 29 Oct 2021 20:38 UTC

On Thu, 28 Oct 2021 00:38:17 +0000, Eli the Bearded wrote:

> In comp.lang.python, Peter J. Holzer <hjp-python@hjp.at> wrote:
> ^^^^^^
>
> Those all work. But if you are writing a new web framework and you name
> your method to log stuff to a remote server "Britney" because you were
> listening the singer, that's not perfectly fine, even you want to make
> "Oops, I did it again" jokes about your logged errors.

Although Oops would be aq pretty reasonable name for a logger or error
handler...
>
>
> Elijah ------
> naming is hard, unless it's easy

--
After a number of decimal places, nobody gives a damn.

Re: The task is to invent names for things

<mailman.142.1635548659.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15862&group=comp.lang.python#15862

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonL...@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: Sat, 30 Oct 2021 12:04:06 +1300
Organization: DWM
Lines: 200
Message-ID: <mailman.142.1635548659.23718.python-list@python.org>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
<mailman.120.1635441831.23718.python-list@python.org>
<names-20211028185829@ram.dialup.fu-berlin.de>
<48da8f66-9a13-f9b7-02c3-85e5b4833319@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 1YGPfwi8keJYRgxrYY+boQay2l06EeeLkkVhSSM5U7hQ==
Return-Path: <PythonList@DancesWithMice.info>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=danceswithmice.info header.i=@danceswithmice.info
header.b=JP7RN1c2; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.016
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'comments': 0.03; '(which':
0.04; 'argument': 0.04; 'variable': 0.05; '(to': 0.07; 'ram':
0.07; 'real-world': 0.07; '=dn': 0.09; 'answer:': 0.09;
'europython': 0.09; 'expression': 0.09;
'from:addr:danceswithmice.info': 0.09; 'from:addr:pythonlist':
0.09; 'language,': 0.09; 'memory.': 0.09; 'readable': 0.09;
'say:': 0.09; 'import': 0.15; 'although,': 0.16; 'collection,':
0.16; 'ctr': 0.16; 'folk': 0.16; 'functions,': 0.16; 'idiomatic':
0.16; 'indeed': 0.16; 'integer': 0.16; 'isolated': 0.16; "it'd":
0.16; 'longer.': 0.16; 'message-id:@DancesWithMice.info': 0.16;
'optimal': 0.16; 'originated': 0.16; 'prefix': 0.16; 'pythonic':
0.16; 'readability': 0.16; 'received:51.254': 0.16;
'received:51.254.211': 0.16; 'received:51.254.211.219': 0.16;
'received:cloud': 0.16; 'received:rangi.cloud': 0.16;
'refactoring': 0.16; 'rule"': 0.16; 'typing': 0.16; 'using:':
0.16; 'variables,': 0.16; 'whilst': 0.16; 'word,': 0.16; 'word:':
0.16; 'wrote:': 0.16; 'values': 0.17; 'uses': 0.19; 'name.': 0.19;
'to:addr:python-list': 0.20; 'input': 0.21; 'written': 0.22;
'languages': 0.22; 'code': 0.23; "i'd": 0.24; 'idea': 0.24;
'(and': 0.25; 'python,': 0.25; 'again,': 0.26; 'object': 0.26;
'stefan': 0.26; 'else': 0.27; 'function': 0.27; 'fact': 0.28;
'it,': 0.29; 'header:User-Agent:1': 0.30; 'comment': 0.31;
'header:Organization:1': 0.31; 'think': 0.32; '(as': 0.32;
'context': 0.32; 'objects': 0.32; 'point,': 0.32; 'said,': 0.32;
'words,': 0.32; 'but': 0.32; 'subject:for': 0.33; 'there': 0.33;
'hold': 0.33; 'someone': 0.34; 'able': 0.34; 'same': 0.34;
"didn't": 0.34; 'skip:" 20': 0.34; 'header:In-Reply-To:1': 0.34;
'track': 0.35; 'understood': 0.35; 'words': 0.35; 'yes,': 0.35;
'less': 0.65; 'years': 0.65; 'wish': 0.66; 'improve': 0.66;
'received:userid': 0.66; 'now,': 0.67; 'more,': 0.67; 'time,':
0.67; 'video': 0.68; 'adds': 0.69; 'analyse': 0.69; 'and,': 0.69;
'counter': 0.69; 'etc,': 0.69; 'historical': 0.69; 'obvious':
0.69; 'only.': 0.69; 'within': 0.69; 'average': 0.70;
'subject:The': 0.70; 'carry': 0.71; 'interesting': 0.71; 'free':
0.72; 'little': 0.73; 'name,': 0.75; 'price': 0.75; 'choice':
0.76; 'received:localhost.localdomain': 0.76; 'short,': 0.76;
'damage': 0.80; 'names,': 0.81; 'queries': 0.81;
'received:localdomain': 0.81; 'spent': 0.81; 'reasons': 0.84;
'(like': 0.84; 'aka': 0.84; 'characters': 0.84; 'chocolate': 0.84;
'good,': 0.84; 'one:': 0.84; 'others...': 0.84; 'pointer': 0.84;
'received:47': 0.84; 'required)': 0.84; 'scope': 0.84; 'thus,':
0.84; 'thus:': 0.84; 'words:': 0.84; 'us,': 0.89; 'door': 0.91;
'greater': 0.91; 'illustration': 0.91; 'of:': 0.91; 'pop': 0.91;
'relates': 0.91; 'worry': 0.95; 'guides': 0.96
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on vps517507.ovh.net
X-Spam-Level:
X-Spam-Status: No, score=-5.5 required=5.0 tests=ALL_TRUSTED,BAYES_00,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A autolearn=ham
autolearn_force=no version=3.4.0
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.rangi.cloud 4C6374A9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1635548655;
bh=uk9XZvgVyg8OeCE2N3lbP6O8H0IHPBng8BZKNMq/bjE=;
h=Subject:To:References:From:Date:In-Reply-To:From;
b=JP7RN1c2eZ19KiKfj6u+b1IpVdEf60LaZ1CF0wfU0ieLdL0w/kmsNynMRloNbh3qc
njHqibdG7MTtm+D+T2zelaW0koo6rLsLVmvAfa0NioAaZTi6cI8DIe/loLUNKTR4Cu
R+SbjPDbyCpzUq/3k0s+mksjpuX8sxWa0rjdXqts8/JDyXJTmNnylW+X/j17vV6d62
9Q76w8XFFhy5p7GSoDtfUDhEOZB7tQxUGeXBYRdl5UgTr7VU9KkYPMJJ/VwyPiVnsx
bNm7dLGBKknfDAhmjHrmVkIHv2LJVmtpk86QPUKFjQUjdQJ0r+gLBAl7bVEMZ2bQNz
Jt9sYO/CDEx0w==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
In-Reply-To: <names-20211028185829@ram.dialup.fu-berlin.de>
Content-Language: en-GB
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <48da8f66-9a13-f9b7-02c3-85e5b4833319@DancesWithMice.info>
X-Mailman-Original-References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info>
<YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at>
<mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf>
<trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13>
<004801d7cc20$90f8c040$b2ea40c0$@verizon.net>
<mailman.120.1635441831.23718.python-list@python.org>
<names-20211028185829@ram.dialup.fu-berlin.de>
 by: dn - Fri, 29 Oct 2021 23:04 UTC

On 29/10/2021 07.07, Stefan Ram wrote:
> The name should not be "optimized" for a certain use case
> (as for the use in an if expression) only. "We", "have",
> and "any" carry little information. A name should pack as
> much information as possible in as least characters as
> possible. So, for me, it'd be something like:

Although, does that not imply that "pack[ing]...information" is primary,
and "least characters..." secondary?

How else to define "readability" (wrt 'names')?

> if word_count:

Yes, but this does open the door to the 'gotchas' of truthiness, ie
there ain't no such thing as a free lunch/"silver bullet".

Whereas, names such as:

is_valid
words

help to imply a boolean and a collection, resp. (cf the micro-softy way
of imposing the language-technicalities over naming-readability, eg

bValid

Thereafter, to counter the idea of not having too many names, there may
be an argument for setting-up one's data to be able to code:

if is_valid:
while word_count:
# pop word from words and do something...

so now we have a data-set which includes:

words: a collection, eg arriving to us from some input
word: one item from words, isolated for processing
word_count: a convenient expression of len( words )
is_valid: an indicator that the words received are ready for our process

(not that I 'like' "is_valid" but need a specific context to improve that)

The "is_" prefix appeals to me because it is so English-like (dare I say
COBOL-like?) that readability is in no doubt. At the same time, whilst
it could be considered and 'extra' name/extra-effort, it adds precision
to the logic.

YMMV!
Indeed some may wish to argue that the data-set includes unnecessary
verbiage, and that this in-and-of-itself might contribute to
cognitive-overload...

import this

>> So, the obvious solution is to ask the language, like Python, to allow
>> variables that are synonyms.
>
> Programs already have too many names in them.
> There is no need to add even more, especially
> when they are equivalent, and the average human can
> only hold 7 ± 2 objects (like names) in his short-
> term memory.

+1

aka "cognitive overload"

@Martin's term is "naming paralysis", which fits as a component of
"analysis paralysis", cf 'let's get on with it'!

(which summed-up how I felt abstracting and refactoring a function this
morning - dithering and vacillating like I couldn't decide between
chocolate cake or chocolate pudding...)

Which point, when referred to synonym variables, gives the optimal
answer: "both" (cake and pudding!)

When you think about it, passing values to functions, ie an argument
becomes a parameter, that can be considered a form of synonym.

(and (before someone disappears off on another unintended tangent) some
circumstances where it is not!)

>> really good names often end up being really long names
>
> If they are really long, they are not really good,
> /except/ when they have a really large scope.
>
> Names for a small scope can and should be short,
> names for a large scope may be longer.

Interesting! Surely as something becomes more specific, there is more
meaning and/or greater precision to be embedded within the name. Thus:

operator

assignment_operator
walrus_operator

> Some very short names have traditional meanings
> and are ok when used as such:
>
> for i in range( 10 ):

For historical (?hysterical) reasons I find myself agreeing with this.
(in FORTRAN any variable beginning with the letters "I" through "N" was
regarded as an integer - all others being real/floating-point - thus, it
is a familiar idiom.

That said, this form of for-loop is reminiscent of other languages which
use "pointers" to access data-collections, etc, and keep track of where
to logic is within the process using "counters" - none of which are
necessary in pythonic for-loops.

Accordingly, there is an argument for using:

for ptr in range( 10 ):
for ctr in range( 10 ):

(or even the complete word, if that is the functionality required)

The above allowing for the fact that I have my own 'set' of 'standard
abbreviations' which are idiomatic and readable to me (!). One of which is:

for ndx in range( 10 ):

This abbreviation originated in the days when variable-names had to be
short. So, one tactic was to remove vowels*. Once again, more readable
(to me) than "i", but possibly less-than idiomatic to others...

That said, watching a video from EuroPython 2021, I was amused to see:

for idx in range( 10 ):

and doubly-amused when I experimented with the idea as-presented and
'copied' the code by 'translating' his "idx" into the English "index",
and whilst typing into my own REPL, cogno-translated the thought into my
own "ndx" expression.

Now, I don't know if the EuroPython author uses "idx" because that
relates somehow to his home-language. However, if we analyse such
abbreviations, their writing is a personal exercise. Whereas,
measuring/assessing "readability" involve neither "writing" nor
"personal" at its core. Thus, if there is a "jargon" abbreviation which
is readily understandable, is it so 'bad' just because it is not a
complete (English) word?

Until I spent more (?too much) time with folk who formed their Style
Guides as super-sets of PEP-008, I didn't worry too much about these
abbreviations. People 'here' are amongst those who dislike(d) my use of:

idNR - id = identification (?), number (NB suffix)
NUMwords = number in/len() of a collection (NB prefix)
arrayPTR = pointer to specific member within array

The interesting thing about some of these (aside from PEP-008) is that
they are very historial - as above. Accordingly, it is 'the youngsters'
who object more vociferously (aside from pedants, like trainers, er,
cough, splutter). Yet, until a few years ago I would not have understood
"OMG" and similar 'text-isms' that have escaped into the real-world from
cell-phones. Yet, asking (a youngster) what (s)he means will
stereotypically involve a shrug or eye-roll (patent-pending) indicating
that I should not need to ask because 'everyone' knows!

(OK, so am I allowed to give you a few PTRs about politesse?)

NB I find that 'modern IDEs' and sundry plug-ins are possibly more
responsible for making me PEP-008-compliant than any human(s). The
nagging splatters of queries and criticisms are even less
politically-correct than aforementioned ageist youngsters!

> . And, as a "golden rule" for refactoring, I'd say:
> When you see:
>
> i = 0 # word count
>
> , then remove the comment and rename "i" to "word_count"!

Yes, a beautiful illustration of why comments can cause more damage than
they should (theoretically) be helping us, readers, avoid...

Two for the price of one: criticising the choice of name, and the choice
of comment!

* see also written Classical Arabic
--
Regards,
=dn

Re: The task is to invent names for things

<naming-20211030004355@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15868&group=comp.lang.python#15868

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: The task is to invent names for things
Date: 30 Oct 2021 00:29:39 GMT
Organization: Stefan Ram
Lines: 129
Expires: 1 Dec 2021 11:59:58 GMT
Message-ID: <naming-20211030004355@ram.dialup.fu-berlin.de>
References: <b9eec9b9-e3f7-289b-c34e-94efc67f5f1b@DancesWithMice.info> <YXks9MObZ0JYBpP8@hermes.hilbert.loc> <YXnVpWHYh6xGQoXr@hjp.at> <mailman.98.1635374503.23718.python-list@python.org> <eli$2110272038@qaz.wtf> <trinity-d8216cba-6848-463c-bcf6-cab3b0cb1341-1635403773170@3c-app-gmx-bs13> <004801d7cc20$90f8c040$b2ea40c0$@verizon.net> <mailman.120.1635441831.23718.python-list@python.org> <names-20211028185829@ram.dialup.fu-berlin.de> <48da8f66-9a13-f9b7-02c3-85e5b4833319@DancesWithMice.info> <mailman.142.1635548659.23718.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de PQt+ZKFj0HXE/UtQktQnXQsUmZrIdvwKvXV+8Lpz9SS7Vj
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Sat, 30 Oct 2021 00:29 UTC

dn <PythonList@DancesWithMice.info> writes:
>On 29/10/2021 07.07, Stefan Ram wrote:
>>The name should not be "optimized" for a certain use case
>>(as for the use in an if expression) only. "We", "have",
>>and "any" carry little information. A name should pack as
>>much information as possible in as least characters as
>>possible. So, for me, it'd be something like:
>Although, does that not imply that "pack[ing]...information" is primary,
>and "least characters..." secondary?
>How else to define "readability" (wrt 'names')?

To illustrate this:

I might have a variable to hold the count of words in an
input file. It could be named:

count_of_words_in_the_input_file

. But I do not want to tell whole stories in a single name.
So, I should choose the two or three words most important
and distinctive:

count_of_words

and then reverse them to get rid of the "of", thus:

word_count

. However, when I suddently have /two/ input files (one
"English input file" and one "French input file"), I might
need to use:

count_of_english_words
count_of_french_words

and then reduce them to

english_count
french_count

. Now, "english" and "french" are more important and
distinctive than "word", so I have kept them and thrown
away "words". But when I also start to count /characters/
I would be forced to use

english_words
french_words
english_chars
french_chars

. The "count" made it clear that these are not the words
themselves but their count, but here I have removed it for
brevity. I try to find a reasonable compromise between
length and clarity.

>When you think about it, passing values to functions, ie an
>argument becomes a parameter, that can be considered a form
>of synonym.

Yes, but of course only by its /value/, i.e., "def f( x ): x =
x + 1" does not change the argument. And I think the word
"synonym" was intended to be implemented so that the following
will print "4" when a and b are synonyms:

a = 3
b = 4
print( a )

(something like this is possible in C++).

>This abbreviation originated in the days when variable-names
>had to be short. So, one tactic was to remove vowels*. Once
>again, more readable (to me) than "i", but possibly less-than
>idiomatic to others...

Yes, I think the observation that the consonants carry more
information has been made often.

The English word "admirable" is pronounced [ˈæd mər əb əl],
i.e., the vowels written "i", "a", and "e" are all
pronounced using the same sound, the mumble sound [ə] called
"schwar". So, in spoken English, many vowels already are
"neutralized" or, in fact, removed: "admirable" (in fast
speech) also is pronounced [ˈæd m̩ rəb l̩] with a so called
"syllabic" [m̩] and a "syllabic" [l̩], where now the [m̩] and
[l̩] are "intense" consonants and two of the vowels-in-writing
are totally gone in the pronunciation. So, the word is quite
readable when written as "admrbl".

>>Names for a small scope can and should be short,
>>names for a large scope may be longer.
>Interesting!

When the scope is small, it is more easy to overlook the
definition and all uses, so the name does not have to carry
that much information:

def example():
name = input( "What's you name?" )
print( f"Hi, {name}!" )

. Here we do not ask "The name /of what/ is this?",
so it does not have to be called "name_of_the_current_user".
Just "name" is sufficient.

When the scope is larger, a longer name also serves to
avoid name clashes and it is more important to carry more
information to the site where it is used. It is also less
likely to be used in any line of code than a local variable,
so that it's not so bad if one has to type it in (because
this is less often necessary than with a local variable).

>The interesting thing about some of these (aside from PEP-008) is that
>they are very historial - as above. Accordingly, it is 'the youngsters'
>who object more vociferously (aside from pedants, like trainers, er,
>cough, splutter).

Of course, PEP 8 is not any kind of law, it is only intended
for the Python code comprising the /standard library/. But
sometimes people /are/ searching for guidance in the field
of programming style, and they are happy when someone gives
them a guideline, so they don't have to think about certain
choices themselves again and again and then have to remember
how they decided the last time to stay consistent with it or
even write their own style guide. And when several people work
one the same project, it's best when they all follow the same
style rules.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor