Training Agenda

Clean Code

Clean code is code that communicates its intent clearly, is easy to change safely, and does not require a mental model to navigate. It is not about aesthetics — it is about reducing the cognitive load that accumulates in codebases over time and becomes the primary drag on team velocity. This training covers naming, functions, objects, error handling, comments, and the refactoring moves that turn tangled code into clear code — with Java examples from real-world codebases.

1 day On-site, remote, or hybrid Up to 20 participants German or English
What We Cover
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
Learning Outcomes
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.

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