
In
software engineering
Software engineering is a systematic engineering approach to software development.
A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term ' ...
, rubber duck debugging (or rubberducking) is a method of
debugging
In computer programming and software development, debugging is the process of finding and resolving ''bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems.
Debugging tactics can involve in ...
code by articulating a problem in spoken or written
natural language
In neuropsychology, linguistics, and philosophy of language, a natural language or ordinary language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. Natural languag ...
. The name is a reference to a story in the book ''
The Pragmatic Programmer
''The Pragmatic Programmer: From Journeyman to Master'' is a book about computer programming and software engineering, written by Andrew Hunt and David Thomas and published in October 1999. It is used as a textbook in related university courses. ...
'' in which a programmer would carry around a
rubber duck
A rubber duck or a rubber duckie is a toy shaped like a stylized duck, generally yellow with a flat base. It may be made of rubber or rubber-like material such as vinyl plastic. Rubber ducks were invented in the late 1800s when it became pos ...
and debug their code by forcing themselves to explain it, line-by-line, to the duck.
[ p. 95, footnote.] Many other terms exist for this technique, often involving different (usually) inanimate objects, or pets such as a dog or a cat.
Many programmers have had the experience of explaining a problem to someone else, possibly even to someone who knows nothing about programming, and then hitting upon the solution in the process of explaining the problem. In describing what the code is supposed to do and observing what it actually does, any incongruity between these two becomes apparent.
[.] More generally, teaching a subject forces its evaluation from different perspectives and
can provide a deeper understanding. By using an inanimate object, the programmer can try to accomplish this without having to interrupt anyone else. This approach has been taught in
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
and software engineering courses.
In popular culture
On 1 April 2018,
Stack Exchange
Stack Exchange is a network of question-and-answer (Q&A) websites on topics in diverse fields, each site covering a specific topic, where questions, answers, and users are subject to a reputation award process. The reputation system allows t ...
introduced a rubber duck avatar on their websites as a new feature called ''Quack Overflow''. The duck appeared at the bottom right corner of the browser
viewport
A viewport is a polygon viewing region in computer graphics.
In computer graphics
Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video game ...
, and attempted to help visitors by listening to their problems and responding with solutions. However, the duck merely produced a
quack
Quack, The Quack or Quacks may refer to:
People
* Quack Davis, American baseball player
* Hendrick Peter Godfried Quack (1834–1917), Dutch economist and historian
* Joachim Friedrich Quack (born 1966), German Egyptologist
* Johannes Quack (bo ...
sound after apparently thinking and typing. It referenced ''rubber ducking'' as a powerful method for solving problems. Some confused visitors and users seeing the duck for the first time thought that a
malware
Malware (a portmanteau for ''malicious software'') is any software intentionally designed to cause disruption to a computer, server, client, or computer network, leak private information, gain unauthorized access to information or systems, de ...
program had been installed in their computer before realizing it was an
April Fools' Day
April Fools' Day or All Fools' Day is an annual custom on 1 April consisting of practical jokes and hoaxes. Jokesters often expose their actions by shouting "April Fools!" at the recipient. Mass media can be involved in these pranks, which may b ...
joke.
See also
*
Code review
Code review (sometimes referred to as peer review) is a software quality assurance activity in which one or several people check a program mainly by viewing and reading parts of its source code, and they do so after implementation or as an interr ...
*
Pair programming
Pair programming is an software development technique in which two programmers work together at one workstation. One, the ''driver'', writes code while the other, the ''observer'' or ''navigator'', reviews each line of code as it is typed in. Th ...
*
Socratic method
The Socratic method (also known as method of Elenchus, elenctic method, or Socratic debate) is a form of cooperative argumentative dialogue between individuals, based on asking and answering questions to stimulate critical thinking and to draw ...
*
Desk checking
*
Software walkthrough
In software engineering, a walkthrough or walk-through is a form of software peer review "in which a designer or programmer leads members of the development team and other interested parties through a software product, and the participants ask qu ...
*
*
Think aloud protocol
*
Pointing and calling
*
Rogerian method
References
{{Reflist
External links
Rubber Duck Debugging
Debugging
Computer programming folklore
Ducks