The all-or-nothing story
You start something small: a short walk, ten minutes of guitar, a page of reading. It goes well for a few days. Then one day it does not happen, and a quiet voice says, 'Well, that's ruined it.'
That voice sounds sure of itself, but it is mostly a feeling, not a fact.
What researchers found
A well-known study from University College London followed people as they tried to turn a new behaviour into an automatic habit. A later review of that work reports that people varied a lot in how long it took, with an average of around 66 days. It also reports that missing a single day did not seriously get in the way of forming the habit, and that the habit kept building afterwards.
So a gap of one day is not the end of the story. The study does not say that every gap is harmless, or that the habit is easy. It says a slip is not the same as a failure.
Try this
Decide now what you will do after a missed day: 'The next day, I do the smallest version.' Make it so small that it feels almost silly, such as one stretch, one sentence or one line of code.
Then notice: when you restart quickly, does the habit feel more like yours, or more like a test you can fail? There is no right answer. It is just worth noticing.

