News for hackers. Stuff that matters.
Re:What are some good and bad names you've encountered in Py... by jjgreen on Monday May 22, 2023 @04:57AM (#36028930)
Do you mean names of variables, functions etc?
Re:What are some good and bad names you've encountered in Py... by rekahrv on Monday May 22, 2023 @05:20AM (#36029059)
Yes, exactly. Thanks for the clarifying question. :-)

Any kind of artifact in code: modules, functions, classes, arguments, variables...

Re:What are some good and bad names you've encountered in Py... by jjgreen on Monday May 22, 2023 @06:06AM (#36029379)
Ones that used to annoy me were in the standard library, in particular the unitest module with camel-case functions (assertEqual and so on), I've seen this justified by it being old and predating the snake-case conventions, but surely assert_equal could have lived alongside the older names. Moot now that I've switched to pytest of course ...
Re:What are some good and bad names you've encountered in Py... by rekahrv on Monday May 22, 2023 @06:54AM (#36029780)
Yeah, anything that contradict s PEP-8 conventions looks unnatural in Python. :-)
Re:What are some good and bad names you've encountered in Py... by Kinsley89 on Monday May 22, 2023 @06:12AM (#36029433)
Some good names I’ve seen are descriptive, consistent, and follow PEP 8 conventions. Some bad names I’ve seen are vague, misleading, or too long or short.
Re:What are some good and bad names you've encountered in Py... by rekahrv on Monday May 22, 2023 @06:50AM (#36029746)
I agree with those points, both on the positive and negative side. Do you have some examples of vague or misleading names?
Re:What are some good and bad names you've encountered in Py... by hitchstory on Monday May 22, 2023 @06:19AM (#36029481)
Good and bad names are a result of context.
Re:What are some good and bad names you've encountered in Py... by rekahrv on Monday May 22, 2023 @06:52AM (#36029771)
Yes, that's a great point. Some names are generally unclear, but more often, they are unclear in a context. Do you have some "contextual" examples?
Re:What are some good and bad names you've encountered in Py... by hitchstory on Monday May 22, 2023 @10:57AM (#36032258)
The worst was "leading indicator". It was used initially to mean inputs to a machine learning model, but it organically spread to refer to almost any form of data at any point in the ML pipeline.
Re:What are some good and bad names you've encountered in Py... by rekahrv on Monday May 22, 2023 @11:35AM (#36032789)
That's an interesting example. Also, the same pattern has happened to other terms as well: 1. At first, a quite specific meaning. 2. As time goes on, the same term gets used for more & more things.