After two years of programming, I can see two ways to learn to code.
⚠️ This is my opinion, if you don't agree with me don't hesitate to give your mind in a comment ⚠️
When I started programming two years ago, I was 13, I still wanted to code without reading documentation or without to know basics.
That's how I started to learn HTML, then I learned PHP, in the beginning, I learned the Copy/Paste Oriented Programming. But over time I learned a lot of things through practice. I started to stop copy paste and to test the libs I was using by testing all methods/functions/class which was in those libraries. And that's how I discovered the practical way to learn to code.
Fast to learn
- You can skip something important
- It is difficult to debug something when you didn't read the documentation.
Lately, I discovered the theoretical way. I wanted to learn how to use React. So I went to the getting started and the documentation offers to way to learn React, I decided to try practical way and... I didn't understand anything. Since a few months, I need to know how it works behind the code to use something so I decided to read the theoretical guide and I understood everything.
- You know how it works
- Easier to debug
- It takes a lot of time
- It is sometimes boring
Like I said, since a few months I need to know how it works behind my code to understand how to use something. That's why I started to read a lot of documentation and to code less.
I can't say you should use this one because it's personal. To answer this question, you have to try those two ways to know what you should use.