The Easy Way To Learn To Code

Three steps to gain a new superpower.

Per Harald Borgen
Published in
6 min readJan 9, 2016

--

The last couple of years I’ve spent a lot of time teaching myself web development and machine learning.

While the subjects have differed a lot — from Javascript, Node and React to Python, Scikit Learn and neural networks — my approach to learning has stayed the same.

And even though it’s just a simple (almost banal) three step technique, it has been critical in helping me to go from amateur to professional web developer in 5 months.

So I’ve decided to write a little bit about it, in case other people will find it useful.

I’m writing this article as if I was able to send it to the 2012 version of myself, as I wish I had a clearer view of this as I started out.

Step 1: Use it before you know it

The first step you need to take in order to learn a new technology is to simply start using it before you understand it, which is a much better approach than trying to understand it first.

However, as you don’t know anything about the subject yet, you can’t do this on your own.

Justin Mitchel’s Django course is a perfect ‘do before you understand’ tutorial.

What you need is a video tutorial where someone leads you through building a small dummy product. Look for tutorials where the creator goes through every single line of code, including the setup, and watch it while coding along. Make sure you’re able to run the project as well, at every step on the way.

Expect around 10 minutes of video to take an hour to get through.

Also, a good amateur tutor at YouTube tend to work better than a MOOC, which might be too thorough at this point.

The opposite of this step would be to read theory about the subject. This has never worked for me, as I get too bored and find even beginners books to be too detailed. So I categorically stay away from books and documentation when starting out.

When going through your chosen video tutorial, you won’t always understand what you’re doing, which can be unpleasant. Try not to worry too much about this. If you don’t understand something, write it down and save it for step 2.

The whole point of this step is to follow through the tutorial regardless of your confusions and lack of understanding.

You see, the benefits of starting this way outstrip the downsides:

1. Building from day one

First of all, you actually create stuff from day one, which is more rewarding than reading theory. And the more you enjoy something, the easier it is to stick with it.

My first ever Node.js server, which I have referred back to countless times.

2. Gives you sample code

In addition, it gives you sample code to refer back to in the later stages of the learning process, which is highly useful.

I always go back to the sample code multiple time to refresh my memory; each time with improved insight into the subject.

3. Discover your unknown unknowns

I’ve also found that this is the quickest way to discover in which areas you’ll need to focus your efforts on.

You see, before you start, you don’t even know what you don’t know, so you have no way of knowing out which parts of the technology you’re going to struggle with and thus need extra attention. You want to uncover this info as soon as possible, as they are roadblocks you need to get out of the way.

Here are the courses that kickstarted my learning process in various subjects:

Step 2: Address your struggles

After going through one or more tutorials in step 1, you’ll have a tiny bit of insight into the subject — a rough idea of how it works. However you’re most likely very confused. Now is the time to find sources that address those confusions.

If you’re learning React.js, this is probably where you’ll investigate properly what the difference between state and props is (which you can figure out here by the way).

Here, I don’t really have any specific format to recommend. You basically need to find whatever sources that’ll works for the situation, whether it’s books, the official documentation, Stack Overflow or something else.

If it’s a really tough subject, you should find multiple sources which help you understand it correctly.

Alternatively, you might realise that you need to take a step back and improve some fundamental skills, as they weren’t strong enough yet.

Last time this happened to me was when I taught myself how to code neural networks. After taking a course at Coursera, I realized I needed to be able to understand logistic regression before I could understand entire neural nets. So I went back, did a logistic regression from scratch, and then continued with the neural nets afterwards. This time with much more ease.

Step 3: Build stuff

While step 1 and 2 are absolutely critical, they’re actually just stepping stones to reach this one, as the reason to why you want to learn a new technology is so you can use it to build stuff, which is what you’ll do now.

As soon as you feel capable of creating something on your own, you should go all in with this tactic.

Why? Because this is where the real learning actually happens.

You don’t really learn anything about the technology until you start building stuff with it.

You can cheat yourself through step 1 or 2, but you can’t cheat yourself through this one (given that you’re building it yourself, and not just copy pasting code).

A good idea is to try and build something you’re passionate about. Learning HTML & CSS and happen to love wine? Then code up prototype for a wine tasting website! Or maybe you’re a doctor trying to learn ML? Find a health dataset to play around with!

Here are some of the first projects I’ve built. I’m not proud of any of them, but I learned a hell of a lot.

My first Ajax project, which I built in early 2015 with my team at Founders&Coders.

Finally, I’d like to point out that these three steps might blend into each other, and probably wont happen as linearly as it might seem in this article.

While I always start out with step 1 and end up with step 3, I tend to jump back and forth when I’m in the middle of the learning process.

The point is just that they’re equally important ingredients in learning new skills.

Good luck!

PS: remember to press the heart button if you liked the article :)

Thanks for reading! My name is Per, I’m the co-founder of the interactive code-learning platform Scrimba, and I love helping people learn new skills.

If you’d like to follow my path, and become a React developer yourself, then you can enrol in our Learn React For Free course, as it’ll teach you the basics and get you started with the most important concepts. Click the image to get to the course👇

The course if 4 hours long and contains a ton of interactive exercises.

--

--

Per Harald Borgen

Co-founder of Scrimba, the next-generation coding school.