Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change abbreviation guideline #204

Open
Keboo opened this issue Dec 15, 2021 · 3 comments
Open

Change abbreviation guideline #204

Keboo opened this issue Dec 15, 2021 · 3 comments
Assignees
Labels
proposal Items flagged with this are up for discussion to be included in the IntelliTect coding standards

Comments

@Keboo
Copy link
Member

Keboo commented Dec 15, 2021

Currently we have separate rules for abbreviations and acronyms. This proposal brings those together into single rules. The existing rules do not match which what most code does with well-known abbreviations such as: ID (Identifier), Company abbreviations, DB (Database), TM (Trademark), Cert (Certificate), Sig (Signature), etc.

Proposal: Change the following guidelines:

❌ DO NOT use abbreviations or contractions within identifier names.
❌ DO NOT use any acronyms unless they are widely accepted, and even then use them consistently.
✔️ DO capitalize both characters in two-character acronyms, except for the first word of a camelCased identifier.
✔️ DO capitalize only the first character in acronyms with three or more characters, except for the first word of a camelCased identifier.
❌ DO NOT capitalize any of the characters in acronyms at the beginning of a camelCased identifier.

To be:

❌ DO NOT use contractions within identifier names.
⛔ AVOID use any acronyms or abbreviations unless they are widely accepted, and even then, use them consistently.
✔️ DO capitalize only the first character in acronyms or abbreviations with two or more characters, except for the first word of a camelCased identifier.
❌ DO NOT capitalize any of the characters in acronyms or abbreviations at the beginning of a camelCased identifier.

@Keboo Keboo added the proposal Items flagged with this are up for discussion to be included in the IntelliTect coding standards label Dec 15, 2021
@joeriddles
Copy link
Contributor

I approve after discussion with @Keboo and @adamskt 👍

@Keboo
Copy link
Member Author

Keboo commented Dec 29, 2021

@joeriddles @adamskt After discussion with @MarkMichaelis there is a suggestion to change the severity of the second rule to a DO NOT

So:
❌ DO NOT use contractions within identifier names.
⛔ AVOID use any acronyms or abbreviations unless they are widely accepted, and even then, use them consistently.
❌ DO NOT use any acronyms or abbreviations unless they are widely accepted, and even then, use them consistently.
✔️ DO capitalize only the first character in acronyms or abbreviations with two or more characters, except for the first word of a camelCased identifier.
❌ DO NOT capitalize any of the characters in acronyms or abbreviations at the beginning of a camelCased identifier.

The rational for this change is there should be no exceptions where an acronym or abbreviation is used that is not widely accepted. Or to put it another way, in general things should be spelled out, and if an abbreviation is to be used, the case must be made that it is widely accepted.

@Keboo Keboo assigned adamskt and joeriddles and unassigned MarkMichaelis Dec 29, 2021
@joeriddles
Copy link
Contributor

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Items flagged with this are up for discussion to be included in the IntelliTect coding standards
Projects
None yet
Development

No branches or pull requests

4 participants