How to learn a new programming language

child learning

In this article I’m trying to synthesize my tried-and-tested approach to learning a new programming language, or a new framework. This is not a zero to hero guide to programming. I will be assuming that you have experience with at least one programming language. There is an easy way of going from “I know Java pretty well” to “I know programming pretty well” 

Don’t be afraid to jump right in

Programming is a skill you learn by doing. A simple “Hello world!” can go a long way. Start small and build up from there. Build on previous experience. Trust me on this one. It gets easier with time. Once you’ve done this a couple of times, you will find that programming are more alike than different. Knowledge is transferable, and programming knowledge is almost always transferable. The syntax may differ, but the underlying concepts remain the same. 

Take your time

Switching to a new language requires time, especially if you plan to do it right. This tends to work a lot better when you don’t have a deadline coming up. Pay attention to what you are learning, especially when you are starting out. Usually, the learning curve is quite steep and you have to learn a lot in a short time. Don’t rush to finish the project you are working on. Read about the problems you run into. If you understand the issue now, you will know better than to run into it in the future. On top of that, you tend to run into the same issues many times. If you take the time now to understand, you will save yourself a lot of time in the future. 

Problems are also a way for you to find the truly important concepts. You will naturally run into the most important concept early and often. So, learn the fundamentals as you run into them. 

Stay away from rabbit holes

Be careful with the point above. With computers, things can get incredibly complicated once you start looking under the hood. You can get lost in the details. There are so many moving things that need to work together to get to that simple “Hello world!”. Try to understand them all at once, and you will never get to the “Hello world!” stage. Instead, try to build some abstractions. Learn what you need, just enough to use the concepts. Do some things, break some things, learn from your mistakes and repeat. 

You will make mistakes 

Same as almost everything else, learning is a process that improves over time. Code is not any different. Be ready to make mistakes. Take the necessary precautions not to cause too much trouble. Run the unit tests. Manually test your code locally. Doing that will dramatically decrease your chances you are going to break anything. 

Additionally, I found that it helps to have someone that has your back. Try to get someone who is more familiar with the thing you’re trying to learn to do your code reviews

`

Build your mental model 

Every programming language has a core idea that is built on. And around that core idea the language expands, with conditionals, and loops and classes and all the fun bits and pieces. Be mindful when you are learning and you will be able to build a mental model of the axioms the programming language is built on. This will help you when googling around whenever you run into any problems. I know this is a bit abstract, but trust me, it will make sense once you start on this endeavor.

Further reading: 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top