We all do things that we know are bad for us or for others, even when we know better. Think of the alcoholic that walks by a bar on the way to work, or the mother who yells at her kids when she wants them to clean up their room. Sometimes it feels like we are doomed to repeat over and over patterns of behavior that just don’t work.

But we can learn to be more effective at making change in our lives if we understand better the workings of our minds, argues Kyra Bobinet in her new book, Well Designed Life: 10 Lessons in Brain Science & Design Thinking for a Mindful, Healthy, & Purposeful Life. Bobinet, an award-winning health innovator, draws upon her knowledge of design, neuroscience, and compassion to provide a pathway toward positive change.

According to Bobinet, one important thing that design people know (that many of the rest of us don’t) is that it’s not enough to make a plan for changing some aspect of your behavior and then expecting you’ll stick to it. Designing means you should anticipate failure and, rather than giving up, use it to adjust your design as you go along.

“We can change and improve any part of our lives through constant, unrelenting iteration,” writes Bobinet. “Iteration in this case means that we try and try and tweak and tweak the design of our behavior changes until we transcend.”

In other words, if you are trying to give up a vice, you probably won’t succeed if you “just say no.” You’ll have to figure out what makes it hard to quit—perhaps you associate your vice with feelings of warmth or friendship or some other pleasure—and revise your plan to address those needs. Change is not a matter of willpower; it’s a matter of recognizing what gets in the way and planning for inevitable stumbles.

Bobinet argues that our neural processes contribute to our stubbornness around change. She explains how our “fast” brain often makes quick decisions for us at an unconscious level, tying perceptual information coming in from our environment to our trove of past memories, while our “slow” brain is more ponderous, using reason and reflection to make decisions. To redesign behavior, you may need to find methods for slowing down the fast brain (i.e. using slow breathing at the end of a hard work day) or for speeding up the slow brain (i.e. putting inconsequential daily decisions, such as what route to take to work, on autopilot), so that they don’t end up sabotaging our plans for change.

When redesigning your life, it’s critical to have compassion for yourself, writes Bobinet, especially compassion for your emotional reactions to imperfections and the inability to get it right the first time. If we can use compassionate self-talk to calm troubling emotions, we are more likely to make plans based on wisdom and understanding, rather than shame at not being “perfect.”

“As a designer of your life, you are not designing for perfection; you are designing for healing, for improvement, for empowerment,” she writes. Cultivating self-compassion, through mindfulness meditation, for example, can make it easier for us to make these distinctions, she argues.

Bobinet’s book is full of stories of people who’ve struggled with different problems, such as overeating and alcoholism. In each case, she goes over what can get in the way of making change—in particular, aspects of our self-identity that may unconsciously block our best intentions. For example, if part of our identity is connected to being a rebel, you can count on rebellion setting in sometime down the road to change. The key is to plan for that and, slowly but surely, redirect behavior in ways that meet the needs of that inner rebel without giving in.

We also must consider our environment, which, research shows, clearly impacts behavior. Surrounding ourselves with supportive people can make it easier to work toward change, and the opposite is also true. Bobinet shares stories of her working in the juvenile justice system and observing how newly released young people earnestly wanting to change their lives quickly return to their past criminal ways—not because of a lack of conviction, but because of overwhelming environmental influences. She found that by helping juvenile delinquents to reduce their shame, giving them a sense of community, and pointing out practical ways to redesign their future, she was able to reduce recidivism rates in one probation program from 87 to 25 percent.

Success like that is one reason to pay attention to Bobinet; the other is the research she draws upon to explain the workings of our minds. When we don’t understand how change works—how our brains process information, what internal and external circumstances motivate us, what gets in our way, and how to design for that—we may be dooming ourselves to failure and feeling helpless and hopeless.

Instead, we can have compassion for ourselves, use neuroscience to our advantage, and design for more happiness, health, and well-being.

“Design gives us the excuse we need to shush our self-judgment, the ability to muster our optimism to try again, and the creativity to iterate our way right into the results we need to change our lives for the better,” writes Bobinet.