I've taught programming for years and my students always understand lectures but freeze when coding alone what am I doing wrong?

Posted by More-Station-6365@reddit | learnprogramming | View on Reddit | 28 comments

Hey r/learningprogramming, posting here because I want honest feedback from people who are actually learning or have recently learned programming. I've been teaching an introductory programming course at a US college for a few years now. And every single semester without fail I see the exact same pattern in the majority of my students. They follow my lectures perfectly. They answer questions correctly in class. They can read code and explain what it does. But the moment I give them a blank editor and say "now write this yourself" — they freeze completely. It doesn't matter how simple the task is. Even students who seemed confident during the lecture suddenly don't know where to begin when there's no example in front of them. The specific patterns I keep noticing are: Students understand a concept while watching but can't reproduce it 10 minutes later without reference material. They know the syntax but don't know how to break a problem down into steps before writing code. They treat every new problem like they've never coded before even when it uses concepts they've already learned. They get stuck on errors and immediately ask for help instead of trying to read and understand the error message first. I've tried different teaching approaches — more examples, fewer examples, more practice time, pair programming — but this gap between understanding and independent writing keeps showing up. My honest question to this community is — if you've been through this struggle yourself, what finally helped you bridge that gap? Was it something a teacher did differently, a practice method that worked, or just time and repetition? I'm genuinely trying to improve how I teach this and I feel like the people learning it have more insight than most teaching guides do.