> I'd say replacing negative habits with positive ones is a better long term strategy.
If the reason for forming the bad habit was that what you're susposed to do is dreadful i.e. not positive, yes, a positive one must be found.
But a positive activity doesn't feel good from the start, that's why you need avoidance. You need to get over the hump. When you're forming a new habit, the natural tendency is to cheat when you're susposed to do the new to-be habit, and do the old thing instead. Instead of working, browsing HN or youtube. Instead of going out for a run, eating cookies. Tell yourself to not do that -- avoid it -- and force yourself to do the new activity until it becomes self-sustaining.
And my experience is that the idea you can just "tell yourself to avoid it" is basically baloney.
Replacement on the other hand... That seems to genuinely work. You just have to pick a replacement that isn't dreadful.
---
My experience: I gained ~90lbs over 12 years. I didn't over eat horribly, but I also didn't exercise much, and my job keeps me stationary.
Instead of trying to not eat (dieting - which I have tried several times over those 12 years, never with long term success) this last time I took a different approach: I picked the easiest, most enjoyable, exercise I could think of and added that.
That exercise turned out to be biking - but not even just biking, because biking is still pretty hard when you're 90lbs overweight and I'd had other exercise attempts fail because they were unpleasant (ex: jogging). E-biking, though... that's pretty easy and nice.
So an e-bike it was. It's totally cheating with a bike: it makes biking feel relaxing, tackles the hills with ease, always gives you a cooling breeze - basically: it's just enjoyable and refreshing.
12.5 months later and I'm down 50 lbs. It turns out that I didn't need some dreadful, healthy, righteous activity to replace the bad ones. I just needed something small and enjoyable I could do as an alternative. Something that wouldn't dig the hole deeper.
I set absolutely zero rules around dieting/eating. I didn't actively avoid anything at all. I just added a small enjoyable activity with very low activation cost.
Essentially: It's hard to avoid a bad (but pleasurable) activity if the alternative is boredom or chores (ex: jogging). It's easy to avoid it by giving yourself a different pleasurable activity to pick.
Avoidance rarely works i think. I'd say replacing negative habits with positive ones is a better long term strategy.
Can recommend the App Habitica for this, free and open source. There are Android and iOS clients for it. Makes habits dailies and todos more fun.
Not affiliated, only fixed an accessibility issue once.
https://habitica.com