L
11

My first coding project took 3 hours to fix one line of code

I keep seeing beginners post about how they spend hours debugging and feel like they're failing. But that's just how it goes sometimes. Back in 2018 I spent a whole afternoon on a for loop in JavaScript because I put a comma in the wrong place. My friend who's a senior dev just laughed and said that's how you actually learn. Has anyone else had a tiny mistake steal half your day?
2 comments

Log in to join the discussion

Log In
2 Comments
skyler_baker
Honestly, how long did it take you to realize it was just a comma? Ngl I've had that exact same thing happen but with a missing semicolon in PHP. Spent like 4 hours one night staring at the screen, and then I just happened to glance at it and saw it. The worst part is when your brain gets so tired you start second guessing everything else too. The real trick is to step away for 10 minutes or talk it out loud to someone, even if they don't know code. Works like a charm for me every time now.
7
mia727
mia7272d ago
The rubber duck method works wonders for this exact reason. Talking it out forces your brain to slow down and actually process each line instead of assuming you know what it says. I've caught so many dumb mistakes just by reading my code out loud to my cat.
4