Programming knowledge can lead to some great jobs and that’s got more and more people scrambling to learn how to code. Maybe you’ve decided to pursue programming, whether for a career or just as a hobby. Great! But maybe you’re starting to feel overwhelmed. Not so great.
We’ve written before on choosing a programming language and we’ve compiled places where you can learn programming, but there isn’t much about how to approach the learning process in a way that keeps you from wanting to tear your hair out.
I’ve gone through my own share of coding-related frustrations and I hope some of this advice can help to ease your journey as much as possible.
It’s Not Just You: Programming Is Hard
As with most things, you must have the right mindset before learning how to code. Sure, you could make do with a poor attitude and it would still possible to learn stuff here and there, but the process will take longer and you’ll hate it the whole way through.
Programming is hard, there’s no doubt about that. Even the smartest programmers are stumped on a regular basis by bugs and errors in their own code. It might feel as if everyone else knows what they’re doing and you’re the only one who’s struggling, but that’s nowhere near the truth.
Take solace in the fact that everyone has trouble with programming at the start. You are not alone in your struggle. Not only is it normal to be confused and frustrated, but even expected. There’s nothing wrong with you if you find it difficult, so don’t feel discouraged or stressed. It takes time.
And that’s the mindset you need to have if you want to learn programming: it’s going to take a long time. We’re talking on the scale of years. The quickest way to be stressed as a programmer-in-training is to expect instant understanding, instant improvement, and instant results. We’ll see in a later section that it just doesn’t work that way.
Make peace with the fact that the journey before you will be long and arduous.
Take It One Step At A Time
Like spoken languages, programming languages are vast topics of study that must be learned from the ground up. Consider the process of learning a foreign language like Spanish, German, or Korean.
Start with the fundamentals. The most basic units of any language begin with letters, then words, then sentences. For programming, you have to start with keywords, syntax, and overall program flow.
Don’t worry about advanced material until you first master the basics. It wouldn’t make sense to try writing poetry before you understood the basic rules of grammar, would it? Postpone the advanced stuff until you truly have a grasp on the foundations.
In other words, don’t rush it. Focus on one topic at a time before moving onto the next. By limiting your scope of study like this, you can keep yourself from being overwhelmed. It’s one of the rules of setting effective goals: to eat an elephant, take your bites one by one.
Sudden Epiphanies: It Has To Click
Over the past year and a half, I’ve been studying the Unity game engine, which relies on an entity-component paradigm rather than the object-oriented paradigm that I learned growing up. It was immensely frustrating for the first twelve months because I just couldn’t understand it.
Until one day, I sat down at my computer and it all clicked. The material that had caused me to bang my head against the wall for nearly a year? It all finally made sense. There was no particular tutorial or lecture that opened my eyes. Nope. It was literally an epiphany.
The lesson is this: not everything is going to make immediate sense. It has nothing to do with your intelligence or aptitude. Programming is one of those things that you either understand or you don’t and it can take a while for that switch to flip.
It will happen eventually as long as you don’t give up. Persistence is an important attribute for any kind of programmer. Scrape a stone wall with a metal spoon long enough and you’ll eventually make it to the other side. Don’t be discouraged along the way.
Find As Many Resources As You Can
Suppose someone showed you a photograph of a statue. It might provide enough of an image for you to get an adequate sense of the statue, but you wouldn’t get the whole picture. A zoomed-out photo would lose intricate details while a zoomed-in photo would lose a sense of perspective.
However, with each additional photograph, you can really start to see the fullness of the statue in texture, in size, in detail, from front-to-back, side-to-side, and top-to-bottom.
With programming, one explanation is often not enough to truly grasp a particular topic. That’s why it’s important that you exhaust as many resources as you can in terms of documentation, tutorials, videos, lectures, etc. Each additional resource can provide additional insight.
For example, you may not receive much benefit from Tutorial A and it leaves you feeling lost. Tutorial B also confuses you, though it might clarify some of the subject matter. But then you read Tutorial C which is presented in a way that brings everything from Tutorials A and B together. Finally, the topic makes sense.
It also helps to find a mentor or coding buddy. Self-taught learning is great, but it’s better to have someone to whom you can ask questions and receive an instant response. This can turn three days of frustration into a simple five-minute conversation.
Practice and Play Around – Be Bold!
Last word of advice: programming is more practical than theoretical. Not that there aren’t any theoretical aspects (because there are) and not that programming isn’t a cerebral exercise (because it is), but no amount of study will matter if you never put it into practice.
I can’t tell you how many times I’ve spent countless hours reading documentation on a code library that I couldn’t understand, yet within an hour of launching a terminal and playing around with the code itself, it all became clear.
Don’t be afraid to practice by playing around. Launch a blank project and start messing with the code. Fiddle with it, break it, and repair it. None of this is wasted time. You may not be writing code that ends up in a final product somewhere, but you’ll end up saving yourself a lot of learning time down the road.
Programming is not something that can be learned passively. You have to get your hands dirty. Instead of fearing bugs and errors, embrace them. Learn how to fix them or work around them. Practice builds experience, experience builds confidence, and confidence keeps you from feeling overwhelmed or stressed.
For you beginner coders out there, I hope some of this helps. Feel free to ask questions down below. Experts, share your advice with us in the comments! How do you stay stress-free while learning how to program?