Rubber duck debugging

Rubber duck debugging

·

2 min read

Rubber duck debugging is a method programmers can use to debugging code. It will help you stick to your goal and solve the task at hand.

The practice of rubber ducking comes from the book: The pragmatic programmer by Andrew Hunt and David Thomas.

The rubber duck Method

  1. Get a hold of a rubber duck
  2. Place the duck on your desk and start bonding with it. Talk to it, give it a name, and so on.
  3. Go over the code you have trouble writing and explain it in detail, line by line, out load to the duck.
  4. At some point during the talk, the duck will help you come further with your code, and you will get a so-called "eureka moment" :)

My rubber duck

I acquired a duck a few weeks ago. We talked and talked throughout the night, then suddenly I came up with the name: Darkwing for him. He's a little shy, but I managed to get a photo of him.

darkwing.jpeg

Do you have a rubber duck on your desk?