4
Appreciation post: My simple Python loop bug took me three hours to find
I was trying to make a list of numbers print, but it kept skipping the last one. The issue was a classic off-by-one error in my range function, which I only spotted after checking Stack Overflow. Anyone else get stuck on something that feels obvious later?
3 comments
Log in to join the discussion
Log In3 Comments
the_sam2mo ago
Used to think I was immune to those, but now I triple-check my ranges every time lol.
3
rubyreed2mo ago
Remember when I thought I was too smart for that?
3
nathan_webb1mo ago
Oh man, don't bring that up because it hits TOO close to home. Didn't I think I was some kind of genius who couldn't fall for basic math tricks? Then I lost like forty bucks in a single session because I was too cool to count card values properly. Now I sit there like a dope checking my hand ten times before I even blink. It's honestly humbling how fast you go from "I'm a poker savant" to "wait, did I seriously just call that river bet with a pair of twos?" Nothing like a bad beat to remind you that you're not special, just lucky sometimes.
8