Rubber Ducking #
Explain your code to an inanimate object out loud and line by line.
Verbalizing logic forces you to slow down and often reveals bugs you missed while reading silently.
Not just for debugging
Works before code exists:
Planning: explain the problem and your intended solution
Designing: narrate architectural decisions
Pseudocode: verbalize logic while drafting algorithms with comments.
Testing: explain the “why” behind each test case
Benefits
Helps to clarify ideas and identify unknowns.
Provides a structure that allows to break down problems.
Helps to formulate efficient LLM queries.
Provides (more than) the necessary comments to understand the resulting code.
Variation: Write down with pen on paper the pseudo code and logic.