-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Where I think our current naming convention (primarily for types and module names, but perhaps not only) is inconsistent:
- Sometimes we abbreviate, sometimes we don't. Not the end of the world, if it wasn't the case that some types and modules contain abbreviated words and very long un-abbreviated words. Examples:
- module
sdm(System Data Model): ok, but then we have un-abbreviatedsystem_modelandinteraction_model ethernet_nw_diagnostics: why abbreviatenetworktonwwhendiagnosticsandethernetare not abbreviatednw_commissioning- ditto
- module
- Sometimes - maybe - we abbreviate a bit too much:
EndptId- we have saved 4 characters compared to - say -EndpointId, and the wordendpointis not abbreviated anywhere else, nor isClusterIdabbreviated which is only 1 char shorter- We are not always consistent:
ethernet_nw_diagnostics, but thenEthNwDiagCluster. If we abbreviate the cluster name, perhaps we should abbreviate the module name as well, i.e.eth_nw_diag?
The list can continue, and probably the first step would be to identify a set of names that need to be refactor-renamed, as well as a justification why.
Ideally, we should be consistent in our abbreviations, even if we won't overdo it by building a glossary (but consulting the internet and then using common abbreviations, like here and here should be mandatory).
- I.e. ideally "ethernet" should be abbreviated everywhere to "eth" or not abbreviated everywhere. There should be few if any exceptions to this rule.
- I.e. ideally we should use the same abbreviation for a concrete term (if abbreviated at all) everywhere
I don't think we need to waterfallish-ly come up with a long list of identifiers for renaming and only then open a giant PR for that. Yet we should probably follow at least these two rules:
- A rename PR should only be a rename PR and nothing else. No change in the behavior of the code
- Until something is renamed (abbreviated or not), we should use the most popular name for the thing in the code, regardless whether we like it, so that the code looks mostly consistent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request