H
14

Showerthought: I keep seeing beginners copy code without running it line by line

I was helping a friend learn Python last month, and he kept getting stuck on simple errors. Every time, it was because he copied a whole block of code from a tutorial and ran it without checking each part. He didn't know what half the lines did. I told him to slow down and run each new line in the console to see what happens. After two days of doing this, he started to see patterns and fix his own mistakes. It's like trying to build a bike without looking at the instructions for each piece. If you just paste code, you don't learn how it works. When something breaks later, you have no idea how to fix it. Has anyone else found a good way to get new coders to slow down and test as they go?
3 comments

Log in to join the discussion

Log In
3 Comments
matthew_wilson22
Yeah, "type it out instead of copy pasting" is the best advice I've seen. It forces you to process each word as you go. I read that your brain engages differently when you're typing versus just highlighting and copying. It just sticks better that way.
4
oliviadixon
Wait, I always thought copy pasting was basically the same thing? But yeah, now that you mention it, when I type stuff out myself I do remember it way more. Gotta try this more often.
6
rowan666
rowan6662mo ago
Totally agree, saw this with my cousin. Making them type it out instead of copy pasting forces them to actually read each line.
1