Is copying code a good way to learn programming?

January 24, 2026 4 answers
Asked by ~28th attempt
I've been wondering about the best ways to learn programming, especially since I find myself often getting stuck. I sometimes resort to asking AI for help, where I copy the code it generates, then go through each line to understand it. If I come across a helpful Stack Overflow post or documentation, I might copy from there as well. I then play around with the code afterward. I'm curious if this approach is effective for actually learning programming. What do you think?

Answers

soft boiled
Using AI for coding definitely speeds things up, but for learning, you should ask yourself, 'Am I really learning?' Building projects and experimenting is key. Start with simple apps and gradually increase the complexity. Watching crash courses can help you get familiar with syntax before diving into actual coding. ChatGPT should be a tool, not a crutch!
Reply to this answer
nested.loop
Copying solutions from anywhereโ€”AI, Stack Overflow, or documentationโ€”might not be the best way to truly learn. At the end of the day, if you're just reproducing code without understanding it, you're not actually developing your skills. It's important to engage your brain and try solving problems on your own to really learn programming. Think of it like lifting weights; just watching others lift wonโ€™t build your musclesโ€”practicing yourself will!
Reply to this answer
weft3.pass
I'd agree, this isn't a great learning method. If you find yourself copying a lot of code, it could mean you're missing some foundational skills. Instead of relying solely on other people's solutions, try to build your understanding from the ground up. Dig into problems and learn how to apply your knowledge to find solutions. Messing around with code is a good start, but donโ€™t offload all the thinking to someone else!
Reply to this answer
anteater.diet
Sure, getting help online is fine, but you need to really engage with the problem. Begin with a basic task, like creating an input field that takes your name and displays it backwards, and build everything yourself. Look for solutions online, but avoid just copying and pasting. Instead, take time to understand each piece of your code and challenge yourself to solve problems without depending too much on AI.

map scale question: That's pretty much how I approach coding too! Iโ€™ve been tasked with creating apps and usually start with fetching data, reading documentation, and troubleshooting as I go. It can be a bit of a process, but it helps me understand better than just taking shortcuts with copied code.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions