9
My Python script kept crashing after 100 lines until I added one simple check.
I was pulling data from a website for a school project and the program would just stop every single time. Turns out I wasn't checking if the webpage element existed before trying to grab its text, so it would fail silently. What's the most common beginner mistake you've had to fix in your own code?
3 comments
Log in to join the discussion
Log In3 Comments
nancybailey2mo ago
Forgetting to close files or database connections always came back to bite me later.
2
nancy_smith2mo ago
Ugh, I read somewhere that open connections can lock up system resources. It makes the whole app slow for everyone else. Definitely a sneaky way to cause bigger problems.
5
the_cameron2mo agoMost Upvoted
I had a dev leave connections open on a staging server once. The whole thing slowed to a crawl, like trying to run in wet concrete. Took us half a day to figure out why the login page was taking two minutes to load.
3