Learning how to code: the first 3 steps

Learning how to code: the first 3 steps

In this post, I’m going to cover the concepts described in the book Ultralearning, and describe the first three principles:

  1. Metalearning,
  2. Focus, and
  3. Directness

This content is also available on my YouTube channel, and you can watch it here:

Ultralearning is a book written by Scott Yong, and in it, he presents several principles that we can apply to learn difficult topics, such as programming. If you wish to know more about these topics, I highly recommend you read the book.

image.png

I’m going to publish at least 5 more learning principles applied to programming in the upcoming posts, so you might want to subscribe to my newsletter to get a notification when they are out.

By now, you are probably wondering what is ultralearning. It’s basically a strategy for gaining skills and knowledge that is both self-directed and intense. It’s not passive or entertaining, as could be conveniently watching a tutorial whilst relaxing on the couch.

Instead, it’s systematic and iterative. It’s the difference between wishful thinking (“oh… it would be nice to learn how to program, so let’s watch some YouTube videos about it”) and massive action (“as I’m convinced that I want to learn to program, I’m going to devote myself to that task”).

When applying the ultralearning principles, we are going to be learning by doing what we want to learn (this concept is called “directness”) and starting way before we are ready. This means that we are going to start programming in a new language from day 1. We will want to get instant feedback (the code is throwing error messages or not compiling), and in this way, we will know what needs to be corrected and improved. A clear example of this is taking a programming course on freeCodeCamp (which I highly recommend): you’ll start coding from the beginning, even though you don’t know much about code.

But why would we want to invest all that effort in order to learn to code? Learning a skill in a deep way like this can provide a sense of purpose in life because developing skills is meaningful.

One of the main themes throughout the book is having a challenge: a project on which we are going to be working on during our learning process. In our case, this project could be building a specific website or app whilst we are learning how to code. This will help to learn with purpose.

Now, it’s important to keep in mind that if some principles or approaches are not working, we should reassess them and change what needs to be changed.

OK, enough introduction. Let’s start with the first principle: Metalearning.

Metalearning

Our learning journey will start by drawing a map of what learning programming looks like. Here we should be interested in knowing how programming knowledge is acquired and structured.

But you don’t have to start from scratch. I’ve built a Notion template summarising the core topics involved in web development, a list of roadmaps and topics that are related to programming. You can download that template and modify it as you wish, expanding it according to your needs.

image.png

Going back to the principle of Metalearning, do your best to answer these three questions: “why?”, “what?”, and “how?”.

“Why?”

In my first post in this series, I talked about the importance of having a clear why. What’s the motivation to learn to program? To help answer this question, you can talk to programmers already doing what you want to do and ask them what they like most (and least) about their jobs.

“What?”

Build a list of knowledge and abilities you need to acquire. You can start with the Notion template I shared with you and build on top of it. Create lists of the concepts (ideas that need to be understood but not memorised), facts (things that need to be memorised), and procedures (anything that needs to be practised, actions to be performed).

“How?”

To find out the how, you can use two methods:

Method 1: Benchmarking

Find references on how people are learning to code. Look at the curricula used in universities, tables of content in online courses and books, and roadmaps (like the ones included in the Notion template). Try to find good quality materials.

Method 2: Emphasise and exclude

Considering why you want to learn to program, double down on the areas that are in line with your why. For example, you could want to learn web development to build an app to track tasks during different progress stages, like in Kanban methodology, so double down on web technologies and avoid learning low-level programming languages, like C, or game engines.

Once you have a clear idea about how to answer the “why”, the “what” and the “how”, it’s time to focus.

Focus

I covered this concept in the second post of this series when I spoke about Deep Work, but this is such an important principle that’s also present in the book Ultralearning.

We need to develop the ability to concentrate. We need to allocate portions of time in which we are going to be learning and make it easy to do so.

The most common struggles to focus happen when we are starting (we procrastinate) and when we need to maintain our focus (we get distracted).

