F
9

Serious question, did anyone else get stuck on loops for way too long?

I was trying to make a simple list of names show up on my screen last week, but I kept writing the same name over and over. After three tries, I just wrote it out by hand on paper, step by step, with a pencil. Seeing it on paper made me realize I was putting the print command inside the loop wrong. Now I always sketch tricky bits on paper first. What other simple tricks help you see where your code is going wrong?
3 comments

Log in to join the discussion

Log In
3 Comments
the_amy
the_amy4d agoMost Upvoted
Actually, I think paper is a waste of time for debugging. My IDE has a visual debugger that steps through the code line by line and shows me every variable value instantly. Drawing it by hand just seems slow and messy when the computer can show you the exact problem in real time.
9
luna_chen8
Paper debugging, the original rubber duck.
2
wyattramirez
Ever try explaining it to a wall?
7