Coding was Hard Until I Learned These 2 Things!

Here’s what helped me go from “aspiring programmer” to actually landing a job in the field.
Natassha Selvaraj

·

Have you ever tried to code and found yourself failing miserably?

You start out enthusiastic, enroll into an online course that promises to teach you “everything you need to know about programming”, and once that’s done, you feel even more lost than you did when you started.

There’s this barrier you simply can’t break through, which fills you with dread, anxiety, and low-self esteem.

You watch in amazement as others make programming seem so simple — this programmer landed job offers at Twitter, Microsoft, and Amazon — while you struggle to write a single program without watching an online tutorial.

If you feel like this, you’re not alone. This was my situation too, just five years ago.

Ever since then, I’ve learnt to code and landed a data science job, launched an online course, and subsequently developed multiple streams of passive income with programming that have propelled me to financial freedom.

Before I get into the steps I took to become a programmer, I’d like to share an eye-opening story that changed my attitude towards learning programming.

The genius who failed at programming
Back in school, I was friends with this kid, who I will refer to as “Dylan” throughout this article.

Dylan and I go way back — I’ve known him since the 5th grade. He was the smartest kid in class. The one everyone would go to if they needed help with homework or exam prep.

Funny thing is, Dylan was not the type of kid to study for hours on end.

His intelligence seemed natural, almost effortless. He just had to read or hear about a concept once, and was easily able to internalize it.

Dylan was at the top of our class in every subject. He was an advanced mathematics student and was 4 grades higher than our school grade level in “Kumon”, an after-school math program.

By the time we were in the 8th grade, Dylan was doing college-level mathematics.

After finishing school, Dylan went on to get a scholarship to one of the most prestigious universities in the UK. When I spoke to him some time back, he told me that he was planning to learn programming, because he wanted to become a software engineer.

Just two months after that, however, Dylan told me that his plans had changed. He no longer wanted to become a software engineer because programming just “wasn’t for him.”

I was taken aback when he told me this.

The class genius found programming too difficult?

At the same time, I noticed that many students who averaged C-grades in school went on to become software engineers, web developers, and data scientists — professions which required a significant amount of programming expertise.

It became increasingly obvious to me that there were traits that outweighed exceptional skill or intelligence when it came to programming — such as grit, mindset changes, and self-confidence.

In this article, I’m going to break down two vital traits I developed to help me become a better coder.

These were lifestyle and mindset changes that helped me go from being an “aspiring programmer” to landing a data science job that requires me to code everyday.

1. Developing a Growth Mindset
In 2012, Stanford psychologist Carol Dweck coined the term “growth mindset.”

Essentially, Dweck explains that there are two types of mindsets — a fixed mindset and a growth mindset.

Let’s say you’re faced with a problem that is a bit too difficult for you — when you get stuck, what is your initial response like?

Do you feel anxious, or like giving up because you aren’t too smart to solve it?

Or… do you feel like you just haven’t solved it yet. You’ll get there eventually, with a bit more preparation.

If you fall into the first category, you have what Dweck describes as the fixed mindset. A person with a fixed mindset believes that traits like talent and intelligence are inherent. That you either have “it” or you don’t.

Let’s go back to Dylan’s story.

As the fast learner, the kid who got good grades without even trying, Dylan barely made mistakes.

He was the perfect poster child in school, who was constantly complimented for having “good brains” and being smarter than everyone else.

So…what do you think happened when for the first time in his life, this guy tried to learn to code, and initially struggled?

When he browsed the web for answers and strangers, random people on the Internet were able to write programs he barely understood?

When he struggled to perform the most basic tasks without running into errors?

I’ll tell you what happened.

Dylan went into fight or flight mode. He got frustrated. He decided that programming just wasn’t for him.

You see, Dylan embodies the fixed mindset. He thrives in environments that validate him, and breaks down at the mere prospect of failure.

And for the longest time, I was like this too.

When I first tried learning to code, I thought that there were two types of people in the world — people who were cut out for programming, and people who weren’t.

It turns out I was right.

The people who are cut out for programming, however, aren’t smarter or more talented than you.

They just have the ability to accept that learning how to code from scratch is something that requires effort and patience. That it cannot be mastered overnight.

In other words, they have the growth mindset.

The growth mindset means that you see your programming ability as something that can be cultivated by effort. When you fail to learn a concept or run into an error, you don’t see that failure as a way to describe yourself.

Rather, you see it as an opportunity to learn and grow.

For many of us, the growth mindset does not come naturally.

When I first started learning to code, I would struggle with simple problems that I saw my peers solve in minutes.

This led me to question my intelligence and doubt my aptitude for the field.

However, over time, I realized that programming wasn’t like the other subjects we’re taught in school.

Learning to code isn’t like memorizing a textbook for an exam. You can’t spend a few weeks studying it and expect to build full-stack applications after completing a course.

It is a lifelong endeavor that never ends — an exercise that needs to be repeated over and over again, making little improvements with every hour you spend on it.

I like to think of it as going to the gym, or riding a bike. You don’t build muscle overnight after doing a single workout at the gym. You need to show up every week and repeat the action for days on end until you become better at it.

And if you skip a workout or don’t show up for a month, you end up losing progress and having to start over.

Treat programming like a workout.

It can take months to see any visible signs of progress, but showing up consistently and focusing on the process is the only way to improve.

2. Turn Programming Into a Daily Habit
Now that we’ve established that consistency is key when learning to code, how do you turn this into a habit that is repeated enough times to actually see progress?

Learning to code is difficult. And as humans, research shows that our brains are wired to take the easy way out.

So… how do you fight the urge to take the path of least resistance and convince yourself to code every single day?

Sure, it’s easy to stick to your goal of becoming a programmer at the beginning, when you’re motivated. The hard part is staying on track when you start getting frustrated at seeing no visible signs of progress.

Something that helped me make programming a daily habit is a tip provided by James Clear in his bestselling book Atomic Habits.

In this book, James Clear states that habits are formed when you repeat something often enough that it becomes a part of your daily life.

To turn any action into a daily habit, he recommends setting an “implementation intention.”

Implementation Intentions
Implementation intentions allow you to be really specific about what you’re going to do, when you’re going to do it, and where you’re going to do it.

For example, instead of saying — “I’m going to learn programming”, say “I’m going to code every day from 11am to 4pm at the café near my house.”

This implementation intention is specific to me, but you can create a similar one for yourself and follow through with it.

An implementation intention like this will ensure that you make coding a part of your daily routine and stick to it, even on the days when you’re just not feeling it.

Another tip that I found useful is called temptation bundling.

Temptation Bundling
This is the action of combining something that you have to do with something that you enjoy doing, in order to turn it into a daily habit.

For example, most of us find it difficult and unpleasant to go to the gym. However, we love watching Netflix and listening to music.

If you combine the action of watching your favorite TV show with the task of working out every evening, you can trick your brain into looking forward to exercising.

As a coffee enthusiast, I would only allow myself an iced latte if I was programming, which made me look forward to the action of opening my laptop and writing code.

This helped me get out of bed and code everyday, eventually turning this into a daily habit that I grew to enjoy.

Takeaways
To summarize, learning to code is a difficult undertaking that’s time-consuming and requires tons of practice.

It can be unrewarding at first, with little to show for the hours you are putting in.

However, just like going to the gym or riding a bike, you’ve got to turn it into a daily habit. Focus on the process rather than fixating on the outcome, and you will inevitably improve over time.