Why Do Most People Fail to Learn Programming?

Have you spent hours taking coding bootcamps, online courses, and tutorials, only to feel like you aren’t getting anywhere?



Why Do Most People Fail to Learn Programming?
Photo by Fotis Fotopoulos on Unsplash

 

Introduction

 
When I first wanted to get into the data science field, a major roadblock I faced was learning to code.

Despite having spent hours taking online programming tutorials, I was completely lost when I had to write my own program to build projects from scratch.

When deciding on a career path, I was firm on pursuing a field that didn’t require me to code. I felt like I just wasn’t cut out to become a programmer.

However, when the Covid-19 pandemic hit, I was stuck at home with a lot of free time on my hands. Since I didn’t have much else to do, I decided to give myself another chance at learning programming.

This time, though, I decided to do some research around why I was finding it so difficult to code. Was it true that some people were just naturally better at programming than others? Was I missing a secret ingredient that would make me a better programmer overnight?

I spent countless hours reading other people’s experiences with learning to code. I spoke to senior developers and data scientists. 

It took me a while, but I realized that it was my own attitude that was holding me back from learning to code.

You see, my issue wasn’t that I was not smart enough to become a programmer. It was that I didn’t possess the correct mindset.

I was treating programming like any other subject at school. I was trying to learn too much, too fast. And in doing that, I forgot that there was a learning curve. I got demotivated easily when my codes failed to run. I constantly compared myself with other, more experienced programmers whose codes I couldn’t understand.

Once I realized what I was doing wrong, I decided to do things differently this time. I coded everyday, and allowed myself to make mistakes along the way. At first, simple problems took me around 4–5 hours to solve. As I kept practicing, I was able to solve more complex problems at a faster pace. Slowly but surely, I saw myself get better at it.

Today, I am by no means a proficient programmer. However, I am able to complete tasks at my day job, perform data science workflows, and take up freelance roles that require me to code. Every time I solve a new problem, my programming skills improve.

In this article, I’m going to provide you with advice on how to learn to code. The insights provided here are based on my own programming journey, along with pieces of advice I’ve gathered from experienced coders over the years.

 

Advice #1: Avoid the Tutorial Trap

 
Almost all of us have taken a coding online course before. Tutorials are a great way to start learning to code, since they teach you basic programming concepts and syntax.

However, most people never stop taking tutorials.

I’ve coded along to at least 10 programming YouTube videos, and purchased over 5 online courses in multiple different languages.

I kept doing this, expecting to learn something new every time I took a different online course.

Unfortunately, I didn’t.

Every course I took taught me the same programming basics that I already knew. 

However, since I wasn’t applying any of these concepts in practice, I always failed to come up with my own piece of code to solve a problem.

This was an awful situation to be in. Every time I took a new tutorial, I felt like I was learning something new. But when I tried to create a project on my own, I simply didn’t know where to start.

Many programmers refer to this as the tutorial trap.

And if this situation sounds familiar to you, then it’s time to break out of it.

Once you’ve taken an introductory course to learn basic programming concepts, start to put your knowledge into practice.

I suggest using a coding challenge site to hone your skills. I signed up to a platform called Hackerrank. They present coding problems in a variety of different languages, with varying levels of difficulty.

Start out with the most basic challenges, then work your way up to the more difficult ones.

At first, I used to spend around 3–4 hours solving even the most basic problems. I’d look at other coder’s solutions to the question, then reframe their thought process into my own piece of code.

This way, I slowly moved away from just copy-pasting codes. I was able to understand different people’s thought processes, and restructure it to match my own. 

Doing this will enhance your programming skills, as you will come to realize that there are many different ways to look at the same problem.

 

Advice #2: Change Your Mindset

 
Learning to code is like riding a bike. You need to be willing to fall multiple times before you finally get the hang of it.

When I first started learning to code, I lacked patience. After spending a couple of hours learning a new programming concept, I expected to be able to put it into practice successfully. Every time I ran into an error, I got frustrated. I started losing confidence. Slowly, I gave up.

We live in a world in which most results are instantaneous. We expect quick outcomes, and in the process, tend to forget that there is a learning curve.

Another mistake I made was that I always compared myself to other people. When I read other programmer’s codes that were complicated and difficult to understand, I often felt like I was never going to get there. It seemed as though I’d never be as good as they were, and this again lowered my confidence.

It took me a while to realize that there was no way to become a proficient coder without practice. Every good programmer I know has had years of experience in the field. They’d spend hours in front of a computer screen every day. 

And in speaking to them, I realized that they all faced the same issues I did. Even with years of experience in the field, they still run into errors that can take up to days, or even weeks to solve. They also struggle when having to make the shift to a different framework, and face difficulties when reading other people’s codes.

Coding isn’t easy. Even seasoned programmers face problems that are seemingly impossible to solve. They too get frustrated when coding. As the amount of experience they have increases, so does the complexity of the tasks they need to complete.

 

Advice #3: Create Projects

 
After solving problems on coding challenge sites and overcoming barriers in your mindset, start working on something you’re passionate about.

Building a full-fledged project is a great way to put all the skills you’ve learnt into practice.

Most of my current knowledge comes from the projects I’ve created — both at work and on my own.

Also, when you create a project, you go beyond the tool stack you’ve learnt in online courses and tutorials. You need to expand to different frameworks and possibly even multiple languages to come up with an end-product. 

This will improve your programming skills dramatically. And when you land a job in the industry, even if you’re required to use a different set of tools to solve the problem at hand, you’d be able to pick it up a lot faster.

If you’d like to build your first data science project but don’t have any ideas on what to create, you can take a look at some of my previous work for inspiration.

 

Conclusion

 
Learning to code involves practice, patience, and the ability to let yourself fail multiple times before you get even half decent at it. 

More than anything else, it requires a massive shift in mindset.

Many people expect themselves to become expert coders after completing online courses. When they feel stuck, they give up on the problem too quickly, and feel like they just aren’t smart or prepared enough to learn programming. 

This feeling of “it’s just too difficult” has driven many aspiring data scientists to quit and switch to a different career path.

To overcome this, you need to understand that there is no way to become a decent programmer without spending a lot of time coding. You need tons of practice, and need to learn to fail multiple times. 

Spend time on coding challenge platforms. If you feel stuck, look at existing solutions posted by other programmers. Try to replicate their thought process. Keep doing this until you build confidence in your ability to code.

Finally, create your own practice projects from scratch. Make sure to give yourself enough time to learn, fail, and grow. If you have friends who are on the same journey, work with them on a project. This way, you can share ideas and motivate each other to consistently learn.

 
 
Natassha Selvaraj is a self-taught data scientist with a passion for writing. You can connect with her on LinkedIn.