O
12

Spent 3 hours hunting a bug that was just a missing semicolon

Was working on a simple JavaScript loop and couldn't figure out why it kept breaking - turns out I forgot one semicolon after the variable declaration. Has anyone else wasted an afternoon on something that dumb?
3 comments

Log in to join the discussion

Log In
3 Comments
the_susan
the_susan1mo ago
Did you have a linter running that could have caught that?
3
rosep87
rosep871mo ago
Actually, I'm going to push back on that. Linters catch style stuff and basic syntax errors but they miss a ton of real bugs, especially logic ones that don't break the code in obvious ways. I've seen plenty of projects where the linter passed with zero warnings but the code had a subtle off-by-one error or a race condition that only showed up under load. Relying on a linter to save you from deeper mistakes can give you a false sense of security. Would you trust a linter to catch something like a missing null check in a complex chain?
4
shane244
shane2441mo ago
Yeah, you make a good point @rosep87. I used to think linters were all you needed, but now I can see how they miss the deeper logic stuff that causes real problems.
4