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?
2 comments
Log in to join the discussion
Log In2 Comments
the_jenny15d 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
bettys5115d 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