The Right Mindset for Learning Programming

Mindset for learning programming

Usually when someone starts learning programming, she or he is very excited about things that they will be able to create once they know how to write code.

People are motivated by the bright picture of the future success, where their mobile app has five million downloads, or their website is visited by tens of thousands of people every day. 

Or they might imagine themselves working in the terrific office of some computer industry giant, like Google or Microsoft, with a high salary and the most interesting projects in the world.

It’s warm outside (but not too hot, just the comfortable temperature), the sun is shining, the grass is green, the people around you are cheerful and friendly. You’re confident and serene, and the best is yet to come as this is just a beginning of your great path as a prominent programmer.

Such a dream can motivate you to tackle learning programming, and it will fuel your energy during your first steps in this new and interesting adventure.

Sometimes the weather is bad

Bad weather

But in real life the sun is not always shining, the grass withers, and sometimes you’ve got to wear a jacket because it’s too cold for a t-shirt. The programming itself can be even more frustrating than the weather, especially when you just learn it.

The distance between that future success and the moment you decided to learn to code is quite long, and during your learning process the gray days will occur more often than you could expect.

There might even be situations when you want to ditch the idea of learning programming, because it seems too difficult, too big, or too time-consuming. Such moments can happen at any time, whether it’s the first day or the fifth month of your programming education. There’s no such thing as a designated single tough period after which everything becomes very easy and inspiring, like terms like “the learning curve” may suggest.

So, if you do want to get to the point when you can make your goal of having learned programming come true, relying only on the momentum given by the initial positive emotional spike is not enough.

You should embrace more down-to-earth mindset with the “roll up your sleeves” attitude. It will help you avoid disappointment and move forward, even when it feels like you hit a brick wall, and there’s no way to overcome this obstacle.

I am not smart enough for programming

Brick wall

Sometimes the brick wall you hit while learning programming looks so thick and high that the only thing you can think of is that you’re just not capable enough to deal with it.

This might happen when you try to understand some complicated programming concept or algorithm, or when you’ve got to solve a programming task, but have no idea how to approach it.

“I’m not smart enough for programming” — that’s what I would think in such moments when I just started to learn to code. In fact, usually I didn’t have this thought sounding clearly in my head, but it rather appeared somewhere behind my main thinking process, silently lowering my morale as I unsuccessfully tried to jump over this brick wall over and over again. And when your morale is low, even the tiniest stone might feel like a huge rock.

When you’re overwhelmed by some problem, it often seems much bigger and more difficult than it really is. This is because your focus gets so narrow that you simply cannot see anything but this particular situation.

It’s time to play your favorite video game

Play video games

In such cases the first thing you should do is taking a break. It’s time to let your brain recharge and, which is even more important, to think over what you were thinking about without your conscious efforts.

Let you brain digest everything you gave to it and wait until it asks for more “food” (it’s when you feel that you’re fresh enough to return to your task), or until it gives you that “Aha!” moment when the brick wall miraculously disappears, and you can see clearly what and how you should do to move forward.

This is when listening to music, watching movies, or playing video games are not forms of procrastination, but rather useful activities. They can capture your attention, and therefore help you completely change your focus and not to disturb your brain with endless attempts to solve the problem you have, allowing it to do everything on its own, “under the hood”, without your guidance. And that’s exactly what you need.

Stay calm and keep going

Stay calm and keep going

It’s also important to remember that moments of low morale are completely normal, they have nothing to do with your abilities.

While learning programming, you’re exploring a terrain that is completely new to you. You don’t know what to expect next, and such uncertainty is always ready to feed your imagination with the negative scenarios as you meet something that seems “unfriendly”, like a seemingly convoluted piece of code you’re supposed to understand while reading a programming book or watching a video tutorial.

But usually everything turns out to be much simpler than our confused mind offers us to expect. Always stay calm and keep going.

Use only the best programming books and tutorials

Anyway, programming is not a rocket science — at least, if you’re not a software developer in the SpaceX team. Even the most complicated programming concepts, that are often used as examples of how difficult programming can be, like pointers in C or closures in JavaScript, are actually pretty simple and straightforward if they are explained properly, without unnecessary complications.

