Is it normal to understand code but struggle to write it from scratch?
Asked by
key signature change
I'm learning Python and often understand lessons while watching them. I can follow what each line does and recognize why the solution works, but when I'm given a new problem and asked to write the code myself, my mind goes blank. I understand solutions after seeing them, yet struggle to create one independently, which makes me wonder whether I really know the material. Is this a normal stage of learning programming? What helped you move from recognizing code to writing it yourselfโmore exercises, small projects, rewriting examples from memory, pseudocode, or something else?
Answers
Yes, this is completely normal. Understanding someone elseโs solution is recognition, while creating your own solution requires recall, problem-solving, and practice. Those are related but different skills. The main way to improve is to write code regularly without immediately looking at a solution. Start with very small programs and gradually make them more complicated.
Reply to this answer
Use a progression of tiny projects instead of jumping straight into large challenges. For example, write a program that prints a greeting, repeat it several times, accept a name, process multiple names, and then add validation or sorting. Each small extension gives you practice turning an idea into code while keeping the problem manageable. With enough repetition, the blank-page feeling becomes less intimidating.
Reply to this answer
Avoid only watching tutorials, because that can create a false feeling of mastery. Pause before the instructor gives the solution and attempt the exercise yourself. Afterward, close the lesson and rebuild the example from a blank file. You can also modify working code, break it deliberately, and add a new feature. Getting stuck and debugging teaches more than simply following along.
Reply to this answer
Try separating the programming problem into two parts: logic and syntax. First describe the solution in plain English, bullet points, a flowchart, or pseudocode. Break the task into tiny steps and solve one step at a time. Only after you know what the program should do should you worry about the exact Python syntax. Looking up syntax is fineโthe important skill is learning how to plan the solution.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions