This article was originally published on .cult by (author name and link to bio). .cult is a Berlin-based community platform for developers. We write about all things career-related, make original documentaries, and share heaps of other untold developer stories from around the world.
Everyone working as a software developer has experienced it at some point. There comes a time when you lose motivation for coding because, at the moment, you can’t solve a particular problem. Some code is not working as it should be and you get frustrated with yourself and don’t know how to go on. Sounds familiar?
My experience working in a bespoke software development company taught me the importance of being a team player. Your dev team is your safety net – if you fall, they’ll be there to catch you. But what about if you’re a freelance developer? That’s what online communities are for – you can find direct answers on how to fix your code or at least find inspiration and inner peace that everybody goes through challenges, which is just a part of being human.
So in case you’ve ever found yourself short of motivation, know that you’re not alone. Even though you shouldn’t be hard on yourself, work still has to be done because clients expect a good quality software product from you. Let’s see how to keep going and motivate yourself even when you face programming challenges:
1. Learn How to Self-Motivate Yourself
How you face challenges will ultimately depend on your personality characteristics, your coping mechanisms, and your preparation. Think of these qualities as skills you have to master, just like a programming language. If you want to learn Python or ReactJS, you devote your full attention to it, study the fundamentals, learn from more experienced developers, and participate in dev communities. Over time you slowly, gradually but inevitably get better. The same is valid when it comes to self-motivation.
Motivation is like a muscle that needs to be trained to get stronger. Usually, the first few minutes of an exercise routine are the hardest, and then it gets easier to go on because you’ve gained momentum. Making small, consistent progress will help you feel more motivated and enthusiastic about yourself, and this will make your challenges seem less frightening. You can even reward yourself with something pleasurable (e.g. coffee break, a funny Youtube video etc.) after you’ve made some initial progress. This way, you are both doing the work and holding yourself accountable because you want to enjoy the satisfaction of achieving results.
2. Divide Tasks into Small Measurable Chunks
An enormous and time-consuming software project may make you feel overwhelmed and exhausted from the beginning. Such feelings occur when you have an idea of what the bigger picture should look like but have trouble envisioning how you get there. Pat Brans, a writer and an affiliate professor in Management and Technology at Johns Hopkins University, suggests taking it one step at a time. When you have an intimidating “Monster Project” try not to look at it as a whole. Instead, break it down into small components with a manageable size.
It is in the very nature of a programmer to be a problem solver and to change perspectives quickly from thinking about many modules that work together to the inner structure of a module but rarely or never about the whole system in all full details. Object-oriented programming languages come with the great benefit of allowing developers to break problems down into essential components. Similarly, try to approach your current challenge from the micro-angle by dividing tasks into small manageable time chunks. If you prefer to switch between multiple tasks, make sure that those are related actions, (e.g. AI and NLP). Otherwise, you might risk poor performance, and it would be more time-consuming for you.
3. Reach Out for Help
Many young IT professionals prefer to handle programming issues independently, hoping that they would achieve the desired outcome without any external help. While it is true that we tend to take pride in our own accomplishments and it boosts our confidence and motivation, sometimes, we should admit that we need help to solve a problem. Maybe you experience issues with your code’s deployment, or it just keeps reporting bugs: whatever the matter, chances are that you’re not the first one to struggle with it.
For this reason, it is crucial to be smart and seek assistance. The first instance can be your teammates because they know the project as well as you, and can often come up with solutions to your problems if they are mid- or senior-level developers. Another suggestion is to share a snippet of your code or a full section on software developer communities like GitHub, StackOverflow, HackersNews, HashNode, etc. Describe which functions or code lines are broken and what you’ve tried already to fix them.
4. Get Some Fresh Air
Instead of busting your head around the same problem over and over again throughout the course of the day, just get some fresh air. You can literally get up and go for a walk. This will set your body in motion and trigger blood and oxygen flow, which will keep you awake and hopefully increase your motivation. Alternatively, you can just go on your balcony and deeply inhale some fresh air. Filling your lungs with fresh air will energize and rejuvenate your whole being.
Nowadays, with the popular hustle culture that promotes constant working, it is considered a luxury to have a couple of minutes to disconnect from work. Especially during Covid-19 lockdowns and remote work, it is vital to deliberately schedule a few minutes and just breathe the work tension out.
5. Sleep on it
If you’ve tried everything so far and nothing seems to work for you, just go to bed and sleep on it. Our brain has excellent problem-solving skills when we give it the well-deserved rest it craves instead of drinking coffee to stay awake. These magic brain powers are well-researched and evidence-based. Neuroscience explains the existence of four brain frequency waves depending on your level of activity. When you actively try to overcome a programming challenge, you generate beta waves. If you’re in a relaxed state, you emit alpha waves. Deep sleep, on the other hand, is associated with delta waves.
The missing step here, before entering the delta phase is called theta state. Theta waves are the best for problem-solving. They occur between active and relaxed states and can even strike you while you shower. Here, the critical notion is that you give yourself enough mental space to perform automatic tasks like showering or doing the dishes. Your brain then disengages from the coding problem you had just minutes ago, and thoughts are given free flow without any censorship. Oddly enough, you then get the feeling as if this inspiration came out of nowhere when, in reality, it was your own brain that took care of it in the background and gave you a solution on a silver platter. You’re welcome!