31
Why is learning to code so hard?
A comment I’ve heard from many people is :
“I’ve tried to learn coding so many times, but it never seems to click.”
Is this something you’ve said in the past? Don’t worry, you are definitely not alone. Having taught multiple introductory programming classes before, I’ve noticed this is a sentiment shared by a lot of newly starting developers.
Learning to code is hard. And while it is true that some people find it easier to learn programming in comparison to others (whether due to higher levels of interest or an aptitude for logical/mathematical reasoning), the way someone goes about teaching themselves to code will impact the likelihood of them developing and retaining those skills.
It is very tempting, as it is when learning all new skills, to jump straight into creating the cool things. Like crocheting a jumper, or baking a twelve story croquembouche. It is important to differentiate between your end goal (what you want to build), and what you need to know/learn in order to meet that goal.
Along with that, there are various skills you should develop that will aid you in tackling any blockers or errors you may face when completing a project.
In this article I will be discussing my top tips I’ve shared with hundreds of past students that helped them grow in confidence and ability, as well as the tips previous mentors have shared with me.
Learning to code is often likened to learning a language or an instrument. So methods such as spaced repetition are regularly recommended to learn new programming languages, just as you would with learning any language. As much as this is a helpful way of learning, it is important to acknowledge the differences between learning a programming language and human language. The main difference being:
There is no margin for error when writing code.
Let’s say, for example, you are learning to speak French. You practice your French by making conversation with a fluent French speaker. If you were to mispronounce a word, or jumble up the order of words in a sentence, it is likely the other person will still understand what you were trying to say and a conversation will continue. Unfortunately, a computer does not have that sense of intuition. There is no “close enough” in programming — only right or wrong. That’s what makes it so difficult.
If you were to ask any person with coding experience, I’m certain they would be able to recall multiple times they were stuck on a silly bug for hours if not days because of a spelling mistake or syntax error. And if they can’t… well they’re lying ! I’ve personally felt the embarrassment of being stuck with broken code for hours, only to realise I wrote “docmuent” instead of “document”, or raged when I couldn’t connect to my server only to realise it was running on port 8888 instead of 888. A human can understand what was meant to be said, but a compiler does not have that ability.

The unforgiving nature of code is what makes it such a difficult thing to learn. It is also the reason why it is vital to develop a handful of important skills that both limit mistakes made, and enable you to solve and debug errors in order to move forward from those mistakes.
If you are trying to learn to code, it is important to first learn the following four things:
It is one thing to copy out an answer you saw on Stack Overflow. It is another to understand what you are writing and what it is accomplishing. It is near impossible to learn how to code without first understanding fundamental components that code is made of. Good things to research first are:
There are various online courses available to teach you these concepts, as well as countless Youtube videos. For the most part, these are transferable skills across different languages.
Videos by “The Coding Train” are what I watched when I first started learning. Another great resource is “Code Academy” if you are looking to challenge yourself and receive feedback.
Once you’ve got the core concepts down, you should spend some time practicing completing functions to expose yourself to different scenarios and generate your own strategies for how to overcome them.
Expose yourself to popular searching or sorting algorithms. Practicing implementing well known algorithms will assist you in developing a better understanding of computer science concepts. Plus, the more practice you get, the better you become at problem solving. This may take a bit of time to improve at, but it can also be very fun.
Here are some fun resources to practice with:

When your code breaks it is important to ask yourself: do I understand what I’ve written? Is this broken because I lack understanding on the topic?
Odds are, you will encounter many MANY errors throughout your journey. Experienced programmers still come across various bugs and challenges they need to unpack every day. The difference between experienced and unexperienced developers is that the former have effective strategies on how to debug and unpack issues in their code.
The best way to debug your code (especially as a beginner) is to print variables to your console or using debug tools built into the IDE you’re working in. You will gain a better understanding of your code by stepping through it line by line to find the source of your issue. Tracing things in your head can also get super tricky and complex. Try creating memory diagrams and tracing your variables on a piece of paper as you step through code.

The more experience you have encountering problems, the better equipped you’ll be with dealing with them in the future. Don’t feel disheartened if you are making a lot of mistakes initially — we all make mistakes, and the learning curve is different for everyone. Take each mistake as a learning opportunity — you’ll be surprised how quickly concepts will come to you later when faced with similar problems
Do a bit of research on the language you want to learn. This isn’t exactly a step, but more something you should be doing and learning by default when learning concepts and practicing problem solving. No doubt you will come across various errors and bugs you cannot explain. By researching syntactical standards of the language of your choice you will be able to identify these mistakes earlier. Maybe try and organise a time to chat with someone who has experience with that language and ask for their tips.
Another thing to consider is what type of things you are wanting to build. This will impact which language will be the most appropriate to learn. If you are planning to build iOS apps, Swift would be a worthwhile language to consider learning. If you were hoping to build websites, Javascript would be more appropriate. Do your research and ask for advice. There are so many languages and tools out there, it is important to try and find the one with the most appropriate features and functionality to suit your goal product.

The best and worst thing about programming is that the learning never stops, and technology continues to evolve and change. Be patient with yourself, set up a study plan, and practice, practice, practice!

31