You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-abbreviated system_model and interaction_model
ethernet_nw_diagnostics: why abbreviate network to nw when diagnostics and ethernet are not abbreviated
nw_commissioning - ditto
Sometimes - maybe - we abbreviate a bit too much:
EndptId - we have saved only 2 characters compared to - say - EndpointId, and the word endpoint is not abbreviated anywhere else, nor is ClusterId abbreviated which is only 1 char shorter
We are not always consistent: ethernet_nw_diagnostics, but then EthNwDiagCluster. 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
The text was updated successfully, but these errors were encountered:
Where I think our current naming convention (primarily for types and module names, but perhaps not only) is inconsistent:
sdm
(System Data Model): ok, but then we have un-abbreviatedsystem_model
andinteraction_model
ethernet_nw_diagnostics
: why abbreviatenetwork
tonw
whendiagnostics
andethernet
are not abbreviatednw_commissioning
- dittoEndptId
- we have saved only 2 characters compared to - say -EndpointId
, and the wordendpoint
is not abbreviated anywhere else, nor isClusterId
abbreviated which is only 1 char shorterethernet_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 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:
The text was updated successfully, but these errors were encountered: