Summary by TwinMind · 5m 15s
Summary by TwinMind · 5m 15s
What is "rubber duck debugging?"
What is "rubber duck debugging?"
MIT OpenCourseWare
MIT OpenCourseWare
Programming Education Context
- Professor teaches intro to programming and computer science classes each semester
- Specific class dedicated to debugging process
- Debugging defined as: fixing code that doesn't run as expected
Programming vs Natural Language Differences
- English sentences have multiple interpretations
- Example: "The chicken is ready to eat"
- Vegetarian interpretation: chicken wants to eat food
- Meat-eater interpretation: chicken is ready to be eaten
- Example: "The chicken is ready to eat"
- Programming code has only one interpretation
- Computer follows algorithms/instructions exactly one way
- Programmer error when expectations don't match results
Rubber Duck Debugging Technique
- Solution involves taking time away from problem
- Explain code line-by-line to someone with zero programming knowledge
- Rubber duck serves as inanimate debugging partner
- Forces scrutinization of every code line, including "correct" ones
- Most errors found in code assumed to be correct
- Analogy: looking for glasses while wearing them on head
Alternative Debugging Partners
- Rubber ducks (various designs available)
- Frogs and pigs as alternatives
- Friends can work but may be judgmental
- Professor used 1-year-old son as debugging partner
- Key requirement: partner must know nothing about programming
Debugging Process Requirements
- Must explain in great detail
- Cannot skip any steps/details
- 90% of problems are user error
- Applies to life outside academia - self-reflection needed
Duck Selection Activity
- Professor brings box of various rubber ducks
- Participant selects mohawk duck (described as offbeat, eye-catching)
- Crew member also selects mohawk duck
- Ducks given as gifts
