O
21

Shoutout to the person who told me to test my code after every single change

I was coding a simple calculator in JavaScript at a coffee shop on Saturday. I made like 15 changes all at once before running it and the whole thing broke with no clear error. Took me 2 hours to figure out I had a typo on line 3. Now I run the code after every 2 or 3 lines and it saves me so much frustration. Has anyone else wasted a whole afternoon because they didn't test as they went?
2 comments

Log in to join the discussion

Log In
2 Comments
lucasking
lucasking13d ago
I read somewhere that professional coders test their code after every single change, and now I understand why. Your story about the coffee shop calculator reminds me of something similar I did with a personal budget tracker. I spent a whole Saturday chasing a bug that was just a missing comma in a list, all because I didn't test until the end. It feels like a small habit, but it really does save you from those long frustrating afternoons.
2
jones.angela
A whole SATURDAY over a missing comma? That's brutal.
3