Is It Bad to Learn By Recreating Others' Code?
Asked by
CuriousCoder88
I'm currently learning web development, specifically focusing on JavaScript. I've been making small practice projects like quizzes and an RPG quest generator, and I'm now working on a simple music player. What I usually do when I want to build something new is check out existing versions online. I look at the HTML, CSS, and JavaScript to grasp the concepts, then I try to rebuild it independently in a new project. However, I do Google some parts I'm unsure about. My friend told me that this method is a 'bad habit' and that real programmers should create everything from scratch without looking at anyone else's code. This has left me confused about whether I'm learning correctly or not.
Answers
Not at all! Your approach is totally valid. It's important to learn from others and understand the code before you create your own version. Just make sure you're not blindly copyingโtry to grasp the 'why' and 'how' behind the code you see. That's how real learning happens.
Reply to this answer
What you're doing is totally normal and encouraged! Getting inspiration from existing projects helps you see different approaches to problem-solving. Remember, even the best programmers learn from the work of those who came before them.
Reply to this answer
Your method is actually a great way to build foundational skills. Many experienced developers do the same thing when they encounter new challenges. Just be sure to engage with the code. Modify it, break it, and figure out why it works the way it does. That's where the real learning happens!
Reply to this answer
Learning from others is how skills evolve in any field, including programming. Think of it as a way to gather inspiration and techniques that you can adapt to your own style. Just avoid copy-pasting without understanding, and you'll be fine.
Reply to this answer
Ignore that friend of yours! Most developers start by researching how others tackled similar problems before diving into their own creations. Studying others' code is a great way to learn new techniques and best practices.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions