While being fun, programming is not easy. To be able to dive into a flow state in which you're completely focussed on the topic, you need to cut off all distractions. With this article I would like to introduce you to my methods of working in a more focused manner and give you some tips that might make your life much easier. My experiences mostly come from the programming area, but the following tips can be extended to various other topics.
Consistency is Key
I have mentioned this point more often and I think it is the most important thing you should get used to.
Building a habit is the most effective way to achieve real long-term visible progress. We are all just human beings and short-term lows (peaks as well!) will always be present. But if you really force yourself to do something regularly at the beginning, you will feel progress quickly. Additionally, it won't feel forced in the long run, I promise.
Investing Time != Being Productive
One thing I have been able to notice very much on myself lately is that the time brought in does not correlate with productivity. On the contrary, if I force myself to work long hours, I am often less productive than if I spend a comparatively short period of time working and filling the gap by doing sports before or after work.
I must also say that I enjoy my work. One might think that this approach only applies to cases where this is not the rule.
When working for longer periods of time, I will eventually lose my focus. Sport helps me to get fit again and allows me to think about my projects in parallel. Often times I had ideas for new apps or improvements of existing ones while jogging, which I probably wouldn't have come up with when working stubbornly.
So if you can't get on with a problem, give yourself a little bit of fresh air in between and sit down again later with a clear head. I have noticed for myself that physical exercise, even if only half an hour, significantly increases my ability to concentrate afterwards. And hey, you're doing something for your health, by the way.
Done is better than Perfect
That was a point which I found extremely hard to apply. I have always regarded myself as a perfectionist, which has been very difficult for me when developing apps. I could never stick to an MVP. Whenever I thought of new features I wanted to have them implemented immediately. However, since I've really forced myself to first implement the basic functionality, to document ideas in parallel and then to implement them later in a sorted way, I don't have 20 side projects that are not making any progress. Instead, each project has functioning interim results and I can fully focus one single thing.
Don't try to Multitask
Just don't. It doesn't work. Concentrate on one thing, do it and then move on to something else. It's normal for the brain to wander and to come up with ideas. Write down these ideas and come back to them later, this will help you to get your mind free and to focus again.
See other tasks as distractions, just like your mobile phone or TV. Of course you can switch back and forth between several tasks, but you always need a certain amount of time to find your way back into a topic. And that's exactly the time you can save.
For my part, I see the problem more when my own todo list is too full. The feeling of having to do a lot of things increases the temptation to do several things at the same time. To prevent this, it can be very helpful to plan the whole day in the morning. And not only in the style of a simple todo list, but with fixed start and end times. This can help you not to plan the day too fully and to calculate realistic time expenditure.
TL;DR & What to do now
There are various ways to increase your own productivity. In this article, I have dealt with those who are the most important to me personally.
First of all, I'm recommending you build a habit. Suppose you want to learn something, be it a new programming language or whatever: set yourself a fixed time period for it every day. Avoid any distractions during this period. Turn off your cell phone. Use addons like LeechBlock if you can't resist the temptation to surf Reddit. And focus on the essentials, you can finish the final touches later.
But also take time out and move between your sessions. If running is too boring or unproductive for you, listen to podcasts while you're running.
This subject is very personal and although I hope that my opinion will help you, I recommend you to browse through medium. You'll find some great articles on this topic.