Clean Code Refactoring
summary
Claims two concrete rules: write dirty code first then clean it and leave the code cleaner than you found it. Shows refactor steps on real PHP code: guard clauses, extract method, null object pattern, move DB access into an account data provider using PDO, validate UUIDs as 36‑char strings. Demonstrates three possible returns (exception null account) and runs tests between steps so each refactor keeps behavior intact — tests pass after each change.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:51THE TWO RULES OF CLEAN CODE
- 3:02RULE #1 Write dirty code, then clean it.
- 5:51RULE #2
- 7:43AN EXAMPLE
- 14:38REFACTORING
- 38:07RECAP
related talks
01h 47mClean code
44mRefactoring — Ways to Improve Code
50mThe Art of Clean Code
45m'Writing code that lasts'...or writing code you won't hate tomorrow
02h 42mClean Code: The Next Chapter
25mBest Practices for Writing Clean and Maintainable Codes
46mHit-parade of clean code violations
43mClean Code: Be The Hero
