10 Ways to Stay Motivated While Learning to Code!

Lisa Huang
10 min readAug 23, 2017


Source: Shutterstock

Have you ever been frustrated while learning to code? 💻

Spending days and nights wrangling a tutorial, coding up an app or solving an algorithm problem?

Yea, I’ve been there too. It can be especially hard if you are learning to code part-time or remote in a less structured environment.

Maybe you are stuck in a full-time job, burning the 🕯on both ends and learning to code in the evening. Or a stay-home mom / dad, trying to get new coding skills before returning to the workplace. Or maybe you are caring for a family member, and need the flexibility to learn on your own schedule instead of joining a full-time coding bootcamp.

Learning to code is hard, and it can be even harder to stay on track while balancing a million things that are screaming for your attention! 🔥

If you’ve read some of my other posts, you will know I’m in the same boat. I’m currently enrolled in Flatiron School online fullstack web developer program, and I’ve definitely experienced a few “lapses” along the way.

Sometimes it is for a project like building a Sinatra app. In other times, it’s wrapping my head around a new concept like how to define complex associations in Rails.

Whenever I take a few days to digest and learn a new concept, I find it hard to get back in the rhythm of coding. Coding is a lot like working out 🏋🏻‍♀️— when you keep to a schedule, it is easier to master the energy to go to the gym and do your sets. You get stronger over time and can sustain for a longer time / get through a hard workout routine! But if you take a break or too many ‘cheat days’, you pretty much have to start over again.

Here are 10 ways to stay motivated while learning to code!

I’ve learned and picked these ideas up over the past year while learning to code. I’ve put many of them into practice at various point when I felt stuck, and I hope this can help to unstuck you too!

Source: VMware blog

2-min TL;DR summary

  1. Attend a local meetup
  2. Join a tech newbie group online
  3. Explore other programming languages
  4. Teach other people
  5. Experiment with side projects
  6. Keep your eyes on the prize
  7. Share you successes!
  8. “A healthy mind, a healthy body”
  9. Find your cheerleaders
  10. Create some breathing room

I’ve grouped these ideas into two sections: Work Hard & Play Hard!

Source: Fistful of Talent
  1. Attend a local meetup 🙋🏻️🙋🏾‍🙋‍🙋🏿🙋🏼
    It gets lonely sitting in front of your computer, wrestling with difficult concepts and working through exercise after exercise! Find a local meetup in the language you are learning (Ruby, Javascript, Swift etc) or a field you are interested in (Data science, Machine learning, Mobile development?).

    It can be refreshing to learn something new, or hear why other people are passionate about the topic that drew you to start learning to code! This is also a great opportunity to mingle with other developers, and learn about the type of problems they are solving at work :)
  2. Join a tech newbie group online 💁🏼
    If there are no meetup groups near you or they meet too infrequently, you can always join online groups! Communities like Girl Develop It and FreeCodeCamp have both experienced and new developers who are learning to code. Here’s a list of 13 communities to join if you are new to tech!

    Looking to connect with other women in tech? Here’s a great resource with links to several Women in tech groups!
  3. Explore other programming languages 📚
    “Are you crazy? I’m having trouble with my first programming language — and you want me to learn a SECOND one!?”

    I know, I know, it can sound insane to start a second programming language when you don’t feel like you have the first one mastered. I’m going to let you in on a secret — even experienced developers who have been coding for 10+ years don’t feel like they “have it covered” for their main programming language! Let’s take Javascript as the obvious example — where there’s a new framework / library pretty much every month, and with every new browser feature comes a new set of nuances.

    BUT! You may be surprised by how the core concepts like conditional flow, data structure and loops are pretty similar across programming languages. I started learning to code with JavaScript, and through the Flatiron program ventured into Ruby. Learning traditionally backend concepts like routing, RESTful API and database query has significantly improved my understanding on how a web app work “behind the scene” / behind a Javascript frontend. It can be both rewarding and empowering to connect the dots between two or more programming language, and motivate you to dive back in!
  4. Teach other people 👩🏽‍🏫
    It’s easy to lose sight of how far you’ve come in your coding journey.

    When I first started coding, I was deeply confused by CSS’s syntax (where do I put the semi colon again?) and cascading inheritance! Learning how to use Flexbox was the bane of my existence — and I though I will never understand CSS :( A year onwards, I have learned to use SASS after taking Mike North’s incredible SASS course on Front End Masters and can use mix-ins, SASS variables and even functions within CSS! In my latest Sinatra project, I’ve even started learning and implementing Google’s Material Design principles.

    The best way to practice what you have learned is to share your knowledge and pass it forward! Dedicate an hour a week, pop in to some of the tech newbie groups and help answer questions. freeCodeCamp is a great place to start! Consider volunteering with nonprofit organizations like RailsBridge, Girls Who Code, Code.org. Or, consider writing down what you’ve learned and share them as blog post, tweets or even a visual series like Vaidehi Joshi did with her basecs series!
  5. Experiment with side projects 👾
    I used to be a gamer, so gamification of goals really helps to nudge me along! I try to keep my Github profile “green” with daily commits the way I keep up my Fitbit goals 😉

    Find what makes you tick! If you enjoy arts and animation, create something fun and share it with the #100DaysOfCode project. I love David Khourshid’s CSS animations on codepen — check out his Husky & wagging puppy! If you want to learn more about CSS animations, Rachel Nabors just published her Animation at Work ebook!
Source: Grit in education

What’s the fun in all work and no play? In fact, play is so important that TED has over 12 talks on this the topic of PLAY alone! It is equally important to take good care of your personal wellbeing, in addition to the work-related motivations to get back into coding. Read on ;)

  1. Keep your eyes on the prize 🏆
    What prompted you to venture down this journey to learn to code? What were the initial trigger — a conversation with a friend? Something you read in the news about technology? Or a desire for more flexible work environment?

    For me personally, I left my startup and moved back home when my mother fell sick in 2015. After spending months in the hospital, she recovered slowly and was able to come home. I treasured those moments by her side, as we haven’t spent that much time together since I left home for college at 18. I’ve always lived a continent away from my family since, and over time it has become natural to only see them once a year beside the irregular Skype session — life got in the way. This was a reminder that my parents are aging and time is limited… and I wanted to have the flexibility to be home and spend more time with my family. This was what prompted me to start learning to code.

    Remember your reason. Remember why you started this journey. And let that be the driving force that will push you onwards pass the finish line!
  2. Share your successes! 🎉
    Learning to code can be scary, because it doesn’t take long before you realize how vast the field is. A friend once described it to me with a poetic analogy:

