Over the span of years I tried many different methods, I kept going back to them, but I still had the same issues. The only thing that really worked and works for me is using spaced repetition programs.
I don’t know exactly what it is. Maybe it's the attention programming, seeing the numbers go down, the fact I chunk micro repetitions in between other activities, or maybe it’s all of these reasons. But it works. It really does.
Spaced repetition is not just for learning as I've found.
I personally over commit to too many things at once and then the pressure keeps me highly motivated. And then when I complete something I get a little dopamine hit or something - some kind of buzz.
I also just need to always have a clock or watch nearby so I can keep track of how much time has passed because otherwise I just don’t have any sense of time passing.
And also - regular exercise seems to be quite helpful too.
https://www.indiehackers.com/post/the-power-technique-a-stra...
However for the most part I just ride the waves. I'd rather work full steam towards a secondary objective than at half power on the most important thing. I learned to harness hyperfocus instead of fighting it.
This suits the nature of my work. It's a website. It stays online and keeps generating income. It's a lot more forgiving than a development job with specific deliverables. So long as I'm generally improving the website, I'm doing fine. In some cases, these side projects proved wildly successful.
Sometimes magic is just someone spending more time on something than anyone else might reasonably expect. Following my impulses leads to a lot of interesting magic.
At a lower level, I try to avoid git branches. I work on master, so I only have one or two things going at any given time. I don't start two massive article rewrites at once, because it makes staging too confusing.
At a business level, I taught everyone I work with that I work slowly, and not to expect anything on a specific date. Things get done when they get done. The biggest challenge is to avoid promising anything when I'm in my "excited about stuff" phase. It helps that I'm paid per lead, so if they get nothing from me, they pay nothing.
* Prolonged periods of extreme boredom (doing nothing, as in sitting down and not even thinking about much) to reset the dopamine baseline. Stumbled onto this accidentally after a 5-day flu when I was in a heavy brain fog and could not even watch sitcoms. Came out of it into a prolonged productive and happy streak.
* Actively watching for and limiting over-stimulating activities (this includes not day-dreaming too much) as these cause the subsequent drop in the dopamine baseline. I have learned to notice that jittery brain-high and to associate negatively with it (easier to stop when you relate negatively to the feeling).
* Most recent, but powerful addition: not expecting to want to do the tasks or for work to feel good. When your brain craves dopamine, and when it's so readily available in the world of endless feeds, your to-do list has a tough time competing. Instead I take a deep breath or two, bring myself into a melancholic and gloomy-weather like mood and tell myself I have a few hours of difficult stuff ahead of me. I learned to enjoy it in a dark way like one enjoys powering through a hard workout. Much more reliable than bringing myself to become excited about whatever I dread doing.
* Cliche, but breaking tasks down into the tiniest bits. And I mean the tiniest. Any coding task usually starts with "create a git branch". It takes almost as much time to write this phrase down as to create the branch, but my brain does not fight the planning phase as it does the doing phase. But once I have my task planned out, the first step is so ridiculously easy, I just fall into it.