G
6

TIL the rubber duck method actually fixed my bug after 3 hours of staring at code

I was stuck on a loop that kept skipping every other entry in a list I was building for a pet project. After trying console logs and googling for like an hour, I grabbed a little duck figure off my desk and started explaining my code out loud to it. About 30 seconds into talking through the loop condition, I realized I was using 'continue' wrong (it was jumping back too early). Has anyone else had that moment where explaining your code to something silly like a rubber duck just instantly clicks?
2 comments

Log in to join the discussion

Log In
2 Comments
ray_patel27
Wait, people actually talk to rubber ducks and it works?" - yeah I used to think it was dumb too until I tried it and fixed my bug in 2 minutes.
6
perry.jessica
Wait, people actually talk to rubber ducks and it works?
1