That’s why it’s very important to use the best books and video tutorials. Without them your education might be much harder and take much more time than it could.

Even more: bad learning materials can give you a wrong impression of what programming is and undermine your confidence in your ability to learn it.

My first attempt to learn programming by learning the C programming language when I was still in high school failed mostly because I tried to learn it with probably the most awful programming book ever written.

Having no prior experience in programming, after reading that book I was sure that programming in C and programming in general were apparently unachievable for me and I had to be a genius to understand at the least a third of what I’d read.

Later I found out that C was one of the simplest programming languages, and it was a joy to learn with quality tutorials and books. Unfortunately, it took me several years to gain courage to make a second attempt to learn programming. So, I paid quite a high price for my poor book choice.

Therefore, when you feel that something in programming is too difficult, usually it means that you’re using bad learning materials, or that you’re simply tired and need some rest.

Or, maybe, you’re just not experienced enough to see the solution to your problem right away and simply have to spend some additional time searching for it.

Programming is a craft

Craft

Disclaimer: some programmers prefer to say that programming is an art, not a craft. But any craft can be an art if you’re an experienced and passionate professional. In order to get to such a point you’ve got to become extremely good at programming and, accordingly, very experienced at it.

So, basically, “an art” is the next step after “a craft”, and there’s no way to skip the first step. Since we’re talking about learning programming, the second step is completely irrelevant here.

Also, this second step is rather optional. Not everyone is ready to spend time creating a code so beautiful that other programmers would admit that it’s a masterpiece. Most developers are fine with simply writing decent, efficient code that works, and wouldn’t spend ten times more time just to make it impeccably elegant and worthy to be printed out and exposed in the Louvre.

Programming is not a magic or something incomprehensible, it’s just a craft. As any craft, it requires skills and experience. All you have to do to acquire them is to keep doing what you do (learning and practicing), regardless of whether it’s easy or not quite. Even if something in programming looks difficult at first, it will look simpler as you try to grasp it.

Don’t comprehend what you read in the book? Try rereading it again and again, slowly and thoughtfully. Often it helps. Doesn’t work? Try some other book or tutorial, or several of them.

Don’t know how to write code you need to complete the exercise? Start writing it at least somehow, even if everything you write seems awkwardly wrong, and improve it along the way. Try, test, improve. Nobody can learn programming without writing bad code at first.

In any craft, experience is the key, so don’t waste time and start gaining it. See also the article Logic and Structure of Your Code Will Get Better with Time.

Ignore all discouraging thoughts and doubts. Do your best and the result will come. It’s the matter of time and efforts. There’s really no other crucial elements in this equation.

The more efforts and time you put into your programming education, the more experienced and skillful you become. The more experienced and skillful you become, the more you can do as a programmer.

Even hours of fruitless attempts to understand or to do something actually are not that fruitless. They bring you closer to the moment when the problem is solved.

Good news for 99% of people trying to learn programming

Probably, 99% of all people trying to learn programming do it to be able to create quite regular websites, web applications, or mobile apps. None of these categories of projects requires extraordinary abilities or something that cannot be obtained if you’re persistent and calm.

Even those 1% of more difficult projects are usually more difficult not because of some special programming difficulties, but because they require good understanding of math or other similarly complicated areas of knowledge, which have nothing to do with programming per se.

And, in case you’re wondering, — no, you needn’t be very good at math for programming, unless you plan on working on projects which specifically depend on math, like neural networks. For example, it’s about zero math involved into the process of creation of a typical website.

Take an umbrella

Umbrella

I guess, this article might seem kind of confusing so far. It looks like I’m saying that programming is not so difficult, but at the same time I’m talking about all of those moments when it requires significant efforts and perseverance.

Actually, there’s no contradiction here, since the key word is “moments”. Generally, learning programming with good learning materials is quite a smooth and even pleasurable process. But you’ve go to be ready for those gray days when not everything goes perfectly.

It’s like taking an umbrella when the weather forecast predicts occasional rain: it doesn’t mean that you should open it the moment you leave the house if the sky is clear, but it’s good to have it in your bag.