Update: I called BS on rubber duck debugging and now I owe it an apology
I always thought rubber duck debugging was a joke people made up to mess with newbies. Then I got stuck on a Python loop for 3 hours in my bedroom in Boise and finally grabbed a rubber duck off my shelf just to say the code out loud. I explained what each line should do, heard myself say "wait, this variable gets overwritten every time," and fixed it in about 40 seconds. Tried it 4 more times on different bugs and it worked every single time, even when no one was around to answer me. Does this trick actually work for anyone else or am I just fooling myself by talking to a bath toy?
Doubt the duck all you want but you're basically just tricking yourself into slowing down, which is the real fix, and the duck gets credit for something your own brain did. Hearing code out loud forces a different part of your brain to process it than reading silently, so it feels like magic when it's just your ears catching what your eyes skipped. Take away the duck and you'd get the same result talking to a wall, a spoon, or an empty chair, so the toy is a prop, not a tool.