A guy in line at Micro Center told me to stop typing code into the console and save it to a file first, and that one tip saved my whole weekend | Coding For Beginners - Discusd
A guy in line at Micro Center told me to stop typing code into the console and save it to a file first, and that one tip saved my whole weekend
I was standing in line at the Micro Center on Saturday waiting to pay for a $12 USB cable when the guy behind me saw the Python book in my hand and asked if I was just starting out. I told him yes, and that I kept losing all my work because I was typing everything straight into the interactive shell and closing the window by accident. He laughed and said he did the same thing for two weeks back in 2019 and lost a whole day of practice problems, then showed me on his phone how to save code as a .py file and run it from the terminal. I tried it that night with a little program that asks for your name and favorite pizza topping, and for the first time I could actually fix my mistakes instead of retyping the whole thing. The next day I even figured out how to run the same file three times in a row to test different inputs, which sounds dumb but felt huge. Now I keep a folder called practice and every file is a tiny thing I can break without losing everything else. If you are just starting, do yourself a favor and get out of the shell as fast as you can. What was the first thing that made coding click for you when nothing else was working?