This one article was originally published on .cult by (author name and link to bio). .sect is a Berlin-based developer community platform. We write about all things career, create original documentaries and share countless other untold stories from developers around the world.
Anyone who works as a software developer has experienced it. There comes a time when you lose the motivation to code because you can’t solve a particular problem right now. Some code doesn’t work as it should and you get frustrated with yourself and don’t know how to proceed. Sounds familiar?
My experience working in a custom software development company taught me the importance of being a team player. Your development team is your safety net – if you fall, they’ll be there to catch you. But what about if you are a freelance developer? That’s what online communities are for – you can find instant answers on how to improve your code or at least find inspiration and inner peace that everyone goes through challenges, which is just part of being human.
Glass and cow’s blood made of algae?
Experts and artists discuss the future of sustainable material design
So if you’ve ever been short of motivation, know that you’re not alone. Even if you shouldn’t be strict with yourself, something still needs to be done, because customers expect a high-quality software product from you. Let’s take a look at how you can keep going and motivate yourself even if you are facing programming challenges:
1. Learn how to motivate yourself
How you deal with challenges ultimately depends on your personality traits, your coping mechanisms, and your preparation. Think of these qualities as skills you need to master, just like a programming language. To learn Python or ReactJS, pay your full attention, study the fundamentals, learn from more experienced developers, and participate in dev communities. Over time, you will slowly, gradually but inevitably get better. The same is true 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 a workout routine are the hardest, and then it gets easier to keep going as you gain momentum. To make small, consistent progress will help you feel more motivated and excited about yourself, and this will make your challenges less daunting. You can even reward yourself with something nice (e.g. a coffee break, a funny YouTube video, etc.) after you make some progress. In this way, you do both the work and yourself responsibly because you want to enjoy the satisfaction of getting results.
2. Break tasks into small measurable chunks
A huge and time-consuming software project can leave you feeling overwhelmed and exhausted from the start. Such feelings occur when you have an idea of what the bigger picture should look like, but have trouble imagining how to get there. Pat Brans, a writer and associate professor of Management and Technology at Johns Hopkins University, suggests taking it one step at a time. If you have an intimidating “Monster Project”, don’t try to view it as a whole. Split it into . instead small components in a handy size.
It is in the nature of a programmer to be a problem solver and change perspective quickly from thinking about many modules working together to the inner structure of a module, but rarely if ever about the whole system in all its details. Object-oriented programming languages have the great advantage that developers can break down problems into essential components. Similarly, try to approach your current challenge from a micro angle by dividing tasks into small manageable blocks of time. If you prefer to switch between multiple tasks, make sure they are related actions (e.g. AI and NLP). Otherwise you risk poor performance and it would be more time consuming for you.
3. Reach out for help
Many young IT professionals prefer to solve programming problems on their own, hoping that they would achieve the desired result without outside help. While it is true that we tend to be proud of our own achievements and it boosts our confidence and motivation, sometimes we have to admit that we need help to solve a problem. Maybe you’re experiencing problems with your code’s implementation, or it keeps reporting bugs: either way, chances are you’re not the first to struggle with it.
For this reason, it is crucial to be smart and seek help. The first instance could be your teammates, as they know the project as well as you do, and can often come up with solutions to your problems if they are intermediate or higher level developers. Another suggestion is to share a snippet of your code or an entire section about community of software developerss like GitHub, StackOverflow, HackersNews, HashNode, etc. Describe which functions or lines of code are not working and what you have already tried to fix them.
4. Get some fresh air
Instead of running around with the same problem over and over throughout the day, just get some fresh air. You can literally get up and go for a walk. This gets your body moving and boosts blood and oxygen flow, keeping you awake and hopefully increasing your motivation. You can also just sit on your balcony and take a deep breath of fresh air. Filling your lungs with fresh air will energize and rejuvenate your entire being.
Today, with the popular busy culture promoting constant work, it is considered a luxury to have a few minutes to disconnect from work. Especially during Covid-19 lockdowns and remote working, it is vital to consciously schedule a few minutes and just breathe out the work tension.
5. Sleep on it
If you’ve tried everything so far and nothing seems to work, just go to bed and sleep on it. Our brain has excellent problem-solving skills if we give it the well-deserved rest it craves instead of drinking coffee to stay awake. These magical brain powers are well researched and evidence-based. Neuroscience explains the existence of four brain frequency waves, depending on your activity level. When you actively try to overcome a programming challenge, you generate beta waves. When you are in a relaxed state, you are emitting 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 solving problems. They occur between active and relaxed states and can even affect you while showering. The critical notion here is that you give yourself enough mental space to perform automatic tasks, such as showering or washing dishes. Your brain then frees itself from the coding problem you just had a few minutes ago, and thoughts run free without any censorship. Funnily enough, you get the feeling that this inspiration came out of nowhere, when in reality it was your own brain controlling it in the background and offering you a solution on a silver platter. Don’t mention it!