Back when I was learning to code, I kept messing up my loops for weeks
I was working on a project for a class and my loops kept running one time too many or not enough. I must have rewritten the same block of code twenty times. My friend in Boston told me to just add a print statement inside the loop to see what was happening each step. I thought it was too simple to help, but I tried it anyway. I wrote 'print(i)' inside my for loop and ran the script. Seeing the numbers pop up in the console showed me exactly where my logic was off. It was such a basic fix, but it saved me hours of staring at the screen. Does anyone else have a simple trick like that that just clicked for them?
Wait, @maxburns, you learned to stop hating loops? The print statement just showed me how broken my logic was. I'd stare at a wall of numbers going the wrong way, realizing my counter started at ten instead of zero. It didn't make me love loops, it just made the pain visible. That's how I learned to fear off-by-one errors forever.