Last year, in the first summer of the pandemic, I listened to James Clear's Atomic Habits on audiobook during my workouts. I found the ideas discussed within to be fascinating and their application to be more intriguing. Of all of the ideas discussed in the book, the most well known is probably the idea of habit chaining. The idea here is that it is near impossible to take on a bunch of new habits simultaneously, especially when they are all disconnected. Instead, it is easier to "attach" a habit to an existing one. If you want to write every morning, and you already have the habit of waking up and making a cup of coffee, you can try chaining writing onto the existing habit. Instead of trying to "write a blog post everyday", aim to "write for 10 minutes after making coffee". This is a smaller habit that builds up your existing system. There is lower friction when trying to start the new task, since you are riding on the momentum of your existing habit. With coffee in hand, you are already prepped for and 10 minutes of writing away from completing the task. Once you are writing everyday, it is easy to increase the amount of time spent writing since you already have the habit of starting.
Remove the need for motivation and instead make what you want to do easy, and what you don't want to do hard. Its easier to eat healthy if you only have healthy foods in the house; it is hard to east unhealthy if you only have healthy foods in the house. This resonates with me the most since I tend to over-perceive the amount of friction involved in tasks.
When not part of a habit, simple tasks can become daunting and take me a while to decide to do. I find that by trying to see the true level of friction, I can "motivate" myself to do these tasks much easier. Instead of being worried about how complicated a new feature may be and how long it will take to implement and all of the potential bugs that may be introduced: just start. Version control is a great tool which allows us to undo or fix changes with ease.
For me, habits are best built by lowering the cognitive effort necessary to start them, increasing the friction of the opposite task, and spending what cognitive effort is necessary to analyze the true friction of the task. It is less about finding the motivation than it is about overcoming this "resistance" towards all tasks. Given these traits, I seem to function best by simplifying the tools and systems around me. I've found that "Keep It Simple, Stupid" tends to work for me.