The 5 Best Methods to Learn Programming
In this post, I’m going to share with you the five best methods to learn programming. These rules help me learn new programming languages, frameworks, and other technologies like databases in just couple of days.
I will also give you a bonus method, that if I knew it sooner, it would save me plenty of time and money in all the opportunities I missed.
If you commit yourself to follow these rules, I promise your programming learning will skyrocket.
If some of them sound too simple to be true, then give them a try every day, for a week, and check how much progress you have made. How much more confident you feel about the technology you are learning.
You will notice that all of these rules are connected, and they play together very well.
Let’s start with the first one, which is…
First and foremost, you have to code a lot.
You don’t have to wait until you read all of the coding books or watch all the gurus on Youtube to write code. You don’t have to wait until you are a good programmer before you start coding. If you wait for it to happen, let me tell you, it will never happen.
You don’t have to wait for any permission from anyone to start turning your ideas into code.
Give yourself permission to be a bad coder, or really, really bad coder before you become a good one. By doing it, it doesn’t matter how good you are. What matters is you are moving forward.
Even if you already are an advanced coder, if you give yourself a break from coding for a couple of weeks, or months, you will notice that you are not as sharp as you used to be. It’s the same as with foreign languages. When we don’t use them, we forget them.
That’s how our brain works. It’s expensive to keep all the connections between neurons, to all this data, words, rules, grammatics, we are learning. So our brain tries to save precious energy and reduce the connections that are not needed, or delete them entirely. It’s only up to us if we keep them in good shape. If we do not do that, we will lose what we learned.
Put aside at least 1 hour every day for coding. But keep in mind “coding” means writing code, not reading about someone who is coding, or watching some people talk about coding.
If you are a coder, or you want to be one, you have to code.
We learn programming like we learn everything in our lives, by repetitions, trials, and errors.
Often times, when we are looking for a solution to a particular programming problem, we ask Google a question, and we get an answer. Everyone is doing it, no matter how pro he is.
The trick here is not to copy&paste the solution but to type it. This rule is simple when you copy&paste, you don’t learn anything.
If your goal is to make progress, to reach the level when you do not need to look for answers online, copy&paste and pray to make it work, learn to type everything on your own.
I know it’s very counterintuitive, but the difference it makes can’t be overemphasized.
When you learn to code, you will notice that most of the tutorials provide a complete codebase at the end.
Remember, it’s not about who will collect the most of the code from the internet, or who will type less on the keyboard will win. The opposite is true. Who will type more, who will code more will become better coder faster.
But it doesn’t apply if you are on the hackathon, then you probably want to have code that works fast.
The only way to learn from the tutorials is to follow along the way and type everything. Even if you just retyping what is already on the screen, by typing, you train your muscles how the coding in language or framework X looks like. You will have this knowledge at your fingertips next time when you will need it.
If I knew this rule when I started learning to code 15 years ago, I would have made much more progress in far less time.
Code completion is a great feature. It’s provided in every modern code editor natively or by an extension. Often it’s enabled by default, and as in Visual Studio Code, when we just start typing the code completion, suggestions will start to pop up on the screen. We will get hints about variable names, function names, classes, semantics, and everything else.
After years of programming, I found that I rarely need any help to remember semantic or build-in types. What I found useful is completing variable names, but only on demand. I don’t like it when I start typing a variable name, and the window shows up along. It’s very disruptive to the creative process. It’s much better to have these hints on-demand only when they are needed.
Code completion, not only disrupts our flow of thoughts but also interrupts the process when we train coding muscles the language semantic.
This problem is very similar to copy&paste. Instead of typing a code, something does this for us, so we don’t learn anything.
At some point, you have to know to code complete your code yourself. To know it, you have to know-how. Reading the script will not help.
There are plenty of advanced tutorials about connecting different technologies, optimizing performance, or do something cool using a new framework. These things can be inspiring, but most of the time, they are just hypes, very biased opinions, or copies from other websites.
What you can do instead is to spend some time to find the tutorial that is exactly what you are looking for. If you are very deliberate about what you are looking for, it’s a good chance you will find the perfect one.
If the tutorial you have found introduces new technologies, solves weird problems that you didn’t know exist, or looks unrelated in any way, skip it. Find different ones that match your expectations, and it’s structured in the way you can follow.
While learning new technology, it’s tempting to get “the complete” or “the ultimate tutorial about X”, not just “how to do X with Y”.
The problem with it is that this attitude makes us very easy to get overwhelmed by the amount of data we put on our plate. It’s normal that we want the ultimate, the complete guide, not just guide, but the truth is, when we try to get everything at once, we will get nothing.
On the other hand, when we look for the answer only for a particular problem, we can find the resource that answers our question without introducing unnecessary confusion.
I found the “complete”, or “ultimate” guides to be for advanced programmers who know other technologies and what to grasp how it would look like to do similar things in different technology.
Focus only on one thing at a time.
This tip relates to the illusion of productivity and information overload.
By the illusion of productivity, I mean a situation when we spend 80% of the time watching and reading about coding and 20% of the time or less on coding.
It’s very easy to get into the trap of an illusion that by consuming more content, we are learning something. It’s impossible to be better coder after watching X Youtube videos about programming. We can be better coders only by coding.
Information overload is when we don’t know what to do next because everyone is telling us that their X, Y or Z is the best way. So who should I trust? You should choose your own path that the most appeals to you and gives you the most market advantage.
If you are learning to React, don’t start with learning React+Redux or React+GraphQL. Learn how to do things first using just React. Without this knowledge, you will not know what problems React + GraphQL or Redux are solving, and when it makes sense to use it or when it will be overkill.
That’s it. The best methods to learn a programming language quickly. I found them very helpful through my programming journey, and I’m sure they will work well for you as well if you give them a fair chance.
I challenge you to use them every day for seven days, and you will notice a huge difference in the amount of information you will learn and your level of fluency in a programming language that you are after.
If you have your own best ways to learn, programming language leave them in the comments below.
If you found this post helpful, consider sharing it, so I will be motivated to publish more posts that will help you get the IT career you want.
And as always, stay focused!