7 Tips to Stay Motivated While Learning to Code

All

Introduction:

For those who are less familiar, the idea of coding will always seem daunting. Until I took my first CS class, I had never learned anything like it. Most other “new” classes I took built on something I understood (at least a little). And it wasn’t until I got into the flow of things (and found the right teacher) that I realized it was relatively easy to pick up the languages.

As you move through the various stages in your tech journey, you’ll notice the rewarding feeling when you solve a new problem and it will push you to solve the next, but you’ll still face obstacles and struggle to stay motivated. Which is completely normal!! In this post, I’ll take you through some tips and strategies that really helped me to stay motivated when I was learning to code (that I still use today)!


1. Set Goals & Celebrate Your Successes

This is always relevant — whether you’re a student being guided through classes or an individual learner teaching yourself at home/on the job. It’s important to keep in mind that the average developer doesn’t just know every single language by heart. Depending on what you specialize in (front-end, back-end, data, cloud, security, etc.), the skill set you build will look different. Knowing what you’re striving for (building a website, analyzing data, coding an app, etc.) will help you research and plan specific steps on the path to your goals.

Getting stuck on a coding problem can be discouraging, so if all of your goals sound like “finish coding this project” then you might not feel that rewarding feeling often enough to stay motivated. I always make sure to set manageable goals between starting and completing a project. Maybe it’s “complete this course on Codecademy”, “do 1 hour of paired programming with someone on my team”, “test my functions as I write them” or anything else that will make you feel productive to cross off a to-do list!

2. Embrace Setbacks

For those who have read my other posts, you’ll be familiar with my opinion that a good developer is not just someone who has all the languages memorized and is good at coding off the top of their head. Good for them, but that’s not enough. A good developer is someone who is very resourceful and knows tips and tricks to get answers to all kinds of different questions — because that’s what coding is: answering questions and solving problems.

The bottom line is, coding is all about trial and error. You’re going to make mistakes, you’re going to try the wrong approach — I literally do this every day. The mark of a good developer is someone who sees a mistake as a mini problem to solve and takes the learning opportunity to add a new skill to their toolset. A simple example: “I think this code looks good, let’s test it. Okay, I got an error that I’m unfamiliar with, so I’m going to copy and paste this error message into Stack Overflow and see how other people solved this problem.” You’ll get good at moving from the “seeing the issue” step to the “I’ll look for an answer in the applicable resources” step seamlessly the more you code!

3. Find The Right Resource/Mentor:

I want to touch on this because had I not realized this, I might have given up on computer science. There is such a thing as an expert who is a bad teacher. It’s nothing against them or their knowledge level, it just means they aren’t the right person to teach you. So please don’t give up when the first few resources you go to don’t make sense. Take it from me — I dropped out of my very first CS class mid-semester because I got a D on every test. Took it again the following semester with a better teacher, comfortably achieved an A in the class, and went on to do machine learning research with that professor (thank you RateMyProfessors). Don’t be discouraged and keep trying until you find that perfect fit — your motivation will skyrocket!

4. Stay Curious

The tech world changes every day, so even the most experienced developers will never run out of things to learn! When better tech comes out, companies adapt, so keeping up with what’s new can make you a more attractive candidate for whatever role you have your eyes on! Plus it generally makes the industry more interesting to work in — you get to try new things often which can definitely help to prevent burnout and keep you motivated!

PS: If a company doesn’t support an employee’s interest in learning about tech that’s on the rise (within reason — I know you have other deadlines), make a mental note of that. If the company doesn’t embrace change, it might get left behind, but that doesn’t mean you have to get left behind too. Do with that info what you will.

5. Stay Organized

This one is harder to do the longer you wait. From the beginning, keep copies of your code somewhere safe like GitHub in case something happens to your computer. See this post for more info on getting started with that: GitHub — The Crucial Tool Every Developer Needs (Medium link, blog link).

Also, please comment up your code! There’s nothing worse than having to decipher your own code months later because you didn’t leave notes for yourself and now you can’t remember what everything does. It doesn’t have to be detailed but don’t make it redundant. For example, a function called SaveUserDetails should save a user’s details (duh). So, a more helpful comment would be “gets a user’s details from _(source)_ and saves it to _(database)_” or any other info about the functionality that isn’t immediately obvious by looking at the function.

The more organized you are, the less work you create for yourself later. You and anyone else who works with your code in the future will thank you!

6. Find a Community & Learn to Love Feedback

I’m sure we’ve all pictured a coding job as a person with their head down at a desk all day working alone. It might feel like that sometimes, but it doesn’t have to and honestly, it shouldn’t. For one thing, we don’t have all the answers, and even when we think we do, someone around us will have a faster / better way to try something. On a coding team, each developer likely has their own separate section of a project to work on, so you might not get extensive feedback on your work unless you ask! Make sure to bounce ideas around and ask lots of questions to continue learning and improving your skills!

Other than keeping your knowledge up to date, it’s also helpful to have a community to keep yourself balanced. Coding at any level requires focus and dedication, and it can be easy to get swept up and forget to do human things like drink water, move your legs, or even just have a conversation with someone. Whether you discuss the inner workings of your super cool project or simply what your dinner plans are, connection with others will help you find inspiration, feel less stressed, and if nothing else, feel less alone — because every developer goes through the same ups and downs.

If you don’t have the opportunity to talk face-to-face with someone, check out online coding communities such as GitHub, Stack Overflow, or Reddit. If you’re passionate about meeting people in person and aren’t sure how, look online to see what coding groups or events are in your area. As we know, tech is always on the rise, so I think you’ll be surprised at what you can find!

7. Take Breaks & Keep it Fun

Building on the previous point, staying motivated as a coder can sometimes come down to how you take care of your mind — whether that is through connections with others or just straight up taking a break. When nothing is working, don’t spend useless hours driving yourself crazy in front of a computer screen. Any “progress” you make while you’re feeling like this will likely have to be redone later anyway. Make a little note of your stopping point and then take some time to do what makes you happy.

I won’t pretend that breaks fix everything. Sometimes I come back with a fresh new idea for how to tackle a problem, other times not. In those cases, you still have options! Utilize online resources like the coding communities I mentioned above. Chances are, someone else had the same question as you and maybe 20 people already offered their perspective on it! Beyond that, my advice is to not let your ego get in the way of progress. Don’t tell yourself “I have to prove myself and do this all on my own” (because side note — no developer sits down at a computer and codes a reasonable project without asking for help or Googling a question). Learn to delegate when you can and please remember — asking for help is not a weakness. Personally, I prefer admitting I need help over having to explain myself later when someone asks why I couldn’t do it.

Lastly, always remember why you started coding in the first place! This will help you stay balanced, keep you motivated, and make the overall experience more fun!


Final Thoughts:

For those who stuck around for the whole post, I hope I was able to provide some insight to make your experience better!

What causes you to lose motivation? How do you overcome it? Share any thoughts you have in the comments and feel free to reach out directly at techblog@apartfromblonde.com if you have any other questions for me!

Check out this and more posts on my Medium account HERE!

Next
Next

Mastering Time Management as a Developer