今日推荐英文原文：《How to Get in the Perfect Mood for Coding》
今日推荐英文原文：《How to Get in the Perfect Mood for Coding》作者：Piero Borrelli
How to Get in the Perfect Mood for Coding
Improve your productivity with these emotional tipsSitting in front of a computer and “just code” is not always that easy. We are humans too, with worry days and tired mornings. Programming is such an emotional game to win. You have to control yourself to disclose your concentration abilities and get the job done.
Think about all you’re asking yourself for when you’re doing it:
- Study a problem and ideate a solution for it.
- Manage DRY principles, maintenance, scalability and simplicity.
- Try not to get distracted when you have Google ready to answer any dumb questions you might have at that moment.
- Work under the pressure of an incoming deadline.
Here’s a list of my advice for reaching such a mood and getting the most out of your days.
Get Rid of Worry CodeThis one is probably what, especially in this period, might affect you more. When you’re worried or when you feel bad. You could have so many thoughts raging in your mind and you can’t get your hands on the keyboard. You could be thinking about your loved ones, life situations, retracing dialogues from the inside.
For how cynical that could sound, this is going to kill your productivity. Which will probably give you some problems with your boss in the long run if you can’t keep these feelings away while working.
My solution, which might work for you in this case, is divided into two main steps:
- I think about what the problem is and what my need is. Do I need to get reassured by a special person after an argument? Do I need to call my mother to make sure she’s okay?
- I will take 20 minutes away from code, acting based on that need, trying to satisfy it. So if I need reassurance after an argument, I will talk to that person. If I need to talk with my mum, I will call her and make sure she’s alright.
Chill with MusicFor some people, music does wonders while coding. They could listen to heavy metal while still being concentrated on a task. To me, that’s not the case. As soon as I’m listening to a cool song, my mind's attention just gets stolen by the lyrics and rhythms. In fact, I can only listen to it while doing repetitive tasks which are pretty mechanical to me.
If music is for you and puts you in the good mood without distractions, I suggest you listen to it whatever genre you like and can stand for a prolonged time. However, I still recommend you choose something chill, as I find it can calm your mind and put you in the perfect position to deal with lines of code.
Here are some cool tips for some chill stuff I love, ranging from lo-fi to some chill hip-hop.
Avoid InterruptionsYou need to always have in mind what you’re doing and your next step while coding. Affording a distraction means losing track of your work, subsequently spending a lot more time to recap everything you were doing.
I find the most interruptions come either from letting myself being carried away by Google, looking for stuff I need or interesting articles or simply outside noise.
In the first case, the only solution is to be disciplined enough to not start surfing the web randomly when tempted. Make a list of things you want to check out in the morning and then come back to them later when you have some free time. You can further encourage this behaviour with some time managing techniques like the Pomodoro one.
For noise isolation, the best purchase you can do as a developer is a good quality set of noise-cancelling headphones. Their price can range up to quite a few bucks, but I’m confident you can find some good ones also on the cheap side.
Kill BoredomDo you ever find yourself just staring at the keyboard feeling blocked? Like if your brain went into a freezing mode. It can happen after a long day of typing. In this case, my suggestion is you find an interesting external input to bring creative inputs back. The best thing you can do is to find a pair partner. Ask your colleague for help on the task you’re working on. This will surely liven up your mood and give you a boost on productivity for a while.
Save Your Brain From BurningSometimes you just can’t sit another second trying to solve a damn problem you’ve been struggling with for the last four hours. You start even forgetting what the initial issue was, mumbling while you go through your code making stupid errors one after the other.
This is the sign of a good time for a break. In this case, I suggest you take 20 minutes away from the keyboard to avoid the temptation of going back to the problem with a brain still overflowing. You can still be in front of a screen, just not the one of your laptop.
In such cases, I like to chill in my office coffee room (or living room when working from home) and just enjoy a little snack. I will watch a couple of YouTube videos and then get back to my job with a fresh mind.
- To find the best mood while coding, you have to implement a series of ideal strategies.
- If being worried about something is incapacitating you from writing code, take 20 minutes away from the keyboard and try to fulfill your emotional needs at least for the day.
- Chill with some good music while coding, as it might help you bring in a positive mood.
- When bored or having writer’s block find a pair partner!
- Buy yourself a good pair of noise-cancelling headphones and discover a time-managing technique that works for you.
ConclusionProgramming is already hard by itself. Plus, we always have to find new ways to control our minds, the most important tool we have, to concentrate and be productive. The tricks and scenarios I proposed to you should help you to know how to reach an optimal mood for coding and how to deal with different situations.