CodeAesthetic on YouTube · Open on YouTube
Professional practice · Competent · Lesson 36 of 98 · 7 min video, then about 6 hours of practice
Readable code: naming, structure and refactoring
After this you can recognise common code smells in your own code and refactor them in small, safe steps covered by tests.
Why it matters
Code is read far more often than it is written. Good names, small functions with one job, and structure that makes the intent obvious are worth more than cleverness. When code gets hard to follow, refactor: change the structure without changing behaviour, in small steps, with tests passing after each. Focus on naming, removing duplication when it is real (not when it is coincidental), and comments that explain why rather than what. Trap: treating 'clean code' rules as laws. Every rule has a cost; the goal is code your colleagues can change safely.
How to use this resource
Seven minutes on naming that will change how you write code.
Go further
Go deeper