How to stay motivated when learning to code?

Sushant Rajhans
6 min readJan 22, 2021

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

This article will share some tips and strategies that you can use to stay motivated when learning to code. 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.

Some tips for staying motivated while learning to code

5 minutes of Learning

It doesn’t seem like much. It isn’t much. But it’s more than not doing anything at all.

It’s easy to get overwhelmed when contemplating setting aside hours of your time to learn something you might not understand.

The engagement for learning to code sometimes misses that level of entertainment you might get when playing a sport or game. But that’s because that level of fun happens only once we get into the thick of things.

Setting aside 5 minutes each day or week is enough to get you started, and starting is the hardest part. Once you start coding, the rest will come more naturally.

You will enjoy and gain the motivation to want to do a little more. I’ve often found myself learning a lot for hours at a time after planning to have only spent 5 minutes on it.

Break down large learning into smaller parts

Most thing’s can be broken down into simpler and simpler parts that are easier to understand at each level. Learning to code is no different.

Learning JavaScript, for example, might seem like a huge task. There are so many nuances to it. Yet, every part of JavaScript, down to how it handles an array (a group of items), to the way you can call methods (a way to do something) can be broken down layer by layer.

The final result is that you might just start by learning how to pop (remove a single entry from the group). If you continue learning bit by bit, you will eventually learn how all the methods and functions work, until you can use this one aspect of JavaScript without having to google it every time.

You are essentially building on what you learn bit by bit until you get a better understanding of the whole, and this can be only done by reducing it all into smaller components to start off with.

Pick 1 thing to learn, and start learning it immediately

You probably already know what you want to learn, you might have had it in the back of your mind for a while. Whether it is Angular, Vue, React, or even just plain old JavaScript, it’s great to want to start learning something.

If you don’t know yet what you want, freeCodeCamp has you covered with heaps of topics so you can just pick one or start at the top.

But if you already have a topic, don’t just think about it. It’s all great to read the latest articles, look at the documentation over and over, see the news of what’s happening in that language, but to really get started, you need to just start.

This means if you want to learn to React for example, just open up a new project right now and start working on it. It doesn’t have to be anything fancy, you might just be doing the Hello World getting started guide, but the goal is to stop thinking about learning, and start learning.

Get a mentor

Most programmers can probably tell you how much they’ve gained when learning from a mentor, whether it’s a senior colleague or even an expert on Codementor. Having a mentor means avoiding those common mistakes and roadblocks that slow down your learning process. Mentors have all “been there, done that” and can provide invaluable advice and motivation derived from their real-world experience.

After finding that mentor, the possibilities for you to grow are endless. Make the most of your mentorship through pair-programming, mock interviews, or even get help to land the job. Mentors are, without a doubt, the most reliable motivators that will guide you to the finish line.

Ask for help. You’ll need it As awesome as it would be to become the next Steve Jobs on your own, the reality is that people learn faster with mentors and peer feedback. What may seem like an immovable bug or an unlearnable topic could be quickly alleviated by a fresh pair of eyes or a new interpretation of the subject. Whether it’s online or in-person, ignore the trolls and don’t be afraid to ask for help, because every programmer has been in your shoes before. Besides, most developers love to code, and if there’s one thing that passionate individuals enjoy, it’s to share their knowledge with others.

Word of Warning: At Coding Dojo we suggest using the 20-minute rule. Take at least 20 minutes to figure something out on your own before asking for help. There’s a good chance that the answer is already in front of you, and besides, struggling makes you a better programmer overall.

Maintain a Portfolio

Once you’ve built more and more things, keep a collection of your work. Whenever you’re feeling a lack of motivation, you can always refer to this and see how far you’ve come. If you’re not quite sure what you should include in your portfolio, here’s a list of the most important things to include in a web developer’s portfolio. Don’t just maintain a portfolio for the purposes of finding a job though, you should be proud of what you’ve accomplished so far!

Seek out more online resources. There’s a wealth of content

If a particular concept doesn’t make sense, be it on Codecademy, in a textbook, or during class lecture, maintain your confidence and look for alternate online resources to learn the same content. Everyone learns differently, and just because one source doesn’t make sense, doesn’t mean there’s something wrong with you. It means that you’re not clicking with the delivery of the material. The online resources to learn computer programming are endless, and there’s always a Reddit post, youtube tutorial, or blog explanation that will make the material-at-hand crystal clear.

  • Udemy.com
  • Pluralsight
  • Coursera
  • LinkedIn Learning
  • Codeacademy
  • Free Code Camp
  • Udacity
  • Sitepoint

Hint: Don’t underestimate the power of google search.

Take breaks when debugging

When debugging, it’s easy to go down the rabbit hole for hours, and there’s no guarantee that you will fix the problem. To avoid this, it’s best to step away from the bug for a few hours, and return with a fresh perspective. Not only is this a guaranteed way to help solve the problem, but you’ll also save yourself hours of headache. So if help isn’t available — to touch on our previous tip about seeking advice — consider taking a break to clear your mind and return later. In the meantime, the bug won’t be going anywhere, and you’ll at least restore some needed sanity to improve productivity.

Be a part of a supportive community

No matter what programming language you’re learning, there’s probably an online community out there for you. There, you can connect with your peers or developers more experienced than you that have been in your shoes before.

For beginners, I’d recommend CodeNewbie and freeCodeCamp are great places to start. There’s also female-oriented communities such as Ladies Learning Code.

Lastly, there’s always Reddit (e.g. r/learnprogramming/), with subreddits for practically every programming language.

--

--