Got stuck on a Python bug for 3 hours at a Starbucks in Denver and some random guy fixed it in 2 minutes
I was at the Starbucks on 16th Street Mall in Denver last Tuesday, grinding through a beginner Python tutorial on my laptop. My code kept throwing a KeyError and I could not figure out why. I had been staring at the same 40 lines for almost 3 hours, rewriting the same loop over and over and getting more annoyed with each run. This guy at the next table, maybe 60 years old, noticed me sighing and asked if I was stuck. I showed him the screen and he pointed out I was calling the dictionary key with a string but storing it as an integer. One bracket, one quote mark, that was the whole problem. I felt so dumb but also relieved. It made me realize that banging your head against the wall alone is way slower than just asking. Has anyone else had a total stranger save their code like that?