What I've understood about habits
I started to read atomic habits. And I've learned some things from the book.
The brain sometime face some recurrent problems. At first some great thinking occurs. Which is energy-costly for the brain. When facing the same problem multiple times, the brain start to learn.
That's when the brain develop a habit for the problem. The goal being to use as little energy as possible to solve it.
How a habit is formed
A habit have to be repeated in order to be automatic. Your brain have to face the same problem multiple times to understand that it's important. At first you will make errors and lose some time. Then your brain will learn and go right to the solution.
You can see habits as a feedback loop. There are four stages: Cue, Craving, Response, Reward. These stages form an endless cycle that scan our environment. It make us adapt to the world trough our habits.
How to change our habits
There is a law based on each part of the feedback loop. These four laws are the following. Make it obvious, make it attractive, make it easy and make it satisfying.
If you want to create a new habit simply use the laws. Make the cue obvious. Make the craving strong to make the habit attractive. Make the response easy. Make the reward satisfying to encourage the behavior.
And to destroy a habit you need to simply do the contrary. Make the cue invisible. Make the habit unwanted make it unattractive. Make the response hard. Make the reward disgusting to prevent the behavior.
This is what I've learned about habit until now.