Jump to content

Rubber duck debugging

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by EmausBot (talk | contribs) at 06:37, 1 September 2011 (r2.6.4) (robot Modifying: ru:Метод утёнка). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

File:Rubber Duck.jpg
A modern rubber duck.

Rubber duck debugging,[1][2] Rubber Ducking,[3] or the Rubber Duckie Test[4] is an informal term used in software engineering to refer to a method of debugging code. The name is a reference to an apocryphal story in which an unnamed expert programmer would keep a rubber duck by his desk at all times, and debug his code by forcing himself to explain it, line-by-line, to the duck.

The process is to meticulously explain code to an inanimate object, such as a rubber duck. It is expected that when the programmer comes across a piece of code that is incorrect, they will realize this[1]. The method exploits cognitive dissonance; the programmer will be confronted with the fact that their code is not what they intended to write.[5]

Similar terms

  • Cardboard Programmer or Programmer's Dummy [6][5]
  • Cardboard Coder
  • Cone Of Answers [7]
  • Thinking Out Loud [8]

References

External links