Pro tip: I stopped writing code in my head before typing and my bugs dropped a lot | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Pro tip: I stopped writing code in my head before typing and my bugs dropped a lot
For my first 4 months learning Python I would stare at a problem for 20 minutes trying to work out every line in my head before touching the keyboard. I'd write like 30 lines from memory, run it, and get slammed with a wall of red errors that made no sense to me. Then a guy in a Discord server for beginners told me to just type one or two lines at a time and hit run after each one. It felt stupid and slow at first, but I tried it on a little quiz game and found 3 bugs in 10 minutes that would've taken me an hour to track down later. Now I run my code constantly, like every couple lines, and I actually understand what each piece does before I stack more on top. My last small project ran clean on the second try, which never would've happened before. Does anyone else catch themselves trying to write a whole program in one shot?