Advent of refactoring

I made a video series!

The “Advent of Refactoring”

going through a whole bunch of code refactoring concepts, focussing on web development in Django/Wordpress.

  1. Renaming Things
  2. Extract Variable
  3. Extracting Functions
  4. Extract (class) methods
  5. Converting a function to a method class
  6. Moving things around
  7. Guard Clauses
  8. Composition & Inheritance
  9. Data to JS
  10. Generators & Separating concerns
  11. Positional to Named arguments
  12. Extracting blobs of text (SQL, HTML, etc)
  13. Functions that create functions (closures)
  14. callbacks into functions
  15. try catch
  16. wrapper functions
  17. python decorators & context managers
  18. (django) QuerySets & Model property methods
  19. Building data attrs in the database
  20. Building complex class heirarchies
  21. Lookup tables replacing if chains
  22. Taking advantage of polymorphism
  23. Using validation libraries
  24. Using dataclasses for cleaner data access