There is a balance between two good things: (1) understandable names and (2) compact code that fits on the screen and avoids excessive line breaks. As opposed to DesignPatterns style names I often like names like FunctionThatThrows. I love writing tests where the name of the function says outright what the test does, even if the test name is 40 characters long (not like you're going to type it again!)
People get in a lot of trouble when they try to write descriptive names for everything.
It was one of the most interesting things in the Lenat/Guha book on Cyc that people get fooled by labels that look like natural language. If you really have a database of unique concepts and try to attach meaningful labels you are going to have an increasingly hard time when n goes past 1,000,000. Wikipedia does about as well as can be done. There's something to say about lowering your cognitive load and using names like "that", for instance
Depends entirely on the context, ie. what's the scope of `fullname`.
If this is a variable in a 20LOC func, f is completely sufficient, easier to type, easier to read.
In the other extreme, names can also be too meaningful: ´ThingMessageRelayAdministratorMiddlewareComposer` or `storage_access_administrator_storageshelf_listview` are jacked full of meaning, and about as useful as a hammer without a handle.
Then one year later you have to play archeologist and figure out the hard way what `f` is used for. And I also find it much more difficult to write code like this in the first place because it forces me to memorize the purpose of every identifier.
Not sure how "easier to type" is relevant - aside from Notepad pretty much every editor offers some completion feature.
I'm definitely a fan of longer identifiers, though abbreviated where it makes sense and using short words where possible.
If you are basing off of mathematical notation, f g and h might make sense for identifiers for very generic functions, especially if tin are implementing the chain rule somehow. I would find more verbose names harder to read because the notation was already ingrained. Same for those who name their looping integers something other than i or j.
> and figure out the hard way what `f` is used for.
In a 20 LOC function, that takes me about a second, if that long.
> aside from Notepad pretty much every editor offers some completion feature
It's still easier to type `f` than `fi` + leadkey + N or whatever the editor uses. Bonus points if the first prediction is wrong, or ambivalent.
And the more important reason is "easier to read", especially in long expressions;
for e := getFirst(); e != nil; e.Next()
is much easier to read than
for currentElement := getFirst(); currentElement != nil; currentElement.Next()
Finally, not only the name itself, but also it's length should convey meaning. If I see a variable like `currentElement` in my code, I immediately know that it probably lives beyond the scope it is defined in. If I see a variable named `c` I know that it is a short lived throwaway.
// GOOD
let fullname = 'John Smith'
// BAD
let f = 'John Smith'