Beginner Programming Mistakes To Avoid When Learning To Code

Jan 4 2019 | By Kingsley Ijomah
Beginner Programming Mistakes To Avoid When Learning To Code

As you start on your journey into learning to code, there are some mistakes you should be careful to avoid, these few tips will help you learn to code faster and not give up out of frustration.

1. Do Not Type Any Code You Don't Understand

This is very important, and it is key to building a very solid foundation. You might be thinking "What if I really don't understand it?" in this case, there is a tip I have for you, always begin with a question, What is this supposed to do? and then figure out what the line of code you are about to type does towards answering that question.

Understanding the code before you type it, helps you build your code reading skills, learning to read code this way, means you are building a solid foundation that would help you become awesome at programming.

2. Avoid Writing Code With Pen & Paper

I don't think I have taught any beginner, who didn't at some point show me a notepad with codes written with pen, this is understandable because we are taught to make notes when we are in school and so when you get into learning to code, it is easy to think that writing codes with pen is the way to go, but let explain why this might be doing more harm than good.

- You Don't Know When You Have Written It Wrong

When you have typed a piece of code on the computer and run it, you immediately see if it is right or wrong, but when you write it down you could have made a mistake and not know it because you cannot run it, and if later you type that wrong code using your note as reference, now you have to spend more time searching through the original source all this could have been avoided by typing the code straight into your computer without writing it down.

- You Miss Out On Learning Some Key Strokes

Coding uses some keyboard keys that you probably don't use on a day to day basis, such as " ; # ! { [ ] } / ^ ~ \ " when you start learning to code, typing instead of writing helps you learn these keys and make them part of your toolset.

- Your Code Is Not Formatted Properly With Pen and Paper

Big part of coding is writing a well-formatted code with right indentations and spacing, these make it easier for your code to be read and for you to find places with issue if it needs debugging, when you write with paper, this is missed out, and therefore you are loosing out on an opportunity to learn how to format your code properly.

- You Miss Out On Learning Some Unknowns

When you type on computers using code editors, you often get suggestions when you start typing, these suggestions give you clues of other unknown codes you could use, in the beginning, I learned a lot this way, writing the code down on paper, of course, does not offer you code suggestions when you write so you miss out on learning even more.

3. Be Patient And Read Error Messages

When you write some code and try to run that code but it throws out some errors instead, don't immediately turn to your code and begin guessing what the problem could be without first reading the error message and trying to understand it.

Reading and understanding error messages is key to learning to code, error messages often have the best clues, they tell you what sort of error you just had, what caused it and even down to the line of code that might be responsible.

The more error messages you can recognize the faster you will be able to fix future bugs as well as help other developers when they are stuck, sometimes without even looking at their code because you know that error message by heart.

4. Avoid Coding For Hours Without Having A Break

A big part of coding is thinking, using our imagination to figure out how things work and why they behave in a certain way, so having a break to give our brain some time to process that information is very important. These are some of the reasons breaks are very good when learning to code.

- Give Your Brain Some Break To Process What You Have Learnt

After you have learned some piece of code over some time, give your self a break to process that information, your brain will naturally interrogate what you have learned and when you return, you come back at it with a fresh mind and you could even learn more than you thought when you revisit the same code.

- Forgetting Is Part Of The Process Of Learning

When learning our brain make so many references, especially when we are learning things that are very different to what we have ever done, giving your brain some break allows it to forget some of those references that are not relevant and form more solid ones, this process allows us to revisit what we have learned with an Aha moment!!, so when having a break, imagine that as part of the learning process as opposed to wasted time.

5. Don't Give Up Even When You Feel Like You Are Not Learning

- Revisit The Codes You Have Written To See How Far You Have Come. 
Tell someone about what you've learned. Saying out loud what you've learned is a way to help you memorize faster. 

- It Takes Time, Give It More Time And You Will See Progress. 
Coding doesn't happen overnight, practice and practice is the key to success.

- Shut Your Computer If You Are Tired, Come Back Later.
Its normal to feel lost, exhausted and drained when you're learning something new. Allow yourself for breaks.