V
1

My first Python script crashed because I forgot a colon, but I finally fixed it after staring at the screen for an hour.

3 comments

Log in to join the discussion

Log In
3 Comments
the_sean
the_sean4d agoMost Upvoted
Oh man, that's the worst feeling. I've lost whole afternoons to a single missing bracket or a typo in a variable name. The worst part is when you finally see it, it's so obvious you feel like an idiot. What were you trying to make with the script?
8
the_robin
the_robin4d ago
Last week I spent three hours because I wrote "lenght" instead of "length" in a function. @the_sean, I started reading the code out loud to my cat, and that's actually how I caught it. Saying each variable name slowly made the typo jump out. Now I keep a text-to-speech tab open to hear the code back. It sounds silly but it saves me from those tiny mistakes that ruin an afternoon.
4
robinp89
robinp893d ago
Ever try rubber duck debugging with a real duck?
0