Procrastination

To help cope with procrastination you can establish deadlines to help us start working on what needs to be done. It’s important to be able to recognise that we are procrastinating. We need to remember that the thing that’s unpleasant about the task is just the impulse, the first few minutes of it. Once we start doing the task (studying programming), the unpleasant sensation decreases.

A technique that can help us here is the Pomodoro timer: set 25 minutes to do the task and allow yourself to rest for 5 minutes after that. Repeat as many times as necessary.

Another useful technique is to use small checkpoints: we can start studying and finish when we have read a page, a chapter, or a specific topic.

Distraction

The key here is to enter a state of flow (some people call this being “in the zone”). In this state, our mind will be completely absorbed by the task we are performing. We need to set the difficulty of the task to something that’s not too hard or too easy, so we can achieve flow effortlessly.

But… we shouldn’t worry too much if we don’t manage to achieve a flow state. What we can do instead is to focus on achieving short goals. Similarly to the small checkpoints described earlier, this will help us to maintain motivation.

We also need to maintain a balance between studying programming and resting. 50 minutes to an hour is enough for many learning tasks. After that, we can rest for a while, and repeat the cycle again. Using the Pomodoro timer could also be helpful here.

Additionally, we need to make sure our environment is free from distractions such as our phones, watching videos or playing games during our study sessions, distracting noises, or the lack of tools to study (like pencils, books, or a lamp).

We should engage with the task. We can do this by taking notes to explain difficult concepts, asking questions to the book or video course (writing them down to look for the answers later), and trying to identify where we can apply what we are learning.

Finally, if we get stuck, we should take a break and let our focus expand. We can go for a walk, grab a snack, or have a quick chat with someone. This will bring new ideas to our consciousness that we can use to unstuck ourselves.

Let’s now move on to the principle of Directness.

Directness

We will learn better by doing the thing we want to do. Do you want to build a website? Start building it and learn what you need along the way. Doing this will feel difficult, frustrating, and painful even, so we are going to want to avoid it. But what we should do is focus on solving the problems practically, instead of loading ourselves with theoretical concepts. As the author of the book says: “Doing the thing that you want to get good at is when much of the learning takes place.”

We can apply different tactics to learn by doing.

Tactic 1: Project-based learning

We can organise our learning around producing something. For example, we can decide that we want to build the website for a restaurant, and we can divide that project into smaller pieces: user login components, menu bars, database tables for orders, etc. Then we can learn what’s needed for each of those parts. If you don’t know what you need to learn for each of the parts, jump into a forum (like Reddit), Twitter or Discord channel, and ask around to more experienced developers.

Tactic 2: Immersive learning

Surround yourself with the environment in which programming is being practised. Join Meetup groups, participate in open-source projects, explore Discord channels, and take part in hackathons or coding challenges. The objective is to look for things to do that can push us to learn new things.

Tactic 3: the overkill approach

Decide to do something that’s way more complex than the topic you want to learn. For example, instead of just learning JavaScript to build an interactive website, decide that you are going to teach a course about JavaScript and that this course will be publicly available. By doing this, even if we fail to deliver the course as we envisioned, we are going to be learning far more than we initially imagined when we thought about just building our JavaScript app.

Closing thoughts

Now, coming to an end in this post, I want to remind you that there are still at least 5 more principles that I’ll cover in the coming posts, so you might want to subscribe to my newsletter to get a notification when they are published.

🤔 Which one of the covered principles resonated most with you? Leave your answer in the comments so we can discuss more about it.

Don’t forget to download the Notion template in which I cover resources for learning web development and, programming in general, so you can start getting your feet wet with the programming world.

Thanks for reading and see you next time! 👋


🗞️ NEWSLETTER - If you want to hear about my latest articles and interesting software development content, subscribe to my newsletter.

🐦 TWITTER - Follow me on Twitter.

Did you find this article valuable?

Support Damian Demasi's Blog by becoming a sponsor. Any amount is appreciated!