When I first tried learning to code, I failed miserably. I was trying to solve an easy coding challenge (think FizzBuzz), and kept running into errors.
I spent hours on seemingly simple problems and almost never managed to get it right.
I enrolled into a computer science degree when I was 16. I had taken several programming courses (both in university and online), and was somehow still unable to write a complete program.
The mere idea of programming filled me with anxiety, and whenever I sat down to solve a coding assignment my brain would freeze. Every time I ran into an error I'd feel overwhelmed, and would shut down.
I was confused as to why I found it so difficult to code.
I was good at all the other subjects, and found it easy to digest theoretical material. Why was programming so different?
Two years went by.
I accepted that coding just wasn't for me. Maybe my brain was wired differently, and I just couldn't think that way.
I wanted to look for a career outside tech. If I were to get a job in tech, I was looking at options that didn't require me to know how to code.
During the Covid-19 pandemic, I was staying at home and didn't have much to do. I started reading articles on data science and programming, and decided to try learning on my own again.
I started solving coding problems on the Internet, and found them pretty challenging.
I'd get stuck on a simple problem for a couple of hours. Sometimes, I couldn't find the solution for days.
I would look at other people's solution to the same problem and understand the logic they used. Then I'd use the same logic to write my own code.
Slowly but surely, I started to see progress.
It took weeks, but it worked. I was also able to start building small programs and games in Python.
As I spent more time coding, it started becoming like second nature to me. Every time I faced a new problem or encountered a tool I wasn't familiar with, I knew that I'd eventually be able to solve it.
There is a difference between studying for an exam and learning a skill.
All this while, I'd been treating programming like a subject. I would try learning as much as I could a week or two before the exam, and expected to be able to write good code.
It took me a long time to realize that picking up a skill was completely different. It took time, and required consistency and discipline.
You can't do something for a week, or even a month, and expect to be good at it.
You need to do it every day for at least a year.
Have you ever faced a scenario like this before?
You work on something for a couple of months.
It could be a project at work or a new skill you're trying to learn.
After some time, other responsibilities get in the way. You stop working on the project/skill temporarily to focus on other tasks.
Around 4-5 months pass, and you decide to start working on it again.
However, you realize that it is a lot more difficult now than it was before.
You lost touch with the work you'd done previously. You need to spend a lot more time now to get back into the groove and get to where you were before.
It's almost as though you need to start over.
The situation above is very common.
If you lack consistency, you will lose touch of skills you worked so hard to built.
It's better to do something every day for one minute than to do it once a year for an entire day.
If you want to learn something new, dedicate at least 3-4 hours to it every day.
Once you've reached a certain level of expertise (after 1-2 years), you can reduce the amount of time you spend to around 1 hour.
After the skill becomes second nature to you, you can even reduce this to 30 minutes.
However, you should never stop doing it.
Whether its picking up a new instrument, mastering a dance move, or learning to code, you need to do it consistently. Practice every day.