There are two distinct phases to learning a new language:
- Find out what’s similar to what you already know
- Learn the unique or challenging parts of the new language
People tend to focus on syntax or functions. While these areas are important, I like to look at things differently. When you learn a new language to speak or write, you tend to memorize vocabulary and grammar.
Instead, a more effective strategy is to pattern match. Look for ways that the new language mirrors the one you already know. Find a cheatsheet for the language and try writing a small program.
Here are the areas I recommend you dig into:
- Understand methods, variables, and how mutation works (or doesn’t!)
- Understand classes and instantiation
- Understand if the language stylistically pushes towards Object Oriented Programming or Functional Programming
- Google the hard parts of the language – find out where people struggle
The reason I err towards these areas is that you’ll get the most bang for your time-oriented buck! You want to be writing code in this new language ASAP. Focusing on the nouns and verbs (variables and methods) will get you there fast.
It’s okay if you don’t feel comfortable yet. Making a simple program or two is a fantastic start. After this, look into instantiation. You’ll learn a lot about a language’s structure through the way it handles classes. If it’s a pure, functional language this is the time you can go deep into function composition.
The Best Way To Learn Coding In 2 Phases
Let’s break down the previous information into two separate phases.
1. Build simple things with a cheat sheet in hand
I recommend building several small apps. Have them interact with each other. Try rendering things, try using other libraries. Play around. Make an API request.
This phase is all about having fun and learning syntax. When you’re in this phase the goal is to test assumptions. Learn the methods of interacting with data. Remember, the focus is always data-centric.
Anytime you’re digging in deep to something new, take notes. If you learn about a new method write it down. Use paper, it’ll sink deeper into your brain. Try using the things you learned the previous day or session into the current session.
2. Discover the tricky parts
Every language does something you haven’t seen before. This part can be frustrating. When you hear a developer complain about a language, it’s often these parts. They don’t understand why a language would commit such an atrocity! Sometimes this is valid criticism. Often it’s a bias toward how they first learned.
Languages often evolve over time as well. This can mean that syntax changes or core functionality shifts. Be aware of this.
A great example is the difference between Python 2 and Python 3. For newbies, understanding which Python to learn and the differences is extra work.
Whenever you’re beginning a new language spend time to search for the hard parts of the language. Look at the most popular questions about the language on Stack Overflow. Find blog posts and YouTube videos to see the most common areas of struggle.
You’ll want to pay specific attention to these after you feel comfortable with the first phase of syntax.
I recommend watching YouTube videos or reading blog posts on each of these subjects. My two favorite YouTube resources for these areas are from:
- Tyler McGinness – Check out the Advanced JS section
- Fun Fun Function – Check out the Playlists per topic
The areas I recommend you spend time with are:
- Semi-colon syntax (you can…or can’t use it!)
- Curly Braces and how JS handles Scope
- Const & Let in ES6
- ES6 Function Syntax
- Destructuring Objects and Arrays
- Context and This keyword
- Classes and the new keyword
This will set you up for success in JS. If you want to learn React or Node, understanding these topics will make it relatively easy. You’ll have the foundation you need in order to be successful.
The paid/free courses I recommend are from Wes Bos (these are affiliate links, I love his courses though, I also recommend Tyler M’s, but think Wes’ are more beginner friendly):
As always, let me know if there are any areas you struggle with or any languages you found particularly challenging to learn!