9
Question about getting stuck on a loop for hours
I spent all yesterday trying to make a for loop print numbers in reverse, but it kept crashing. Finally tried writing the logic out with pen and paper first, and it clicked in like 5 minutes.
3 comments
Log in to join the discussion
Log In3 Comments
emmashah2mo ago
Actually, that pen and paper method sounds like a huge time sink to me. Just running the code and reading the error messages is way faster for figuring out a loop. All that sketching feels like an extra step that just slows you down. My brain works better by trying things in the editor and fixing what breaks. Keeping a notebook seems like a habit from a time before we had good debuggers.
8
emery_craig2mo ago
Classic programmer move... my brain needs the pen and paper crutch too or it just blue screens.
4
olivia_wilson2mo ago
My first coding job had me stuck on a reverse loop for two days straight. @emery_craig is right, the pen and paper trick is a lifesaver when your brain just freezes. I keep a cheap notebook by my keyboard now just for sketching out logic. It feels dumb but it saves so much time fighting the compiler.
3