"Temporary" Variable

Steven D'Aprano steve at REMOVETHIScyber.com.au
Fri Feb 24 06:00:25 EST 2006


On Fri, 24 Feb 2006 01:50:40 -0800, bonono wrote:

> Steven D'Aprano wrote:
>> Just out of curiosity, when do you think is the right time to begin
>> teaching programmers good practice from bad? Before or after they've
>> learnt bad habits?
> 
> When you have authority over the coding guideline. 

By that logic, only senators and other government ministers are allowed
to tell people "Committing murder is strongly discouraged, don't do it",
because only they have authority over what is made law and what is not.

I don't need to be Guido van Rossum to know that calling a dict
"myFloat" is a terrible idea. Your suggestion that one needs somehow to be
authorized (by whom?) before you are allowed to point out poor programming
practice not only goes against the entire community ethos of
comp.lang.python, but is offensive in the extreme.


> Naming things is not
> something limited to programming and most people know the importance of
> choosing the appropriate ones. 

"Most people". Let's not mention the Chevy Nova ("it won't go") then,
will we? 

Car manufacturers seem to have a talent for not just choosing
bad names, but for getting them horribly, horribly wrong. I suggest
you google on "Opel Ascona", "Buick LaCrosse", "Honda Fitta", "Mitsubishi
Pajero", and the "Mazda LaPuta", to discover just why those cars went over
like lead balloons in places like Spain, Finland and Quebec.

But I digress. What of those that don't know the importance of choosing
appropriate names? We should just let them shoot themselves in the foot,
even when it is obvious to Blind Freddy that they are struggling with some
really basic concepts, and that they probably don't even know the gun is
loaded?


> If on the other hand some names have
> been chosen that have actual side effect(in python program), like
> builtin function names, it is appropriate to point that out, 

By your earlier logic, that should only be permitted to those who have
authority to create builtins, certainly not the likes of you and me. 


-- 
Steven.




More information about the Python-list mailing list