1
Stared at a screen for 4 hours before realizing I forgot a semicolon
I was working on a small Python script last Tuesday night in my kitchen, trying to get a simple loop to run. After four hours of checking every line, changing imports, and googling error messages, my girlfriend walked by and pointed at line 23. I had left out a semicolon after a function call inside an if statement. The whole thing collapsed because of one missing character. I felt like an idiot but I also learned to double check the basics before diving into advanced fixes. Has anyone else spent way too long tracking down simple typos?
3 comments
Log in to join the discussion
Log In3 Comments
jennifer8331mo ago
Honestly, I read somewhere that something like 80% of coding bugs are just simple typos or syntax errors, not actual logic problems. That article made me feel way better about spending an hour hunting down a missing parenthesis last week. It's wild how our brains just skip over the obvious stuff when we're staring at code too long.
4
sean_cooper581mo ago
Hang on... is that actually true? Eighty percent of bugs are just typos and not actual logic errors? That makes me feel way less bad about the time I spent an afternoon debugging a Python script only to realize I used a colon instead of an equals sign...
1
lilyp371mo ago
Used to roll my eyes when people said "check the semicolons" but now I get it completely. Had a similar thing last month where I spent three hours rebuilding a function only to find out I wrote "=" instead of "==" in a condition. Made me feel pretty stupid but I also started using a linter after that. Saves me from myself honestly.
1