📢
5

That one week where every single if statement broke on me for no reason

Last Tuesday I was working on a simple login form for my first real project, just checking if a password matched a hash. I spent 4 hours debugging why it kept saying the password was wrong, only to find out I had a typo in my variable name from like 3 hours earlier. Then Thursday I had a loop that was supposed to stop after 10 iterations, but it ran 200 times because I forgot to increment the counter. By Friday I was so frustrated I almost threw my laptop, but then I fixed a CSS grid issue in 2 minutes that I'd been stuck on all week. There's something about coding where one day you feel like you're learning nothing, and the next day it all clicks. Has anyone else had a week where bugs just snowballed like that? What's your weirdest bug that took way too long to find?
2 comments

Log in to join the discussion

Log In
2 Comments
iris_mason88
I forgot to increment the counter" is basically my autobiography in code form.
1
wesley_hart
Ha, right? That's painfully relatable. I spent like three hours debugging a loop once and the whole problem was I moved the increment line inside a conditional by accident. Felt like such a dummy when I finally saw it. The counter is always the thing you forget, every single time. It's never the fancy logic, it's always just that one missed ++ or +=1. Makes you want to scream into a pillow.
8