naming-cheatsheet
naming-cheatsheet copied to clipboard
Comprehensive language-agnostic guidelines on variables naming. Home of the A/HC/LC pattern.
Add section for `Time/Duration naming convention`, variables should have units attached.
We use this quite often, so I think it makes sense to include in the convention
FIxed small mistake in the `Context` section (parameter order in example `filter` function, look at how the function is used in the `getRecentPosts` example).
I have encountered a case where a boolean is telling if Entity A has Entity B. For example, if an admin has members. How should it be named? (The following...
delete is a reserved word in JavaScript and since this guide helps people decide in generic situations, I’m suggesting to use destroy instead of delete, because in cases where using...
One major contributor of code smell (in my opinion) is code that superfluously includes the type of the thing in its name. (e.g. `List itemList`, or `CREATE TABLE itemTable` instead...
Can you add some additional references/sources for the A/HC/LC pattern you document? I am familiar with similar standards from BPM (Business Process Management) world where steps are written `verb-noun` format....
In my experience, "high signal per word ratio" is a more accurate intuition in practice rather than "short". Focusing on "short" alone can lead to unnecessary dilemmas \* I'm curious...
Hi, first of all, a very nice work on how to do better naming of Classes, Functions and Variables in programming! Thanks. In the example, it looks better to show...