I did a pack a day for about 2.5-3 years. It's kind of funny, actually; I worked out and ran very strenuously during that same period of time, in stark contradiction with my smoking. :)

I tried quitting cold turkey several times, and it just didn't work. But I am not nearly as disciplined and goal-focused as I think many HNers are. So, I'll describe what I see as a "realistic" path for quitting that incorporates the common fallabilities of stimulant-prone, somewhat indolent nerds with plenty of bad habits, rather than idealistic supermen full of improbable willpower and an obsessive interest in veganism, yoga, body purification, etc.

To start with, meditate on the fact that 99% of the cigarettes you smoke are really "maintenance" cigarettes; there is no buzz, there is no genuinely pleasurable "high." You had that when you first started smoking, and that's why you kept smoking, but that feeling long went away. The only time you're going to get a buzz anymore - if you're lucky - is with your first cigarette in the morning. The rest of the time, you only think you're getting "higher"; in fact, your nicotine levels have just dropped, and all you're doing is replacing them back to "normal" level in order to avoid the irritability of withdrawal. Focus intensely on the pointlessness of this for a while, and decide you should quit if for no other reason than that alone.

I don't think I could've done it without the nicotine gum. The gum really helped. The delivery format was key; I tried patches first, but they neither provide that feeling that something is going on orally that smokers want, nor deliver nicotine fast enough in sufficient volumes. When you chew gum, it hits you 30 seconds in, so you satisfy the craving _now_, not in 45 minutes.

Like many technocratic novelty seekers, I tried the e-cigarettes, which were neat but proved to be a basically useless gimmick that didn't solve the problem to my satisfaction. They also broke too fast to function as a viable replacement; these products are of very terrible quality. The other thing about e-cigarettes is that there's nothing to stop you from puffing on them all day inside, which is exactly what I did. That sort of misses the point, and has plenty of unpleasant side effects. Besides, I'm sceptical that breathing in whatever is in them, however allegedly carcinogen-free and undeniably tar-free it is, is an asset to one's health.

I did continue chewing the (4 mg) gum for a lot longer than their 12-week instruction book suggests (probably about 9 months), but eventually got off of it too. I don't think it's because the gum is really particularly addictive; I'm just very easily given to form new consumption habits. It's really is a lot easier than quitting cigarettes because it doesn't have quite the same cognitive feedback, even if it is nicotine, although you do need to have a firm commitment to quitting it as well, and keep in the forefront of your mind that it is a transition tool.

Also, 4 mg gum is designed for people who do 25+ cigarettes a day, while the 2 mg version is for people who do a pack or less. Because I did slightly less than a pack a day, the 4 mg version was actually a pretty high - and sometimes overwhelming - dose. It dehydrated me and irritated my bowels. This turned out to actually be a good thing because it provides negative feedback that incentivises quitting the gum.

As I said, the gum is not nearly as addictive as some say it is, at least, not if you really hit it hard. It's too much of a "good" thing. Call it a little nicotine aversion therapy. I suppose this is an unusual approach and may be not for everyone, since the idea is to ween yourself off nicotine by cutting back. I kind of did the opposite and lost my taste for nicotine by blasting myself with it in this manner. I don't know that this is the best approach in general, especially if you don't tolerate the side effects of gum overuse well, but since your question is about how _I_ quit smoking, I tell you what worked for me.

The strongest pressure for me turned out to be social; even with the gum, the other thing that probably made the single biggest difference was going hermit for about ~2 months and not really seeing most of my close friends, almost all of whom smoke -- some only "socially", but nevertheless, the point is that smoking is what we'd do when we hung out. Smoking with them was just force of habit at that point, not really nicotine cravings per se. It has an intensely psychological dynamic.

I won't say I haven't had a single cigarette during this intervening time. Of course I've had some while out drinking with friends. But it's been more than a year since I properly quit and find that I am now at the point where cigarettes slightly disgust me (in a non-inebriated context) and under no circumstances do I find myself wanting to continue smoking on my own after I get back home. I don't even know why I do it once in a while with them; it's stupid. It's definitely not because I any longer derive any sort of perceptible satisfaction in breathing in smoke, especially since it irritates your respiratory tract a lot more if you only do it very sporadically. It's social inertia, I suppose - maybe a little bit of that feeling of solidarity that all smokers commune in now that it's been relegated to the margins as a seedy, non-mainstream habit. I'm not mentioning it to discourage you, but only in keeping with my claim to provide a "realistic" assessment above. All other things being equal, cultivating non-smoking friends makes things easier, but one doesn't generally choose one's friends that way.

An important thing to remember is that the rituals, habits and experiences associated with a smoke break should probably be preserved, just without the smoking. If you give up those too, you will find yourself unnecessarily miserable and feeling like you gave up far more than you have to. There is a strong point of view out there that you should jettison habits associated with smoking because they act as "triggers" and impede positive reinforcement, but personally, this was not my experience. It's far more important to find new ways and angles from which to enjoy the same stuff you used to do with a cigarette without a cigarette (which, after all, is probably a huge range of stuff) than to try to bend and contort your lifestyle and behaviour in improbable, contrived ways!

So, if you liked to drink and smoke, keep drinking, just don't smoke. If you liked to take a break with a cigarette and a cup of coffee several times a day, keep taking a break with the coffee. If you like going downstairs on smoke breaks with your coworkers because of the feeling of taking a break, keep doing that, but without the smoking, though be weary of the danger of putting yourself in situations where everyone else is smoking and you're not; if you can find some other way to take a "break" from work, I would.

In general, the theme here is that you should basically continue the habits you had in connection with smoking, whether they're good or "bad" habits, because otherwise you'll crave those experiences too, and it'll make things that much worse. It is likely to seriously jeopardise the sustainability of your quitting project.

Invent new habits, and new rituals that you can do without smoking, too. While I was on the gum, I invented a new way of taking a "break" and checking out of the drudgery of the universe; instead of going out on the balcony and surveying the world, cigarette in hand, I'd pop in a piece of gum and play BZflag for a half hour. It seems kind of trivial, is certainly not productive, and, well, nobody said the gum is really good for me either, but it was soon a ritual I looked forward to in place of a smoke break. It's those kinds of little reinforcement modifications that make all the difference. They new kinds of rituals furnish new qualia to associate with them, and new junctures in the passing of time to look forward to.

I still sit outside on my balcony and code, just with a cup of coffee or tea more commonly in hand now, not with cigarettes. However, I got a new, much improved outdoor table set, so in this tiny but nevertheless important way, I feel like I've moved on to a newer, better era in my life; it's a little treat for not smoking outside anymore. You need those treats.

Notably, nicotine impedes absorbtion of caffeine, meaning you need more caffeine to get the same effect as a nonsmoker. Giving it up has made me appreciate my coffee a lot more.

Also, periodically reading through http://www.whyquit.com and looking at all those charts that tell you what happens 1, 2, 12, 24, 72 hours, X days, X years, after you quit is also a great inspiration to keep at it.

One last thing worth mentioning, in which I will take a page from whyquit.com's sanctimonious narrative, is that you should not, under any circumstances, fall into the trap of believing that you're going to quit by simply cutting down. For most people, including myself, attempts to quit by going down to "only 3 a day" or some similarly inane idea will result in complete futility. You're not doing yourself any favours at all with that approach because by taking that route, you're saddling yourself with all the misery of magnified withdrawal because you're smoking less, while not doing anything that's going to make that withdrawal go away. In this suggestion - however well-intentioned - lies madness and oblivion. Don't do it.