Please enable JavaScript.
Coggle requires JavaScript to display documents.
Clean Code (Meaningful Names (Use Intention-Revaling Names (why it exists,…
Clean Code
Meaningful Names
Use Intention-Revaling Names
why it exists
what it does
how it is used
Avoid Disinformation
Make Meaningful Distinctions
Use Pronounceable Names
Use Searchable Names ( constant number...)
Avoid Encoding
Avoid Mental Mapping
Class Name
Don't Be Cute
Add Meaningful Context
Don’t Add Gratuitous Context
Function
Small!
< 150 characters
< 20 lines
Blocks and Indenting
Do One Thing
One Level of Abstraction per Function
Switch Statements ( one function for case) use factory partern for new..
Function Arguments
Flag arguments are ugly.
Have No Side Effects
Prefer Exceptions to Returning Error Codes
Don’t Repeat Yourself
Comment
Good Comment
Legal Comments
Informative Comments
Explanation of Intent
Clarification
Warning of Consequences
TODO Comments
Amplification
Bad Comment
Mumbling
Redundant Comments
Misleading Comments
Mandated Comments
Journal Comments
Noise Comments
Scary Noise
Don’t Use a Comment When You Can Use a Function or a Variable
Position Markers
Closing Brace Comments
Commented-Out Code
HTML Comments
Too Much Information
Inobvious Connection