I make plans, todo lists, etc. about the technical stuff which I have to study.
I am not, but I do wish to become an excellent C++ programmer.

Now, when I am pretty excited about learning the stuff, I sit down for studying and find myself browsing irrelevant websites! Have already blocked the major sites I was addicted to, but then I find myself browsing wikipedia just for the heck for it!!

Then I start studying finally, and after two minutes I again start browsing the net (15 minutes). I come back to studies for 2 minutes, and waste time for 15 minutes.

10 Answers
10

The foremost reason is that you are actually thinking that it is not
really important or useful for yourself or in other words "You dont
really want it". There may be various reasons your mind will tell you
for that. Imagine if you want to do things which you like, You will always do it with enthusiam and happiness. or If your boss told you that you must give a report on that technical paper for your appraisal, You anyway have to do it.

what to do about it?

Ask yourself genuinely "Why you cant focus". It can give you answers. If you really like your job and passionate about it. You wont procrastinate in my opinion. But If you are forced to do something you dont like. For a temporary solution.

You have to tell your mind clearly about all the wonderful outcomes of doing it and about the not so wonderful things if you dont do it. If you made up your mind to think it is important, It will do it.

For a longterm solution, You can look at how to make your mind effective using meditation and yoga. It helped me a lot.

Reading articles about programming is boring for me too, because reading hard technical text is not ivolving you into process. It's difficult to understand many new things fast. Since you lose understanding, you lose attention and interest. But I found decision. I download example source code and then repeat it. Don't copy paste. Just type on keyboard. I enjoy this. It's a great pleasure to see that something started to work. And understanding that it was you who created it. The fact of coping code save you from errors and bugs. And you learn easily without disasters.

If you go away from your studing it means that you are not in flow. When you feel, that you leave your main task, then try to determine:

is it boring for you now

or opposite you feel anxiety.

If it's boring try to increase dificulty to be on the edge of your skills. If it's anxiety feel free to decrease difficulty of your task to stay in appropriate challenge level.

Well, that is a hard question to answer. Maybe you have ADHD. Okay, maybe not. That is a bit extreme. Maybe you get distracted easily(sounds the same as ADHD, but a psychologist told me it's not the same thing). Or it could be that you find the content boring/cumbersome, and don't want to read it(Being excited about learning something isn't the same as being excited while actually learning. I have this problem too. When the content isn't right for me, my eyes start to glaze over and then there is no chance I'll understand anything.)

what to do about it?

This is an even harder question to answer.

You could force yourself by sheer determination to not slack off.

You could have a rewards/punishments scheme. HabitRPG is something that I find good for this. Just make a Habit for slacking off with a negative button, and click on it every time you slack off. Seeing your character lose HPs would probably spur you to read the articles. tl;dr - Gamify!

It could be that you don't find the articles very interesting. Try looking for others that are more interesting, or find other ways to gain that same knowledge.

Extreme steps - Open all the articles you need to read in different tabs, then disconnect from the internet. More extreme - Employ a friend or a colleague to take away your router/cable/dongle and not give it back till you've read the articles.

Why am I doing this,
The foremost reason is that you are actually thinking that it is not really important or useful for yourself or in other words "You don't really want it".

After spending some time in deep analysis, I figured out the following points:

Case 0: I hadn't had proper breakfast for past many years, and then I used to wonder why does my head feel heavy in office, why do I lack total energy!?! etc. Few days back, just for the heck of it, I took proper (fulfilling) breakfast. I felt extremely astonished at the level of energy and concentration power I felt that day in office.

Case 1: The topics which I was studying were NOT really that important. I was studying them because they were a part of the topic I had scheduled for that day! I had already completed studying the most important parts of the topic, and now I was studying the non-so important parts (just because they were scheduled for that day). In the bottom of my heart I now realize that I knew these topics were not extremely important and I had other important tasks to complete. These topics could wait!

Case 2: The really important topics were difficult to understand, so what I used to do was to study them rigorously for a few days and then leave them (incomplete) completely for next one month (because of other office and personal tasks). Then after one month I used to pick the same (incompletely studied) topics and re-study them all over again since in one month I used to forget what I had studied. The cycle continued with the same topics for months together!

And then I used to wonder why the hell I feel bored and distracted!!

Finally, I don't think I have any disease like ADHD etc. because some days back before picking up a topic I started asking myself - Is this actually important ENOUGH? If I answered yes, only then I would continue. I discovered better concentration and immense satisfaction. Also, I have now vowed never to leave a topic for months together and then start the same topic all over again. I will now commit some time of my every day to the same topic til I complete its important parts thoroughly.

If you're reading books on programming, of course you'll get bored! Programming is meant to be done. Like writing or art, it can only be improved by practice.

It sounds like you've developed a bad habit of slacking off whenever you reach something difficult. At this point it doesn't matter what you block, you're going to end up slacking off somewhere else. Look into changing that habit. Try to minimize the cost of slacking off... either by procrastinating on something useful, limiting the time which you procrastinate (Pomodoro technique), or getting proper sleep instead of wasting it on the Internet.

i think that you should follow the pomodoro technique and see how it goes. for most of the people starting is the problem. when they are in the middle involved in something they will usually do it for ample amount of time.

another thing is why not try to find some video tutorials or try to read a book. find some interesting c++ book suited to your need.

It's because you're impatient, lack discipline and want to hold on to your current perception of the world because you find it pleasurable. This isn't a bad thing! It just means that you have to have very good reasons as to why you should turn your back on your current reality, to embrace another.

You're like the over-weight person that initially gets highly motivated upon the idea of losing weight, but then after a while gives in to the fantastic smells coming out of their local fast food store: "ahh... just one burger today for good luck...". You: "ahh, just a few hours surfing the web for mental junk".

You therefore need to have reasons for sacrificing what you want to do, for what you potentially can do. This is great because it ensures we don't move from one reality to another if there aren't compelling reasons for us to do so.

My personal view is that we do what we do because we're generally biologically motivated to seek that which increases the livingness of our own life, directly or indirectly.

Personally, I think all that productivity stuff and techniques work only when you really have a true desire to do something. So, you should first ask yourself whether you really want to learn all that technical stuff and become an excellent C++ programmer or not. Maybe it's just not your path and you are fooling yourself? There is nothing wrong with that. Better find yourself than do something that you don't like for the rest of your life.

People become true professionals only when they enjoy what they are doing. People do something without any motivation stuff when there are objective factors. A medieval peasant didn't need any motivation to work from dawn till dusk, because he knows if he wouldn't do it then he is dead. You don't need any motivation to wake up and go to work. If you wouldn't then you'll be fired, you wouldn't be able to pay bills and would wake up in the world of troubles. It's all that simple isn't it? You don't need any motivation to visit irrelevant sites isn't it? And that's ok, because you like that and are enjoying the process.

So if you truly want to become an excellent programmer you don't need any motivation to study, because if you wouldn't study you will never become an excellent programmer, especially today when technologies are changing so rapidly.