Friday, May 05, 2017

What's in a name?

tl;dr: I'm changing the name of "__nonstandard__" back to "__experimental__".

Struggling with naming things

Since I discovered Python and started programming as a hobby in my early forties, I've often found it difficult to come up with "the right name". My first real program followed in the footsteps of Guido van Robot (aka GvR, one of the best ever named Python computer programs), and was uninspiringly named RUR-PLE, meant as an acronym.  It spite of this poorly constructed name, RUR-PLE/rur-ple  became somewhat popular, having been downloaded well over 50000 times - but I always wondered if it would have been more easily found and popular if its name had been a short phrase with either the word "robot" of "karel" in it.

I remember reading comments about Crunchy (originally known as Crunchy Frog, after a famous Monty Python sketch, and later shortened since another open source program was named Crunchy Frog) indicating that such a silly name should not be taken seriously.

My best-named experimental program was probably docpicture, which was meant to easily enhance docstrings so that, using an alternative to Python's help() function, one could see docstrings with relevant embedded images. As an example, here was an example for a turtle module, and another one for sequence diagrams.  When using docpicture, a browser would be launched to view the resulting enhanced docstring. This felt somewhat unnatural when dealing with Python code and contributed to my abandoning this idea.  Nowadays, with the Jupyter notebook available, such an enhancement to traditional doctrings might be worth revisiting.

However, docpicture was an exception: I do not find the names of other programs I have written inspiring in any way.

This brings me to "experimental/nonstandard".  When I first started looking at ways to easily explore modifications/additions to Python syntax,  having a construct like

from __experimental__ import some_syntax

seemed a logical choice.  When I found out that this construct had been suggested before (in a different context), and even though it had not been adopted, I thought I should come up with an alternative.  Thus __experimental__ became __nonstandard__.

However, I believe that this new name gives the wrong impression. If I come accross some code in a repository and I see something like

from __nonstandard__ import something

I would likely see the word "nonstandard" as a warning and interpret this as "the authors are doing their own thing, straying away from the standard Python code; it's probably better to stay away."

On the other hand, if I read

from __experimental__ import something

I would likely interpret this as "the authors are trying out something different; it might be worth having a look as I may learn something new".

This is what I would like experimental to be: a Python package that lets people try out new syntactic constructs easily, coming up with new ideas or testing ideas proposed by others (in PEPs, for instance); not something to be used in production code, but something to experiment with: hence why I am reverting back to using the first name I had chosen.

1 comment:

Veky said...

You're missing a gorilla. The point is that you shouldn't use a dunder name for such things. Please read, last paragraph.