Warning: I broke my own code 4 times last week and finally found the bug in 12 minutes | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Warning: I broke my own code 4 times last week and finally found the bug in 12 minutes
Last Tuesday I was stuck on a Python loop after work in my apartment in Austin, and the fix was a `break` statement I had put in the wrong spot. I had typed it 4 times before I saw it, and I only found it by printing the list right before the loop ran. How do you all track down silly errors after staring at the screen too long?
Printing stuff just hides the real problem. A break in the wrong spot means your loop logic is shaky, so go rewrite that block until the flow is obvious. Staring harder won't fix sloppy structure.