3 concrete steps to learning a programming language

An environment where you can focus

Let’s be honest: learning a new programming language takes time and effort. Nothing is impossible, but don’t expect programming to beeasy.

In general, learning something new means you need to focus on thequalityof your learning. If you try to push yourself too much, you won’t learn anything. If you watch some funny YouTube videos while learning, you won’t learn much either.

Here’s what you’ll need:

I have a whole article which is more focused onlearning in general, if you’re interested.

The first step: Learning the basics of your programming language

The basics include:

The first is unique per programming language, the second can be applied to many of them.

Don’t be afraid by the fundamentals if you’re a beginner. You’ll get them along the way.

Finding the best resources

To learn the syntax of a new language, the best method is to take a book and copy the code given as examples. It sounds dumb but it’s the most effective to me.

Reading a book is not enough. If you want to learn something new, you need to learnactively. Reading is too passive.

If your book is good enough, it’ll explain the basics of the languagesyntax, some generalfundamentalswith code snippets as examples. Copy these examples in your code editor and execute them. Play with them.

Don’t try to understand everything in detail while reading the book, especially if you’re a beginner. You can go back to it later. For now, the goal is to have a good idea about how the language works.

There are a lot of books out there which provide code with explanation. I personally really like the wholelearn code the hard waycollection. Don’t be afraid by “hard” in the title: it indicates that it’ll teach you properly what you need to know, without shortcuts. This is what we want.

For the folks who already have some experience, these books can be a bit boring . However, it can still teach you some fundamentals you didn’t know beforehand, or refresh some forgotten memories.

You might ask yourself: why a book? Why not follow some articles on internet? Or watch some Youtube video? The quality of the content on the internet can be very random. You don’t want to learn bad habits; it’s easy to learn inaccurate concepts, increasing your confusion. Learning is easier than unlearning.

A book, on the other hand, can be advised by the community of the language you want to learn. You need to be sure you can trust its teaching: you should ask around in forumsanddiscussion groups what would be the best book. Positive book reviews on a website likegoodreadscan be a good indicator as well.

You want to avoid misconceptions, “knowing” something which is only partially true or absolutely wrong.

Now, I have a little quiz for you. What’s the best way to learn from these very objective propositions?

I have no partnership with RedBull and human attention is very short. Learning two hours straight is already challenging. That’s why the first path will make you wise, rich, and glorious. You’ll learn tremendously faster that way.

Take your time, be patient, and you’ll get there. Don’t forget: the most difficult part is the beginning. If you have some tendencies to procrastinate, like everybody, try to open your book only for 10 minutes. Close it if after these 10 minutes you still don’t want to learn.

You might be surprised how far this simple technique can lead you.

Assessing your knowledge

Come back to the code you wrote from time to time, without the book this time. Ask yourself:

This is meant for you torememberthe fundamentals and the syntax of your new programming language. Trying to remember what you learned the last time will reinforce your memory.

If you’re really motivated, you can even try to find other solutions to get the same output of your code snippets, for example.

When you write your code, don’t use too many comments! Try to understand the code as it is. It will, most of the time, give you enough information for you to find what was the purpose of it. On top, when you’ll be a rich and famous developer working for the NASA, your colleagues won’t comment every single line of code they will write (I hope). They will expect you to understand the code.

If you have no idea what you’ve written, that’s perfectly fine. Even if Yoda himself said the contrary, trying is the most important.

After your tries to remember what you learned the previous learning sessions, open your book and let these “aha! I remember now!” thoughts of victory blossom in your wonderful soul.

You can test yourself every week or every two days, it doesn’t matter. Simply have a study plan:

You need to find your own pace: not too slow or your motivation will suffer, not too fast or you’ll feel exhausted. Find a balance to keep your interest in your new programming language. That’s the most important!

The second step: Beginning a side project

When you’re half-way in your book, you can begin the second step of this plan to rule the universe: beginning a side project.

Actually, you can begin it whenever you’re able to use the syntax of your new programming language without too many difficulties. Just try and adjust: if it’s too hard to build something, you might not be ready yet.

If you’re totally bored with your book, if only opening it feels like a torture, if you have the despite every page of it, it might be a subtle indicator that you need something a bit more concrete and creative. Hence the side project!

What the benefit of a side project, you might ask? Learning the syntax and the fundamentals of a programming language is essential, but definitely not enough. Programming is about problem solving, and you need to be able to solve all kinds of problem with your new language.

What side projects can you build?

I already wrote a series of articles about side projects:

If you need to remember only one thing from these articles: build somethingsmall! You don’t want to build the best application of the year and become rich, famous and unhappy. You want to learn a new language.

Your side project could be anything from a todo list app, a pomodoro app or a calculator. Even better: if you have somepersonal ideaswhich could be a fun small project, please proceed. It’s even better than picking random ideas on The Internet.

If you want to build something bigger afterward, feel free to do so. Go step by step, begin by something little, and build bigger and higher, if that’s what you want.

The best way to work on a side project

You need to knowexactlywhat functionalities your side project will have. I will never say it enough: as few as possible, for the beginning, is the best. You can still add more on top later.

Then, follow these steps:

This is called an iterative process. Even if you’re wrong at the beginning, you’ll fix your mistakes and come closer to your goals after each iteration. Consider the first iteration as an imperfect draft.

Analysis paralysiscan be your biggest enemy as a developer: don’t over think. Code something. Don’t try to find the perfection in these wonderful lines of code. Perfection don’t exist, and it’s ugly anyway.

Don’t spend an awful amount of time searching the best tools either. I would suggest not using any framework for your first side project. If you need some libraries, take the first one advised by the community (or first ranked by Google) and go for it. Even better: code it yourself if it’s not too long (or too boring).

If you feel comfortable, you should try to write some automated tests as well. It’s important to know how the language handle testing. Consider it as a bonus.

The third step: Show the world your new talents