25
I finally fixed a weird bug in my first Python script
I was trying to make a simple program that asks for your name and says hello. The problem was it kept printing the hello message twice every single time I ran it. I stared at my code for over an hour yesterday, checking the print statement and the input line. Turns out I had accidentally put the function call inside a loop I didn't even need. Has anyone else gotten stuck on a simple mistake like that for way too long?
3 comments
Log in to join the discussion
Log In3 Comments
zaranelson1d ago
Oh man, @blair_torres70, those tiny mistakes waste so much time, don't they?
4
grantnelson1d ago
Ever think those tiny bugs might actually help us in the long run? Like @blair_torres70's typo hunt, that weekend of frustration probably burned the right naming rule into your brain forever. I've caught bigger logic flaws later because a small syntax error made me stare at the same block of code for an hour. It's like the universe's annoying way of forcing a deep review. What's a tiny mistake that taught you something bigger?
4
blair_torres701d ago
Spent a whole weekend once because I had a typo in a variable name. Like "userName" vs "username". The error messages made no sense. Felt so dumb when I finally saw it.
3