How to actually learn programming?

How to actually learn programming? Chapter 6

This is the last chapter before we dive into programming. We will discuss how to actually learn programming. This chapter is important because most people approach learning programming in the wrong way.

The wrong way to learn programming

In most subjects, people can learn almost exclusively by studying. A textbook or an online course can be enough to become very knowledgeable in a particular topic. Some topics might also require you to gain practical experience where you watch somebody do something and try to do it yourself.

When learning how to program, this is a trap created by how we’ve learned previous subjects. We are so used to learning by studying something, that we don’t explore enough when learning how to program.

The right way to learn programming

The art in programming

Programming is somewhat similar to art. Okay, don’t ignore that sentence. As different as they are from each other, they have some odd similarities.

If you ask 10 painters to realistically paint the same landscape, you should see, given that they are all skilled enough, the same painting, at least from afar.

If you ask 10 software engineers to program an app that recommends you recipes based on ingredients you currently have, given that you give them the same database of recipes, you should have 10 apps that suggest the exact same recipes when given the same ingredients.

Going back to the painters, if we start looking closely, we will see differences between the paintings. Depending on which order they painted each object in the landscape, as well as which technique they used for colouring and shading, the details of each painting are different. This is what makes each artist unique. Even though all the paintings look the same, each is actually quite different.

You’re probably seeing where I’m going with this.

The same idea applies to programmers. If you look at the code of each of the 10 apps, you will be astonished by their differences. I would say that the differences between the source codes will be much bigger than the ones between the paintings.

Each software engineer has its own coding style, architectural preferences, organizational skills, and so on.

So what’s your style? What are your preferences?

How to find your style and preferences

You don’t need to actually have an answer for those questions. Your code and decisions will speak loud enough.

To actually learn programming and develop your style, you need to do what artists do: paint.

Everyone is surprised by how overwhelmed they are when they do their first big project or start their first job in software engineering. This is because this discipline requires you to do a lot of practice. It also is much easier to learn by practicing than by reading or listening.

When I say practicing, I don’t mean to copy someone’s code and try to learn what everything means. Sure, that can be a starting point, but you reach the maximum you can grow from doing that very quickly.

What I really mean by practicing is exploring. Whenever you learn something new in a particular programming language or library, try it out. I mean it, try it out. Once you’ve tried it out, try to modify it a bit. What happens if I give it another input? Will it crash if I change this? Interesting, it did crash. Why?

This exploration is absolutely crucial.

There are so many functions, so many libraries, so many aspects to a programming language. You can’t possibly learn them all, even less remember them. This is why you need to learn to be comfortable with exploration. Almost every project or job that you will have will put you in a mental state where you’re not quite sure how to do what you have to do. This is why you need to be used to exploring.

Exploration leads to unexpected results, which lead to critical thinking that forces you to understand more. To understand more, you need to search the Internet. To do that, you need to learn to formulate the right questions.

This is how you actually learn programming.

A note about learning it all

You might notice that almost every thing related to software engineering that you search on the Internet gives you results with extremely complicated terms.

Even I don’t understand them all. It’s normal.

You see, software engineering is a sort of onion. You start from the outside and learn it layer by layer. Towards the outside, the layers are superficial. You might get an idea of the concept, but you lack the background knowledge to fully understand it. As you learn more about different areas of software engineering, you’ll notice that your understanding will naturally get better.

The secret to actually learn programming is to continuously explore, and incrementally get better, one layer at a time.


Next: Chapter 7 – How to run your first program

If you want to start from the beginning of the series, go to chapter 0.

By Radu

Software Engineer and Computational Scientist graduated from the Technical University of Munich. Worked at Shopify, DRW and Ubisoft.

Leave a comment

Your email address will not be published.

Join my mailing list to get an email whenever a new chapter comes out!