*This post was first published in Break In, a newsletter for people learning how to code, looking for their first dev jobs, or working hard as junior devs. Break In shares real experiences and advice from real devs who have been through it before. Subscribe to get our bi-monthly newsletter, start asking questions or even contribute your own experiences.
Learning X programming language is easy--you can follow along with a tutorial, read some documentation and understand the basics without too much trouble. But what happens when the training wheels come off? When the tutorial you were following is over and you're left to build your own projects and face your own challenges?
For this reason, learning how to code is about so much more than learning a specific programming language. You need to learn how to stare down the toughest challenges without flinching; you need to learn how to seek out problems to solve instead of shying away from them; you need to develop a set of tools that you can use to solve any problem, not just the specific problem laid out for you in a tutorial or lesson plan.
How can you gain these skills?
- Take responsibility for your own learning
- Focus on problem solving skills
- Don't isolate yourself
- Brag about it
One of the most common things I hear beginners say when struggling with their code is: "It doesn't work."
That one little statement really reveals the perspective that you need to fight against. It implies that your code is the thing that has the problem, not you. Well, I have some bad news for you: you wrote that code.
Instead of saying "It doesn't work", try "I didn't do it right." This slight shift in thinking will open you up to looking for your own mistake. You can let go of the frustration that you've misdirected at the abstract concept of "your code". This frees you up focus on identifying what you did wrong, or what it is that you don't understand.
What happens when you're following along with a lesson, tutorial, vidoe or in-person class and the material provided to you doesn't sufficiently cover a certain topic? What if you're given an assignment but you're missing some of the understanding you need to complete it? Or (heaven forbid) what if someone like a teacher or tutorial author gives you incorrect information??
I've seen students deal with this problem, and I've experienced it myslef. When this happens, its easy to feel like you've been given the short end of the stick. You signed up for this class/bought this video course/invested time in reading this article, so it should tell you exaclty what to do, right?
As a professional developer, almost no one will tell you exactly what to do, ever. So, the frustrating experience of missing some information is actually an opportunity for you to learn a critical skill: how to do something that you have no idea how to do.
Accept the premise that you won't always be handed exactly what you need to solve a problem. Let go of the resentment that situations like this naturally cause. This will allow you to rise to this challenge and maybe even enjoy it.
Instead of wasting time being frustrated or angry that you don't know how to solve the given problem based on the material in front of you, branch out to find new resources. Google the topic your struggling with, ask questions online or to other people you are learning with. Experiment with different solutions just to see what happens.
In the end, you'll learn way more than how to solve problem X, you'll learn how to tackle any problem.
This brings us to our next piece of advice. Always remember that you are not alone in learning (and struggling to learn) to code!
Programmers are naturally curious and helpful people and if you look around, you'll find robust communities of beginner programmers, along with more advanced developers who just want to help.
So, when you're stuck trying to squash a nasty bug in your code, solve a tricky challenge, or just working hard to master a difficult concept, remember you have so many avenues for help and support open to you. You can:
- Google it! Developers at all skill-levels Google things every day. This is a real and valuable programming skill and you shouldn't shy away from it.
- Ask a question on a forum like Stack Overflow. Stack Overflow exists because people want to help you solve your problem. Use it!
- Go to a meetup. There are lots of excellent meetups geared to beginner programmers, as well as meetups that function as study groups with people volunteering to answer questions and help out. Get out there and meet some other programmers!
- Ask a friend or classmate. If you're taking an online or in-person class, talk to the other humans learning to code with you! They almost certainly don't bite and are very likely to be struggling with questions of their own too.
If you've ever struggled with a difficult concept, spent hours trying to get your program to do what you want it to do, or squashed a particulary nasty bug, you know how good it feels when you finally reach your goal. Celebrate that feeling, and spread that newfound knowledge around.
What you just learned has lasting value for you and very likely for other beginners out there. So, next time you get through really tough challenge, write a blog post about it on a platform like Dev.to, share what you learned with a friend or classmate, or consider going on Stack Overflow and searching for similar questions that you can provide an answer too.
By doing these things you can up the value of the reward you get for solving problems, which will inspire you to find still more problems to solve.
If you follow this guide, you will learn how to love the struggle of learning to code. You'll learn to love that 12 a.m. problem solving, falling asleep over the computer and dreaming of code, waking up and fixing the bug feeling. You'll want to chase that next bug, that next lost-in-space code problem, so that you can keep learning.