How to stay motivated and not give up when learning to code


When it comes to learning to code, one of the hardest parts can be finding the motivation to keep going when you feel stuck or frustrated. In fact, motivation is one of the most popular discussion topics in the Codecademy Facebook Community, as well as in the Codecademy forums.

One community member, Brendan P., says, “I am having the hardest time staying motivated to learn. I feel like I am just failing left and right,” in a thread called How do you stay motivated?

In our Facebook community, Terrel J. says, “I have hit a roadblock and it’s mentally draining trying to learn how to code.”

Learn something new for free

7 tips for staying motivated while learning to code

If you’re having a hard time staying motivated while learning to code, know that you’re aren’t alone in feeling this way — we’ve all been there. And many of our community members have shared helpful tips based on their own experiences with finding motivation when they’re stuck or in a slump. We’ve compiled these tips into a list of seven ways to stay motivated and not give up.

Here’s to finding your motivation!

Tip #1: Take the time to practice

Many learners get stuck when they move too quickly through lessons without taking the time to practice. Spending time with a new concept is important so you can retain what you’ve learned and apply it as you move on to more advanced concepts.

In the “How do you stay motivated?” thread mentioned above, community member Jeff S. stresses the importance of practice. “Sometimes it takes a lot of practice with these more difficult concepts until you gain fluency.”

He equates learning to code to learning a language like Spanish or Italian. “It can be frustrating getting over the basics when all you want to do is communicate. That can be even more frustrating when you are surrounded by people who seem to speak Italian fluently.” But the more you speak, the more fluent you’ll become. The same holds true for learning to code — the more you practice, the more fluent you’ll become.

On a separate thread about learning to code, Shaylin also recommends practice. “I find it helpful to practice what you learn on your own. Make a small project that focuses on a single concept.”

Tip #2: Look back at all you’ve accomplished

When you get stuck, it can be easy to fixate on all that you still have to learn and to lose sight of everything you’ve already learned. The next time you’re feeling overwhelmed and down on yourself, take some time to reflect on how far you’ve come.

In his thread on motivation, Brendan P. says, “I guess I need to take a step back and look at what I’ve done. In 6 months my GitHub is full of programs that I wrote in half a dozen languages. I should use it as an example of my progress instead of how far I have left to go.”

Tip #3: Remind yourself why you started learning to code

A recent thread in our Facebook community dove into how to stay motivated during quarantine. Sunjay A. shared the following advice:

“In those days you feel without motivation, take a deep breath and find ways to rest. Next… try to remember the goal you had when you first began this journey. What motivated you then? If you had no specific goal, set one today and work toward that.”

Remembering why you started can be a nice way to rediscover what inspired you in the first place, reinvigorate your desire to learn, and help you find the motivation to keep going.

Paulina D. shares similar advice in the Codecademy forum. “Perhaps asking yourself what the skills you’re learning could help you achieve in the future would be a nice start. What would you like to do that would require those skills?”

Tip #4: Embrace the learning process

Community member Regina G. shared a blog post about her experience with reprogramming her mindset to learn to code in our Facebook group. “In the past, I used to get really upset at myself if I wasn’t good at something right away.”

Programming isn’t easy — and learning to program will likely require you to think in ways you’ve never thought before. It may take you some time to be okay with the fact that coding isn’t second nature and that you’ll make mistakes along the way.

If you’re feeling stuck or frustrated, understand that it’s all part of the learning process. Embrace it! Through getting unstuck, you’ll not only internalize the skills you’re learning, but you may find personal growth as well.

Tip #5: Do a small amount each day

In a thread in our Facebook community, Crystal H. says, “It might help to set a timer for a short amount of time. Code for 10 – 15 minutes a day.”

Dan J. shares similar advice. “Don’t feel like you need to do loads every day. Just set yourself a small achievable goal. It might be half an hour, it might be 15 minutes. You may even find when you start you get on a roll and want to go longer. Some days I just use the Codecademy Go app to practice and then end up turning my PC on to continue a lesson because I get into it.”

Tip #6: Take a break

Sometimes when you’re feeling stuck you just need to take a little bit of a break to clear your head.

In response to a question in our Facebook group about what to do when you’ve hit a roadblock, Hamza Z. says, “That’s when you need to take a break and do other things that you like.” Gavin A. adds, “It can get that way sometimes. That’s the moment you need to go do something else and take your mind off it. You’ll come back reinvigorated and with a solution mindset.”

Daniel Z. shares similar advice. “We’ve all been through this situation. No worries. Just take a break — a walk, some good music, and come back. Guarantee it will seem easier than you thought.”

Tip #7: Shift your focus

An alternative to taking a break to go for a walk, listen to music, or focus on a different activity you enjoy, is taking a break to focus on a different coding task.

Adam L. explains how he overcomes loss of motivation in a thread in our Facebook community:

“What helps me gain motivation is that I lower the bar for myself and I try to build something easy to start with that I will enjoy. And then gradually, I try to improve. I get so much joy out of just learning the smallest function day by day. I shift focus from getting somewhere and instead lower the bar and build a project that makes me happy, no matter how small it may seem.”

If you’re feeling stuck, we hope these tips will help you find the motivation to continue on your learning journey. How do you stay motivated when learning to code? Let us know in the comments!

Whether you’re looking to break into a new career, build your technical skills, or just code for fun, we’re here to help every step of the way. Check out our blog post about how to choose the best Codecademy plan for you to learn about our structured courses, professional certifications, interview prep resources, career services, and more.

Related courses

5 courses

Related articles

7 articles