Learn What You Need
Mindset
When I was new to web development, I learned HTML, CSS, and JavaScript. I enjoyed learning HTML and CSS, but I hated learning JavaScript.
I learned those technologies through videos. When I learned JavaScript, the instructor told me to write variables and write console.log(). I said to myself, "What is the purpose of doing that?" But I kept following along and wrote the same as the instructor wrote.
Once I finished those videos, I asked myself, "Do I need JavaScript now?" The answer was, "No, I do not need it." But the instructor told me that JavaScript is necessary for web development. So I repeated the tutorial since I did not understand anything about it.
Once I understood it, I still felt confused and uncomfortable because I did not have my own reasons to learn JavaScript.
One day, I had an idea to make a cookie-clicker game. I had a reason to learn JavaScript. That made me excited to learn JavaScript.
I searched tutorials that could help me make it, such as using querySelector(), addEventListener(), textContent, and setInterval(). I learned to show the number 7000 as 7K. I also learned about the switch and if statements. I learned a lot about JavaScript. Also, learning it became fun. I did not need strong willpower or anything like that.
The pattern keeps repeating. I was eager to learn about Eleventy because I needed it to make this personal website. I also learned to write a good resume because I needed to apply for jobs.
You learn something because you need it. If you know the reasons and need to learn that, you will learn it.
Have you ever joined a competition? Why do you prepare yourself before joining it? You want to win, right? If you do not want to win, you will not do anything. But because you want to win, you have all the motivation to prepare.
Reasons are the best source for your motivation.
Next lesson