topic: How to become a ninja

The first principle is that you must not fool yourself, and you are the easiest person to fool - Richard Feynman

Your goal during this course should be to master the material you come across. Not just “complete” stuff. You need to get to a point where the code is a part of you. Cheesy as it might sound, you can do it.

The illusion of competence

This is the biggest trap that new coders fall into. It can and must be avoided.

Have you ever been in a situation where someone explained something to you and you felt like you got it but didn’t? It could have been a friend, a teacher, or a youtube video. You nodded along and everything felt pretty easy.

Then when you tried to apply the lessons on your own you felt clueless?

That’s the illusion of competence. It’s those times when you think you understand but you don’t.

People fall into this trap all the time. You need to be able to:

  1. Detect that you have fallen into this trap
  2. Obtain true competence

Watching videos and listening to explanations is not enough

Imagine you are learning to be a carpenter. So you watch some youtube videos about carpentry. You memorise the uses of different screws and different kinds of wood. You talk about carpentry with your peers and you sound pretty knowledgeable. You’ve spent a lot of time absorbing content.

One day you get a gig - you need to build a simple little bookshelf. You do your best but the bookshelf you build is skew and flimsy, it sways in the slightest breeze. Because you never actually practised your craft.

Watching other people get things right doesn’t make you a pro. Videos and explanations are useful but if you want to master the material you need to practise it.

Remember that coding is a craft, and craftsmanship takes a lot of practice.

Spotting illusions of competence, so you can gain true competence

You need to figure out how to test your own knowledge. If you give yourself an actual test and you fail that test then it’s a good thing.

A failure is an opportunity to upgrade your understanding.

For example, let’s say you are trying to understand how “while loops” work.

First, you would need a basic introduction - Read some documentation or watch a video. Get some basic familiarity.

Next up you want to master the material.

  1. Write some simple code. As simple as possible. Write the “hello world” of while loops. Add some prints, console.logs or printlns in your code (depending on what language you are writing in).
  2. Guess what your code will print to the terminal when you run it. What theory do you have about how the code runs?
  3. Run the code. Was your guess right or wrong?

Allow yourself to be wrong. Don’t kid yourself

If your guess was right then that’s nice. Add some complications to your code. Eg: what if you put a while loop inside another while loop? What if you put it in a function? What if you call a function from inside a while loop? How about break and continue? Keep adding little pieces of complexity and keep taking guesses and checking your answers, keep testing yourself.

At some point, you are likely to get an answer wrong. This is great! That means you have a chance to learn something new. You have an opportunity to upgrade your understanding!

Try to understand what happened just by looking at the code if you can. If that doesn’t work then try to find what piece of code is confusing and zoom into that. Try to write a tiny piece of code that isolates the thing you are confused about.

For example, let’s say you have a continue statement inside a while loop, inside another while loop, inside a function. And you aren’t able to predict the behaviour of the code. Write a new piece of code that just has a continue inside a while loop and make sure that makes sense. Then slowly add more complexity piece by piece.

  • When you are getting the answers right: Add complexity to your code
  • When you are getting the answers wrong: Strip out complexity, try to zoom into the thing you are not understanding

Once you think you understand something, test yourself again in a different way. Restructure your code so it demonstrates the same concept. Test yourself, don’t kid yourself

Repetition repetition repetition

There is a science to learning. If you repeat something over time, it sticks. If you force yourself to recall a concept then that’s very powerful too.

If you spend some time doing deep practise on a specific concept and figure a bunch of things out then that’s awesome. You can make the lessons stick by:

  • waiting for a few days then practising the same concepts again
  • combining the concepts with other concepts you have already mastered
  • applying the concepts in your projects

RAW CONTENT URL