18
I finally learned why my loops kept breaking after 3 months of coding
Last week I was working on a simple Python script for my beginner project, and my while loop just kept crashing. My buddy Sarah, who's been coding for like 5 years, looked at it for 2 minutes and pointed out I was missing a break condition. Turns out I'd been making this same mistake since I started learning 3 months ago in her basement study group. Has anyone else had a small fix totally change how you see your own code?
2 comments
Log in to join the discussion
Log In2 Comments
angela_park4d ago
Stop blaming the missing break condition and look at what else was going on. You probably had that same problem in a few different places without realizing it. Once you know what to look for those patterns pop up everywhere in your code. That was definitely a big moment for me too when I finally saw it. Just don't beat yourself up about it, we all have those blind spots.
9
tarak174d ago
That ONE missing condition made me realize how much I was overcomplicating simple logic.
3