Code that communicates clearly and changes safely
Module 1
Naming, Functions & Structure
- What makes code "clean" — the cognitive load argument
- Naming variables, methods, and classes: intention-revealing names, avoiding noise words
- Function design: small and focused, one level of abstraction, no side effects hidden in names
- Method parameter counts: why more than two is usually a smell
- Avoiding boolean parameters and flag arguments
- Code structure: keeping related things together, separating levels of abstraction
- Comments: the only comments worth writing — the ones that explain WHY
- Dead code, commented-out code, TODO comments — what to do with each
- Avoiding magic numbers: named constants vs inline literals
- Guard clauses: replacing nested conditionals with early returns
Module 2
Objects, Error Handling & Refactoring
- Objects vs data structures: the Tell Don't Ask principle
- Law of Demeter: train wrecks and what to do about them
- Error handling: exceptions vs return codes, checked vs unchecked, not swallowing exceptions
- Avoiding null: Optional usage, null object pattern, defensive programming trade-offs
- Formatting and team conventions: checkstyle, editorconfig, automated formatting
- Code smells: the classic list — long methods, feature envy, data clumps, primitive obsession, shotgun surgery
- Refactoring moves: Extract Method, Inline Variable, Move Method, Replace Conditional with Polymorphism
- Boy Scout Rule: leaving the code better than you found it
- Code review mindset: giving and receiving clean code feedback
What your team walks away with
Developers who write code their colleagues can understand, modify, and extend — without needing the original author in the room.
- Name identifiers that reveal intent without requiring context to interpret
- Write functions that do one thing at one level of abstraction
- Recognize the most common code smells in Java codebases
- Apply extract, move, and rename refactoring moves safely with IDE support
Book the Clean Code training
Works well as a team workshop where participants bring real code from your codebase. Most effective when developers at all levels attend together.
Get in touch