Geek Trivia: Explaining Your Code To An Inanimate Object Is A Programming Trick Known As What?

a rubber duck sitting on a laptop looking at the codeTom Morris / Wikimedia

Answer: debugging rubber ducks

Debugging rubber duck is an informal debugging method that programmers have used for a long time as a simple and cost-effective way to catch code errors. Once the coding is complete, the programmer takes a moment to explain the code, line by line, to the rubber duck lying on his desk (or any other inanimate object, such as a figurine or a toy, they have it at hand ).

By examining his own code and explaining it aloud to the inanimate object, the programmer often detects errors in the code, making more apparent the discrepancy between what the program is supposed to do and what that the code on the screen actually does. – the programmer's version where a student reads his text aloud to check for errors.

Other terms for duck rubber debugging include denominational debugging and the cardboard programmer.

Advertisements

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.