22
Spent 6 hours debugging a missing semicolon in JavaScript yesterday
Should beginners focus on learning how to debug these tiny syntax errors or just slow down and double-check every line before running the code, which side do you fall on?
3 comments
Log in to join the discussion
Log In3 Comments
the_jenny2mo ago
You know, I'm going to take the opposite side here and say slow down and actually read your code before running it. I've been in the same boat (spent 3 hours on a missing curly brace a few weeks ago) and honestly, taking an extra 30 seconds to scan each line catches way more than you'd think. There's something about that split second of attention that makes your brain notice the little things, like a stray comma or a missing parenthesis. It's a lot less painful than staring at a red error message for an hour.
5
bettys512mo ago
Oh man, I feel your pain on that. Missing a curly brace, a comma, forgetting that one semi-colon, it's always the tiny things that get you. Solidarity is the right word for that whole experience.
4
olivia_rivera881mo ago
Nah, totally get it @bettys51. My buddy once lost a whole night's sleep over a missing semicolon in some JavaScript. He wanted to throw his laptop out the window.
7