T
3

My first real program crashed and I had no idea why for two days

I was trying to make a simple number guessing game in Python last week, following a tutorial from a guy named Al Sweigart. I got it to run, but it would just freeze after the first guess. I spent hours staring at the same 15 lines of code. Finally, my friend in Chicago pointed out I was using a single equals sign for a comparison instead of a double. Has anyone else gotten stuck on a tiny syntax error for way too long?
2 comments

Log in to join the discussion

Log In
2 Comments
eric_thompson
Oh man, that single equals sign gets everyone at first, doesn't it? It's crazy how one tiny character can make the whole program act totally different than you expect. I bet you were looking for logic bugs when it was just the language reading your code wrong. That feeling when you finally see it is a mix of relief and wanting to throw your laptop.
6
the_zara
the_zara19h ago
Actually, that single equals thing is way overblown. Modern IDEs catch it instantly with red squiggles, so you'd have to ignore obvious warnings to even run broken code. The real issue is people not paying attention to their tools, not some tiny typo. Honestly, if a single character breaks your whole program, maybe the problem is writing code that's too fragile in the first place. It's a basic mistake you make once and then never again.
2