Please enable JavaScript.
Coggle requires JavaScript to display documents.
Clean code - Coggle Diagram
Clean code
Chapter 2: Meaningful
Use Intention-Revealing Names
Avoid Disinformation
Make meaningful distinctions
use Pronounceable names
Use searchable names
avoid encodings
Hungarian notation
Member prefixes
interfaces and Implementations
avoid mental mapping
classNames
method names
Don't be cute
Pick on word per concept
Don't pun
Use Solution domain names
use prolem domain names
Add meaningful context
Dont add gratuitous context
Final words
Chapter 3: Functions
Small!
DO one thing
One level of abstraction per function
Switch statements
Use descriptive names
Function arguments
Have no side effects
Command query separation
Prefer exceptions to returning Error Codes
Don't repeat yourself
Structured programming
How do you write Functions like this?
Conclusion
Chapter 4: Comments
Comemnts do not make up for bad code
Explain yourself in code
Good coments
Legal comments
Informative comment
explanation of intent
Clarification
Warning of consequences
TODO comments
Amplicifcation
Javadocs in publish apis
Bad Coments
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
Closing brace comments
Attributions and bylines
Commented out code
HTML Comments
Nonlocal information
too much information
Function headers
Javadocs in nonpublic code