Environment vars

dn PythonList at DancesWithMice.info
Wed Nov 25 14:17:31 EST 2020


>> I've got a program which accepts an optional env variable listing a single
>> or multiple directory for the app to use. I've done a bit of a search and
>> see both a comma and semicolon being used/suggested as a path separator.
>> Any consensus on which is better?
...
> The one thing I really would *not* recommend is a DWIM arrangement of
> having it guess at which delimiter to use. :)


Interesting description. Historically I've always quoted "Postel's Law":

<<<
Robustness principle
In computing, the robustness principle is a design guideline for software:

Be conservative in what you do, be liberal in what you accept from 
others (often reworded as "Be conservative in what you send, be liberal 
in what you accept").
The principle is also known as Postel's law, after Jon Postel, who wrote 
in an early specification of TCP:[1]
 >>>
https://en.wikipedia.org/wiki/Robustness_principle


More recently, folk have been reading Steve Krug - "oh you mean, Don't 
Make Me Think!"; which I fear is too readily taken literally, if not as 
non sequitur.
https://en.wikipedia.org/wiki/Don%27t_Make_Me_Think
(but reading the book will be time well-spent by anyone working at the 
'front end'!)


In psychology the jargon is "satisficing" - being happy with whichever 
works when we try it: Why look [for a label]? I'll just push the door 
away from me - and if that doesn't work, then I'll pull on the handle 
(but if it's locked, my frustration will result in words being said...) 
How quickly does something 'easy' move from 'who cares' to 'almost anger'?

So, if some users are likely to assume commas, but others [semi-]colons, 
perhaps the best service is to enable either/both! (hint: str.translate() )

Conversely, consider the level of frustration faced by a user who 
expects one thing but is *restricted* to something else, eg sites which 
ask one to register a password, but don't advise up-front that they 
require some arcane combination/mix of characters - until after you've 
entered your [ignorant] choice - twice. Grrr!
-- 
Regards =dn


More information about the Python-list mailing list