3 ms·
The "self-explanatory"/"brevity" problem is quite interesting. It reminds me of the point Donald Norman made in "The Design of Everyday Things", where informati
by 50CNT 11y ago
The "self-explanatory"/"brevity" problem is quite interesting. It reminds me of the point Donald Norman made in "The Design of Everyday Things", where information is either found in the world, or in our heads, coupled with issues of information-density. When we pick names, it's a trade-off between abbreviated (-> fast to use), descriptive (-> fast to learn), and mnemonic (-> easy to remember).
I roughly divide naming problems into 3 areas mentally. Most commonly used commands(/functions/identifiers/...), commonly used commands, and rarely used commands.
Most commonly used commands are things like ls or cd or mkdir. Due to their usage frequency, an intermediate user will remember these by heart, and mentally substitute their long forms whilst reading them out. Technically we could assign these to even shorter codes, but then they would loose their mnemonic value.
Preferably they would also have a long-form alias to provide a certain amount of easing into them. (list-directory, change-directory, make-directory)
Commonly used commands should not be abbreviated as readily. The few extra characters required to type them are usually well worth the additional clarity. Pythons .deepcopy() is a good example. It copies a data structure and its sub-structures completely. .dpcp() would be a lot harder to remember given how often it is used.
It should be possible to alias these to shorter versions as well, should someone have to use them frequently. Auto-complete functionality may also reduce the amount of memorization necessary whilst typing these in.
I personally think emacs handles these two cases very well,
with it's quick chords that need to be memorized but provide speed, and calling commands by name via M-x which provides ease of use.
Then there's the rarely used stuff. These names may get very long if they are to be descriptive (ncursescplusplusmusicplayer), which means that they, or parts of them should probably be abbreviated (nccppmp, or preferably nccpp-musicplayer). Runs of abbreviated words should not become too long, 3-5 characters being the maximum. Past that length, it becomes hard to remember which characters one has already typed. (ncpmpp? or nccppmp?). Past that sensible chunking through full words or hyphenation may become necessary.
I do think these are sensible rules of thumb, but then they are rules of thumb, and there are most likely thousands of exceptions to them.
- sundarurfriend 11y ago> Most commonly used commands are things like ls or cd or mkdir. [...] > Preferably they would also have a long-form alias to provide a certain amount of easing into them. (list-directory, change-directory, make-directory) This reminds me of MS Powershell. `Set-Location` is the command for changing to a new directory location, and it's also abbreviated (aliased) as `cd`. Similarly with `ls` and many other commands. Powershell scripts often have the full forms of the commands, while in the shell itself you get the convenience of the shorter commands.