Why You Struggle to Learn to Code

Why You Struggle to Learn to Code

by Alex Hyett | 3 min read

Learning to code is easy, until it’s not.

When you first start learning how to code, you are learning the syntax and some of the basic operations. This all seems fairly straight forward, and you start to a gain a bit of confidence in your abilities. The problem usually occurs when you try and apply that knowledge and try and build out your own project.

The hard part about learning how to code isn’t actually writing code.

It is working out how to solve problems.

Welcome to tutorial hell - Population 1

To overcome this, people tend to go in search of tutorials that will tell them how to build exactly what they want to build. This could be to build a website, an API or a maybe even a game.

If they are lucky, they find exactly the tutorial they were looking for, and maybe they only need to change a few superficial things like the colours or the layout.

As they follow the tutorial, there will inevitability be bits they don’t understand. So naturally they copy and paste the code that is provided in the tutorial and tell themselves they will learn that bit later (they never do).

After following the tutorial, they make their few simple changes to make it look like their own work and then pat themselves on the back and marvel at what they have created.

The problem is, they haven’t learnt how to do anything themselves by just following the tutorial. When they go to start a similar project, they can’t remember how to do what they did before.

So they go in search for another tutorial.

This is what we refer to as tutorial hell, you can follow the tutorial fine, but when you come to build your own projects nothing seems to work. You are in your own personal programming hell loop.

The problem is, instructors make everything look easy.

In reality, before recording the tutorial they went through the process of building the project, having it not work and debugging it until it runs.

By following the tutorial, you miss out on all the mistakes and failures, and it is often these very failures that help you remember how to do it next time around.

So how do we go about learning things, so we can actually remember them and apply them to future projects?

What should you do instead?

This was a skill I learnt at university while studying physics.

When I did A Level Physics (similar to AP courses in the US) I had to remember around 15 equations to do be able to do the exams. At the time, I thought this was an impossible task.

Then I went to university, and it wasn’t 15 equations I needed to know, it was over 100. Not only that, but I had to be able to derive them from first principles.

The thing is, that actually made it easier to learn them. The first principles were really just the 15 equations I had already learnt. I was building on top of previous knowledge. To get to the other equations, I had to understand how the scientists came up with them originally.

I had to understand the meaning behind the equations.

What I didn’t know at the time was that by understanding the physical meaning behind the equations, I was engaging different parts of my brain in order to remember them. In my head, I was picturing what lead to the equation, whether it be planets orbiting a star or the interaction between the atoms.

You see this a lot with memory athletes, those people that can remember a complete deck of cards in a certain order. They don’t try and just dryly remember the cards. They imagine a room and associate different cards with different objects as they look around the room.

The key here is they are engaging different parts of their brain to help them remember.

Now, obviously learning to code isn’t like remembering a deck of cards or a scientific equation.

When you are following a tutorial, the key is to understand what each line of code is doing, instead of just blindly copying it.

Once you have understood what that line of code is doing, write it down in your notebook or draw a diagram. The act of writing or drawing will help you use different parts of your brain and therefore will help you remember it.

You don’t want to rely on tutorials to build out projects. You need to try and build things yourself with what you can remember. It is fine to Google the syntax for things, I still do it now, but don’t go searching for the solution straight away.

Yes, you are going to struggle when learning to code, but it is the struggle and overcoming those obstacles that help you become a better programmer.

When you manage to solve a problem yourself, it is going to be much easier to solve it next time you come across it.


ALSO ON ALEXHYETT.COM

15 Best Books for Programmers You Should Read

15 Best Books for Programmers You Should Read

  • 19 January 2023
As software developers we constantly need to learn new concepts, programming languages and technologies to stay up to date. One of my…
How I Take (and Organise) My Notes As a Software Engineer

How I Take (and Organise) My Notes As a Software Engineer

  • 05 January 2023
Taking notes is incredibly important as a software developer or for any career for that matter, our brains just aren’t designed for…
Code Katas: Can They Make You A Better Developer?

Code Katas: Can They Make You A Better Developer?

  • 21 November 2022
They say “practice makes perfect”, although I much prefer “practice makes improvement”. Either way, how do you practice being a programmer…
Why can’t all programming books look like this?

Why can’t all programming books look like this?

  • 12 January 2016
I have read quite a lot of programming books over the years. A lot of them have been really useful in learning a new programming language…
The Big List of Free Pluralsight Courses for Developers

The Big List of Free Pluralsight Courses for Developers

  • 09 October 2015
One of the most important aspects of being a software developer is the ability to learn new skills quickly. Our industry is moving so…