This is a story of my 2-year-long struggle with an unwanted habit of cracking my neck, which had gotten out of hand around 2013-2015. If it seems to you like it's not a serious problem, consider:
it's a serious health hazard (it seems that repeated strain of the neck area can eventually cause e.g. a stroke),
it made me look socially awkward, bordering on retarded at the peak of intensity,
there are powerful subconscious mechanisms that regulate muscle tension and produce the impulse to stretch, and denying them results in ever growing pressure that eventually breaks your will, or if it doesn't it happens at the slightest lapse in attention,
executing the habit doesn't require any special objects or situations, so there's virtually no way of blocking it externally,
underneath there was a real problem of having stiff muscles in the neck, and clicking/stretching did sometimes help somewhat; so there was a real and powerful incentive gradient to keep on doing it,
at the peak of intensity, I started getting persistent headaches that only stopped when I managed to control the impulse, driving home the point about health hazard,
the tension in the neck, and repeated subconscious attempts to reduce it by moving around, prevented me from falling asleep virtually every day (often for many hours),
it turned out to be harder than almost any other personal problem that I had; it remained undefeated for 2 years while I completely moved past procrastination and social anxiety, figured out the meaning of life, became happy, sorted out my goals, moved to the optimal place on the planet (I now live in Las Palmas de Gran Canaria) etc. etc.
And yes, in the grand scale of things, the habit of cracking the neck is not a serious problem; my own ambitions reach much higher than this. So the whole situation also serves as a reminder of my own weakness, and possibly human weakness in general.
The timeline starts in January 2016 (t=0). At the time, I was living in Japan, and I was after a period of intense self-training and self-educating about rationality.
I fully realized the severity of the problem for the first time. It had been getting worse gradually, and I had become used to it, to the point where I hardly paid any attention to it. But after bringing it to light and contrasting with my goals and what I wanted to become, it was suddenly painfully clear that I could not afford to let things like that keep on dragging me down.
I've spent a long time just standing motionless with the realization, letting it sink in. At the end of this, I had tears in my eyes, and I was as determined as ever to crush the problem with all my force.
I've rotated through most of the useful strategies and rationality techniques that I could think of. They did work, in the sense that with enormous and constant effort I was keeping the lapses at an acceptable if not negligible level. The most success I had with variations on TAPs (trigger-action plans), but I had to keep on strengthening them and adding new ones, because everything that took hold was quickly weakened by the overwhelming subconscious incentive gradient in the opposite direction.
Some patterns have started to emerge, that allowed me to get on by a little bit less of consciously applied pressure. For example, it helped if I did a lot of exercise with my upper body, and made sure to not be stressed at work, and also to not sit down for too long, or ride in cars, or sit in the metro.
All of that (and more) was just barely enough, because at this point I was running out of ideas/rationality techniques, and I've hit diminishing returns on trying the same ones again and again. I've read several books related to rationality, habits, and addictions, looking for fresh ideas, but not much seemed to be helping.
I've had some serious relapses, and in desperation I made a pledge to just keep up constant vigilance for a few days. I've reframed all my activities from "X" to "X AND not moving my neck". For example, instead of "brushing teeth" I was "brushing teeth AND not moving my neck". Then instead of "cycling to work" I was "cycling to work AND not moving my neck". At the end of each activity, I took special care to transition to the next one without a lapse in attention.
Surprisingly, this did work, although it was as tedious and unpleasant as it seems from the description.
For the first time, I've felt the impulses weaken somewhat. I still had lots of trouble falling asleep, and whenever I become stressed, or worked too much, the habit would come back to its original uncontrollable strength, at which point I would panic and push it down with all methods known to me so far.
I've given up on the idea that I could deal with this issue fast, and I've gritted my teeth while estimating at least 1 year left to go.
My habit has morphed into a version that used less visible movements. It was sort of more like squirming than the full movement of bending/stretching my neck. Unfortunately, this didn't make it any easier to deal with, and my body could still get the satisfying click out of it no matter how small the movements looked from the outside.
In the meantime, I've honed several rationality techniques to perfection, and solved most of my short- and medium-term life problems. The seemed strangely easy in comparison. I've also stopped consuming fiction in all forms, with the goal to redirect all of my brain's attention to the bare reality.
I've starting using strict pomodoro timing (a 5 minute break after each 25 minutes) for all my sitting work, and doing exercises in each break. It turned out that standing on my hands was pretty good for neck tension, so I was doing that a lot.
I've reached something like a 50/50 tipping point. I remember thinking that if I continued with approximately the same level of effort, I might just come out of it fine after a year or two; and that if I managed to somehow step up the game, my odds would be much better than that.
I've learned how to massage, and how to use my hands to find tense muscles in other people's bodies with precision. Then I learned how to self-massage, and I learned all the muscles in my own neck.
This was a new superweapon - in 15 to 30 minutes, I could go through all the muscles in my neck, and relax most of them to the point where the pressure was bearable. It would make me able to go around for a few hours feeling almost normal.
In retrospect, I've been systematically missing a few important muscles because I thought they were bones or tendons. An easy mistake, considering they were always as hard a bones, and didn't budge regardless of what I did to them.
A more important mistake here was that I've learned the muscle locations mostly from my own neck, and I wasn't scrupulous enough when massaging other people to cross-check that fresh knowledge.
With daily self-massage, I was finally doing fine. As long as I kept away from cars, and made sure to not be stressed, I didn't have to even pay all that much attention.
The habit has been on a slow but consistent decline for months now. Also, some of my lapses changed from cracking to merely stretching my neck. I was very happy about that, because it seemed from both theory and my own observations that a clear, momentary sensation (like clicking) was a contributor to habit strength.
My friend went to a 10-day vipassana meditation retreat (Goenka school), and described their experiences to me in detail. Combined with having recenly read "Mastering the Core Teachings of the Buddha", it made me acutely curious about what it's like to reach those states. At the first opportunity I've isolated myself from the world, and attempted to replicate.
The attempt was successful, and among other things it yielded a procedure that I could use to consciously "reach" each individual muscle in my body, and control its tension. For the first time, I felt complete relief from tension, and I literally have no words to describe how good it felt. In my private notes, I've described it as "infinite relief and bliss", and I still don't think the phrase does the feeling any sort of justice.
And it wasn't just temporary relief. It turns out that by removing the tension completely from multiple muscles at once, I've forced my brain to update its internal wirings which controlled how to move those muscles, in such a way that the tension would not come back. For example, it turned out that whenever I was using my bicep, my neck would become a little bit more tense, probably because there was some neural connection somewhere that spuriously learned to control both at the same time. And by forcing both of these to be zero at the same time, I've exposed the uselessness of that connection. It died under pressure, with a sort of a fizzling/tingling sensation around both of those regions.
Repeat the above for the whole body, and... my problem was fixed overnight. It was hard to believe at first, and I was expecting a relapse. However, a few weeks later, I am convinced that the solution is stable, and that it was in fact the solution.
(By the way, the method also has tons of other benefits which you totally wouldn't believe. For example, it turns out it can also cure carpal tunnel syndrome, and remove many common cases of back pain, and fix bad posture. And did I mention that it's pleasant and makes you super happy?)
I've learned a lot while trying to deal with this problem, though most of it is the kind of knowledge that is impossible to transfer in words, if at all. Here are some of the more explainable lessons:
finding a good solution that hits at the root of a problem can easily make a 1000x difference in effectiveness, even in a personal life problem without any force amplification,
all the power of abstract thinking ultimately comes from connecting it to the body,
the same applies to applied rationality techniques,
being obsessed with rationality techniques can slow you down overall even though the techniques work,
you become as strong as the enemies you pick for yourself,
trying new things in life is such a good idea, that I underestimated it even while doing it and knowing all along that it's a good idea,
prompting your friends for detailed descriptions of their subjective experiences can save you a whole lot of work,
many commonly experienced issues with the body have causes in the brain,
after you deal with some problem completely, you tend to forget how hard it was, or for that matter become unable to imagine what it's like to have it,
tangentially related but so important I have to mention it: non-fake meditation can really make people sustainably happy, and this is not a trick.