19
Printing test lines on cardboard saved my Python loops
I kept getting confused tracking variables inside nested loops, so I started printing simple messages like 'step 2 done' on scrap cardboard next to my monitor. Writing those notes physically helped me map out the flow before typing a single line. Then I'd code the loop and cross off each printed step as it worked. After 3 tries on a file parser, it finally clicked and I stopped guessing where the bug was. Does anyone else sketch out loops on paper first or is that just me?
1 comments
Log in to join the discussion
Log In1 Comment
cole99421d agoMost Upvoted
Started doing this exact thing with a whiteboard for my database queries, but then my cat kept erasing the steps with her tail. Got so annoyed I switched to sticky notes on the wall, and honestly the physical act of peeling each one off when it worked made the whole thing feel like a small win. Now I can't code a loop without having some paper trail nearby, even if it's just scribbled nonsense.
6