A guy at the library in Boise showed me a rubber duck and now I debug way faster
I was stuck on a Python loop two Saturdays ago at the Boise public library, just staring at the same error for like 40 minutes. This older guy next to me leans over and says "explain it to the duck" and hands me this little rubber duck from his bag. I felt dumb at first but I started talking out loud about what each line does, and within 3 minutes I caught my mistake, I had my counter incrementing in the wrong spot. Now I keep a duck on my desk and honestly it works better than just scrolling forums. Has anyone else tried this, or do you have a different trick for getting unstuck when you're just staring at code?
I've been talking to my coffee mug for years and it never fixed a bug, so maybe the duck is the secret ingredient. The most Boise thing ever is some guy handing out rubber ducks at the library like a debugging fairy godmother.