I'm completely new to programming, and I struggle to stay focused during lectures or verbal explanations. I've tried introductory courses in several languages, including a well-known computer science course, but I find the theory so boring that I start nodding off. On the other hand, I enjoy looking at working code, asking questions about it line by line, and figuring out why each part works. I've even used AI to generate small programs, such as games or simulations, and then studied the result. Can I become a good programmer by learning this way, or do I need to force myself through traditional lectures and theory?
3 Answers
Studying working code can be a useful starting point, but reading code is not the same as being able to program. You need to write your own code with little or no AI assistance, change existing examples, deliberately break them, fix the errors, and eventually recreate the idea from scratch. That is where passive understanding turns into actual skill.
Try learning through small projects or interactive exercises instead of relying only on lectures. It is fine to use hints when you are stuck, but let the hints guide your thinking rather than having AI produce the entire solution. For example, with a problem like Two Sum, attempt it yourself first, ask for a small clue, then close the solution and implement it on your own.
Be careful with AI-generated programs as a beginner. Code can look understandable while hiding concepts you have not actually mastered, and it may contain mistakes. A good routine is: make a prediction about how the code works, run it, modify one part, observe the result, and then write a smaller version yourself. If you cannot reproduce or explain it without the generated code, you probably only recognize it rather than know it.

That makes sense. I was able to understand the idea after getting small hints, but I can see why writing the complete solution myself matters. I’ll try to use AI more as a tutor than as a code generator.