Keep a book as your journal. I use a hardcover school exercise book to keep track of my projects with sub-items for features, bug fixes etc. It's also a doodle book.
I note dates when I think of an idea, or when I begin coding them, the reasons for the choice of tools and of general progress. Whenever I feel exhausted/bored or completely disillusioned by anything I'm currently working on, I leave it, I walk away from it. But I make sure I write down my reasons for choosing to leave the work and, most importantly, my emotional state around that decision. I journal as I think.
Many days later, sometimes years, I simply read my journal, paging though and recollecting my thoughts and emotional states. Many times I have found that things have changed in the intervening time such as my workload, improved skills, better understanding of the problem domain, or general state of energy. Many times I have resumed abandoned projects/features to completion.
Thank you, I generally takes smaller breaks, I drink lots of coffee too. I am also taking proper sleep. But the thing is that I am not able to concentrate. If I see some motivational videos, it helps me to stay motivated but when I try to write codes I start yawning and my mind shift to some other works.
Some people can go mad scientist/prolific hacker and work without a list, more power to them. You need a list.
To start, Even smaller items than normal (open text editor, start server, open first file needed, add first interface item if UI, add first Model property, add first function).
You are making progress with each item you knock off, that is a fact.
There is no time for the mind to wander when you need to just knock off the next small item.
You do it and then you can do what you want -- but your mind will probably want another dopamine hit of knocking something off.
So you will do another item.
Once you can do the extremely small items, add actual features (or parts of them) to the list. Because now you can handle the small stuff. Now you are where people work. They usually work in sprints of a small list of tasks.
..
Your mind is probably wandering because of indecision. Take the decisions out of the process for now by breaking down the task.
Important: items on the list should include real decisions to make (architectural, strategy of something, etc).
The result of those tasks will probably result in adding new items to your list.
Thank you so much for creating this, it solves one of the biggest problem that I face everyday while lodging sales online. Now I can include this js file in my php file to convert the amount easily. Thanks bro :)
To clarify, I’m actually not all that interested in the day-to-day of national politics - I campaign and vote for the candidates that I support, but I largely don’t care about the specific ways in which Trump is embarrassing the country at any given time. My impression is that news.google.com is a good source for that sort of thing, however.