Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 669 Bytes

ccd-cheat-sheet.md

File metadata and controls

16 lines (14 loc) · 669 Bytes

Clean Code Developement

  1. Explanatory variables
  2. Tests (one assert statement per test)
  3. Write good comments
  4. Remove dead code (commented out code)
  5. all import statements at the top of file
  6. Error handling → throw exceptions and write own exceptions if necessary and add context
  7. DRY - Don’t repeat your self → write functions

Functions

  1. Functions should do one thing
  2. Descriptive function names (intuitive)
  3. Use parameter types and return types in functions and classes (python)
  4. Not more than 3(!) function parameters
  5. Add docstrings to functions and classes