How the Symbol Management Problem decomposes into two parts: Redundancy
- When you have two or more terms that mean the same thing.
- The redundancy problem can be solved through term reconciliation, essentially denoting, in a machine-readable-form, that a certain term in one vocabulary means the same thing as a certain term in another. Collision
- When you have the same term that means two or more things.
- The collision problem is solved through namespaces, which, when fully-qualified URIs, are by design impossible to collide
Naming booleans Use affirmative statement that evaluates to either true or false
// Same order, erase the dot and you got yourself a variable name.
bool userIsActive = user.isActive;
// Order changed, statement suddenly became a question.
// Also have to bother about moving words around.
bool isUserActive = user.IsActive;
https://en.wikipedia.org/wiki/Naming_convention_(programming)#Positional_notation https://en.wikipedia.org/wiki/Propositional_calculus
show intention
- Would the name change if the implementation changes?
- Would the name change if the usage changes? If so, it's probably not a very good name.
types
- hungarian notation
- propsitional notation
- composite word scheme
tool
See
Links
- take I haven't fully thought through incoming: Every use of useEffect should be in a custom hook with a damn good name. It's frequently difficult to read & comprehend intention of the code when effects are strewn about. Better to encapsulate and provide context.
- https://tkdodo.eu/blog/on-naming-things
- https://dev.to/michi/tips-on-naming-boolean-variables-cleaner-code-35ig
- base+composite+suffix
- what about
[domain|kind|base]+[synthesis|composite|breed]+[handle|suffix|expression]
?
- what about
- signin/signup namings
- https://en.wikipedia.org/wiki/Naming_convention_(programming)
- https://hackernoon.com/3-approaches-to-naming-in-software-engineering
- Stop using terrible class names! With special guest, Adam Argyle!
- Naming Conventions | Jeoffrey Fischer | Rules