Rubber duck debugging

A rubber duck in use by a developer to aid debugging

In software engineering, rubber duck debugging (or rubberducking) is a method of debugging code by articulating a problem in spoken or written natural language. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line by line, to the duck.[1] Many other terms exist for this technique, often involving different (usually) inanimate objects, or pets such as a dog or a cat. Teddy bears are also widely used.[2] When humans are involved, it is known as confessional programming.[3]

  1. ^ Hunt, Andrew; Thomas, David (1999). The Pragmatic Programmer: From Journeyman to Master. Addison Wesley. ISBN 978-0201616224. p. 95, footnote.
  2. ^ Debugging, Rubber Duck. "Rubber Duck Debugging". rubberduckdebugging.com. Archived from the original on 12 November 2020. Retrieved 14 September 2023.
  3. ^ Ducking, Rubber. "Rubber Ducking". Rubber Ducking. Archived from the original on 5 April 2024. Retrieved 4 April 2024.