I don't agree because it should never be set on stone.
"Max" is pretty descriptive even if you don't use "maximum", inside that scope it's ok. Wouldn't be true if "m" were used.
However, in this example:
const productsIds = products.map(p => p.id)
I would say one letter is the correct choice, since:
const productsIds = products.map(product => product.id)
Having no abbreviations actually hurt how to read and generate just extra clutter.
My rule of thumb is to have the name length inversely proportional to the scope.
A dozens of lines function calls for bigger, descriptive names. A one liner? Maybe one letter is enough.
'My rule of thumb is to have the name length inversely proportional to the scope'
It is fine.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't agree because it should never be set on stone.
"Max" is pretty descriptive even if you don't use "maximum", inside that scope it's ok. Wouldn't be true if "m" were used.
However, in this example:
I would say one letter is the correct choice, since:
Having no abbreviations actually hurt how to read and generate just extra clutter.
My rule of thumb is to have the name length inversely proportional to the scope.
A dozens of lines function calls for bigger, descriptive names.
A one liner? Maybe one letter is enough.
'My rule of thumb is to have the name length inversely proportional to the scope'
It is fine.