Clean Code Checklist
Clean Code Checklist
Naming
Use descriptive and meaningful names
Variables & Properties: Nouns or short phrases with adjectives
Functions and Methods: Verbs or short phrases with adjectives
Classes: Nouns
Be as specific as necessary and possible
Use yes/ no "questions" for booleans (e.g. isValid)
Avoid misleading names
Be consistent with your names (e.g. stick to get... instead of fetch...)
Functions
Functions
Limit the number of parameters your functions use - less is better!
Consider using objects, dictionaries or arrays to group multiple parameters into
one parameter
Functions should be small and do one thing
Levels of abstraction inside the function body should be one level below the
level implied by the function name
Avoid mixing levels of abstractions in functions
But: Avoid redundent splitting!
Stay DRY (Don't Repeat Yourself)
Avoid unexpected side effects