F
20

Just realized my code broke because of one missing semicolon

Spent Tuesday afternoon debugging a script for a school project. Turns out a missing semicolon on line 47 was making my whole loop crash. Half of me says linting tools catch this, but the other half thinks beginners need to learn to spot these manually. Which side do you lean on for building good habits?
3 comments

Log in to join the discussion

Log In
3 Comments
patricia_hill60
Always use a linter, but knowing how to spot them yourself saves you later.
2
johnson.eva
Funny how knowing the 'why' behind any tool just makes you better at everything.
7
the_sage
the_sage11d ago
Actually, Patricia, linters don't really spot "them." They spot issues in your code style and syntax, not in your logic or reasoning. You can't use a linter to catch a bad algorithm or a wrong assumption about your data. That's the thing people miss. @johnson.eva nailed it - knowing why you use a tool is what makes you actually good at your craft. A linter will tell you that you have an unused variable, but it won't tell you that your whole approach to handling that edge case is wrong. So yeah, use a linter for the boring stuff, but save your brainpower for the real problems.
4