Spent 3 weeks stuck on loops until I started writing the steps on paper like a recipe | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Spent 3 weeks stuck on loops until I started writing the steps on paper like a recipe
I kept getting wrecked by for loops and while loops in my intro Python class at the community college here in Akron, and I couldn't figure out why my programs kept either skipping steps or running forever. I'd stare at the screen for an hour, change one thing, run it, get the same wrong output, and repeat. Then last Tuesday my roommate comes in, sees me losing it, and says to just grab a piece of paper and write out each loop step by step with the actual numbers, like a recipe. So I did it for a simple counter loop, wrote every single pass out by hand, and suddenly I could SEE where my index was going past the end of the list. It felt so dumb and so obvious at the same time, but writing the steps down forced me to slow my brain down instead of guessing. Since then I've done it for every exercise, and my last 3 assignments ran right on the first or second try. Now I keep a notebook open next to my laptop with little hand drawn boxes and arrows. Has anyone else found that stepping away from the keyboard and using paper actually fixes bugs faster?