“It is like staring into the universe — there are a million stars for as far as the eyes can see, and each star with countless details to study!”

He is a physicist, and has been an engineer for over 15 years spanning frontend, backend, web security and many other topics.

While you are constantly learning new topics, it is important to celebrate your successes along the way and mark down milestones, small and large! If we don’t take the time to celebrate what we have learned, and the steps it took for us to get here, how will we know how far we have traveled? Think of this as your “success journal” and something to look back on in moments of self doubt and frustration.

Need some inspiration? The #WITBragDay hashtag on Twitter is a great place to start! This was a discussion initiated by Alice Goldfuss, a Site Reliability Engineer at Github. By starting this initiative, Alice inspired hundreds of women in tech to share their achievements with the world! Here are a small sample of the incredible stories, you should check out the thread!

Read this thread!

3. “A healthy mind, a healthy body” 💪🏽
Mens sana in corpore sano — a latin phrase that’s commonly translated as “a healthy mind in a healthy body”. One of the biggest lifestyle change you may experience once you start learning to code is the amount of time you spend in front of a computer! After all, it is hard to code while you are on the run or driving right?

Before I started coding, I founded a digital marketing agency combined with event management. I spent most of my day out on the road meeting clients and vendors, attending media events or managing staff on-site. I was used to be up and about for 70% of my work day, and it was strange to now spend 70% of my time sitting in front of a computer!

Basics: stand up and stretch every 45min to 1hr. Take a short 5min walk around the office, the cafe you are working out of, or even around your house / apartment complex for some fresh air.
Intermediate: make sure you pencil in workout time every few days, ditch the car for a walk or cycle to your favorite restaurant.
Advance: opt for healthy snacks while you are coding, especially for those late night coding sessions. Hummus and cracker is a good choice, even a glass of wine (or two!) makes a great nightcap ;)

The bottom line: take care of your health so you can go further. A career change and learning to code is a marathon, not a sprint! Start developing good habits now and you will have more energy to code!

4. Find your cheerleaders 🗣
Speaking to other bootcamp grads and engineers at meetup and conferences, I’ve heard first-hand accounts on how they couldn’t have done it without supportive family and co-workers. Martin Splitt is a WebVR engineer and open source advocate based in Switzerland, and he recently tweeted:

Learning something new is hard! You are literally rewiring your brain and firing millions of new signals through your cells. There are going to be many moments where you will hit a wall, get frustrated in solving a problem and start doubting if you are cut out for this. There’s a term for this: the imposter syndrome. 🤦🏻‍

“Imposter syndrome: a concept describing individuals who are marked by an inability to internalize their accomplishments and a persistent fear of being exposed as a “fraud”. “— Wikipedia

And yes, there’s a TED playlist for fighting imposter syndrome too. Be kind to yourself, and build a support group that you can turn to to vent, find reaffirmation, and remind you of how awesome you truly are!

5. Create some breathing room 🛀 🌿

It can be hard to create boundaries when you are learning to code in a less structured environment.

Imagine if you were attending graduate school, you will likely spend over 40hours on your coursework, team projects and research. The same applies if you were working full-time, you will be at the office all day and maybe spending more time in meetings after work. But if you are learning to code after work (or from home), chances are that you will be interrupted by your children or family throughout the day.

Stress can come in many forms, and what frustrates you the most will differ by person. You should allocate whatever amount of time you need to create space and focus for your coding sessions! This is where your cheerleaders (see point 3) should be enlisted to help.

For example, if you have young children at home, you can ask your friends to host play dates so that you can free up focus time to work on a coding project. If you are the primary carer for another family member, try outsourcing tasks such as cleaning, cooking, or buying groceries. Or if you need to remove distraction from chores, make a conscious effort to head out to a cafe or co-working space and get into a routine!

Wow, thank you for reading this far! 🤗

I’d love to hear how you started on your coding journey, tips on how you stay motivated or just come say Hi in the comments 😃



Lisa Huang

Product Lead at Planet | 2x Founder, dabbling in TypeScript | My @TEDx talk: bit.ly/LisaHuangTEDx