Editor's Note: (This essay is part of a column called The Wisdom Project by David Allan, editorial director of CNN Health and Wellness. The series is on applying to one's life the wisdom and philosophy found everywhere, from ancient texts to pop culture. You can follow David at @davidgallan. Don't miss another Wisdom Project column; subscribe here.)
(CNN) Odds are, you are trying to break a bad habit or institute a good one right now. As a species, we are impressively committed to self-improvement, and most of us believe that habits are an effective means to that end.
Habits -- actions performed with little conscious thought and often unwittingly triggered by external cues -- are powerful influences on behavior and can be our greatest allies for positive change. But because they are so difficult to break, habits are also frequent saboteurs of personal progress.
"Habit is a good servant but a bad master" is how author Gretchen Rubin summed it up in her book "Better Than Before: Mastering the Habit of Our Everyday Lives." Hers was one of three recent books I read back-to-back on the subject of habit formation; the others were Charles Duhigg's "The Power of Habit" and Jeremy Dean's "Making Habits, Breaking Habits." Together, they helped me understand more deeply the importance of habit control, how to choose a habit to begin or end, and the mechanics of sticking with it.
The first thing to know, each book explained, is that a lot of our daily actions are so rote, they are automatic. "All our life ... is but a mass of habits," philosopher and psychologist William James wrote, though a 2006 study put the amount of habitual daily action at 40%. Still, that's a lot of mindless behavior.
It's helpful that we don't need to think about how or when to drink coffee, brush our teeth or drive to work. If we did, we'd waste so much time rethinking or learning those tasks, we'd get little else done.
The whole trick is to get habits to work for you, not against you. Self-control is a limited resource, Dean explains, so a good habit means not having to exert effort every time you need to do the right thing.
The first thing to identify for yourself is the habit you want to work on, whether it's starting a new (good) one or ending an old (bad) one. That's a minor distinction, by the way. Eating healthier is eating less junk. Exercising more is being less sedentary. One is often the inverse of another.
This step requires some honest self-evaluation. What is not working in your life? What personality flaws are holding you back? Where is there room to do better?
We know what many of the most common areas of improvement are, at least when it comes to making resolutions. People want to lose weight, eat better, be more mindful, spend money more wisely, sleep better and improve relationships. By eliminating bad habits and starting new ones, you can succeed in most of these areas.
One helpful checklist frequently used for goal-setting is the acronym SMART, created by economic theorist Peter Drucker. Effective resolutions, research has shown, are Specific, Measurable, Achievable, Relevant and Time-bound.
Before finishing the first book (Dean's, which is the most prescriptive and research- and science-based), I decided on two habits to work on myself. The first was to be more present and mindful with my kids. The second was to stop seeking out and consuming free, non-nutritious food at work. One was a good habit to start, the other a bad habit to quit.
Rubin, who approaches the topic personally and looks for specific techniques that work for her, recommends starting a habit at the same time as a big turning point such as pregnancy, marriage, a medical diagnosis, a family death, an anniversary, a long trip or a new year.
The consensus among these books is that the most effective way to adopt a habit is to replace a bad one with a better one. Dean's metaphor is to think of habits as well-worn rivers of action that flow out of the predictable path of your routine. Often, the most effective way to stop it flowing in harmful directions is not by damming it but by diverting it. For example, many people stop smoking by chewing gum.
The point is that bad habits die hard, and as with riding a bike, your brain never stops learning how to do them.
So it's easier to think about any habit formation, even new "good" ones, in terms of replacing unwanted behavior. That made sense for my snacking at work. I started buying healthy yet still delicious snacks to keep there: yogurt instead of morning doughnuts, dried papaya instead of chocolate, sweetened rice cakes instead of stale leftover doughnuts. A supply of healthy snack options kept me on a new course of action that largely followed the old eating habit pattern.
To be more mindful with my kids, I needed to avoid the opposite behaviors, such as checking my work phone or planning activities while with them so I could focus on their needs and thoughts.
Duhigg explains that habit "reversal therapy" is a legitimate technique used for things like tics and obsessive-compulsive disorder, as well as predilections such as gambling, smoking and bed-wetting.
It's important to make a distinction between a bad habit and addiction, however, even if the behaviors seem to overlap. Addiction requires greater intervention than habit hacking.
Dean describes the hallmarks of addiction as not being in control and not being aware of time/energy spent on the behavior. People with addictions are preoccupied with soothing a craving and needing more and more to get the same effect, as well as suffering withdrawal without it. Unlike bad habits, addictions eat away at important activities such as relationships and work. They tend to be an escape from normal life and are often hidden from others.
We like to think we have free will in every situation, but many of our actions are predictably triggered by external situations. And if those events are part of your daily or weekly routine, our Pavlovian tendencies become ingrained. Pajamas are on: Time to floss and brush. Cup of coffee in hand: Time to dunk a doughnut. Beer finished: Let's have a cigarette. But triggers can also be feelings, such as stress or boredom.
Being aware of your triggers is the first step in learning how to keep them from sabotaging you and make them work for you instead. Is there a certain time of day or task when you crave a treat? What do you always do when you feel stress (go for a run or go for a drink)? What is your bedtime ritual to let your brain know it's time to sleep?
You can help create conditions to avoid triggers, but not fully. If the trigger is deeply ingrained, maybe going back years, it will sabotage you when your guard is down. For these situations, you need contingencies. Dean calls them "If ... then ..." plans. When trigger X happens, I won't do bad habit Y, as I usually do, but I will replace it with much healthier Z action.
My favorite example of effective trigger planning is Starbucks, a company that puts a higher premium on customer service than on the (habit-fueled) products it sells. Duhigg, who prefers Malcom Gladwell-esque case studies for his book, explains that the chain's baristas are well trained on what to do when something goes wrong, such as a messed-up order that angers a customer. Rather than improvise or consider options in those moments, they practice rapid responses -- such as apologizing and offering a replacement drink for free -- until it's second nature.
You likewise need to have a plan for when a strong, perhaps rare, trigger threatens your winning habit streak. Ordinarily, I can avoid eating cupcakes at work, but what's my plan when I've skipped lunch, it's late afternoon, I have some onerous task that would be made more enjoyable with a treat, and the cupcake is filled with peanut butter?
According to one study cited by Dean and Rubin, it takes 66 days of doing something to convert it to a habit. However, that number varies depending on the person and activity. For example, it took those participating in the study less than 20 days to habitualize drinking a glass of water every day, 60 days for eating fruit with lunch and more then 84 days to make 50 sit-ups a daily habit. Some habits could take a year to form. But 66 days is a good target.
I avoided work snacking and improved my capacity for parental mindfulness for 66 days straight. Or rather, I diligently monitored these habits over 66 days, because another pillar of successful habit formation is tracking. Even something as subjective as "be more present with my kids" can be numerically self-scored every evening.
And another pro tip of habit-making (or replacing) is accountability. Tell other people. Share on social media (unless social media is the habit you're changing). Ask your friends and family to support the effort. Getting others involved, or even just aware, makes it harder for you to give it up. And others' support can be inspiring and helpful.
Unlike tracking and accountability, incentives are a debatable strategy. Duhigg believes that they are central to the exercise, because habits are reward-based. Rubin concludes that external rewards take you away from internalizing the right motivation behind your new habit.
For me, rewards have been pivotal. Five years ago, I took off 25 pounds and have kept it off by establishing an elaborate reward system.
If you do treat yourself for keeping a habit, make sure it's not self-defeating. You may not want to reward, say, avoiding doughnuts by indulging in a half-gallon of ice cream.
At the end of 66 days, I stopped tracking my new habits and found that they had largely stuck. When I came home from work, seeing the faces of my daughters was the trigger to remind me to give them my undivided focus. I rarely (instead of automatically) checked my phone for work updates, and I put off my personal agenda items until after bedtime. And I replaced workplace snacking with my private stash of more nutritious snacks: same trigger, but alternate behavior at much fewer calories.
The real test though, is time. More than six months have passed since my 66 days of daily tracking, and I'm still doing a solid job on mindful parenting. I have occasionally slipped on the work snacking, though. I wouldn't say I've failed at it, because I'm building up a new long-term habit muscle for healthy snacking, and I ate a lot less junk food than I would have without trying.
Rubin would call it "stumbling," and we should accept that it happens in the habit game. Stumbling is not a reason to quit trying.
You may want to read one of the habit books, too. The three overlap and support each other, but my personal preference was for Rubin's, largely because I feel a kinship with her love of life-hacking, introspection and applied psychology.
She's the author of the bestselling "The Happiness Project" and wrote this new book, she explained, after concluding that habits were the best means to actually achieve happiness.
But I'll give the last word to the wise Ben Franklin, whose advice would make all these books unnecessary. " 'Tis easier to prevent bad habits than to break them," he wrote.