≡ Menu

This is How to Program Yourself for Success

in Habits

Do you know the feeling?

You’ve set your goals. You know what you should do to achieve them. But for some reason, you can’t get yourself to do what needs to get done.

If you know what that’s like, you’re not alone. Humans have struggled with this problem for centuries.

In fact, philosophers all the way back to Plato even have their word for it.

The called it “akrasia,” and it can be defined as “a lack of self-control or the state of acting against one’s better judgment.” 1

But just because the issue is timeless, that doesn’t mean it’s hopeless.

It turns out that this ancient problem has a modern solution, and that solution is:


Professor Yuval Noah Harari is a historian, philosopher, and best-selling author. In his book, Homo Deus2, he writes:

Algorithm’ is arguably the single most important concept in our world. If we want to understand our life and our future, we should make every effort to understand what an algorithm is, and how algorithms are connected with emotions.

An algorithm is “a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.3

Have you ever wondered how a Tesla can drive itself? The answer is algorithms — millions of them.

But there are also more relatable, everyday occurrences of algorithms. Each time you bake a cake, for example, the recipe you use is an algorithm.

And, as psychologists have found, you can also use algorithms to program yourself for success.

If-Then Planning

Psychology professor Peter Gollwitzer focuses his research on how goals and plans affect cognitions, emotions, and behaviors.

He has created a strategy called “if-then planning.” 4 To use it, all you have to do is fill out this simple formula:

If [situation] – Then I will [behavior].

The beauty of if-then planning is that it forces you to turn vague intentions into clear algorithms.

“I want to eat healthier” becomes “If I’m buying lunch, then I will order a salad.”

It sounds ridiculously simple, but don’t let that fool you. More than 200 scientific studies show that if-then planners are about 300% more likely to achieve their goals.

The reason it works so exceptionally well, according to psychologist Heidi Grant Halvorson, is that 5:

Contingencies are built into our neurological wiring. Humans are very good at encoding information in “If X, then Y” terms, and using those connections (often unconsciously) to guide their behavior.

In other words: Much like computers, our minds respond very well to algorithms.

Program Yourself for Success

I warmly encourage you to try this right now: Think about the goals you want to achieve, and then write down the specific if-then plans that will get you there. Here are some examples:

“I want to be healthier.”

  • If I’m at work, then I’ll take the stairs.
  • If it’s my afternoon break, then I’ll have a fruit.
  • If it’s 8 pm, then I’ll run my “power down” ritual and get ready for bed.

“I want to be more productive.”

  • If I arrive at work, then I’ll do two hours of deep work.
  • If it’s before noon, then I’ll have my email turned off.
  • If it’s ten minutes left of my workday, then I’ll organize my to-do list for tomorrow.

“I want to improve my relationships.”

  • If I finish my morning cup of coffee, then I’ll meditate for ten minutes.
  • If I come home from work, then I’ll share the best thing that happened to me that day.
  • If someone talks, then I’ll let them finish before I speak.

Instead of relying on vague intentions, purposely install the daily habits that will lead you to your goals. Think of yourself as a robot and the if-then plans as the algorithms you use to program yourself.

It sounds silly, I know, but it works extremely well. 🙂

Thank You for Reading!

Finally, to make sure your if-then plans are effective, I highly recommend you continuously track, review, and tweak them.

The best tool I know of to do that is a habit calendar.

If you want, you can download a free habit calendar here and read step-by-step instructions for how to use it here.

Have fun with your algorithms! I’m sure you’ll find them extremely helpful.


  1. Akrasia
  2. Homo Deus: A Brief History of Tomorrow
  3. Algorithm
  4. Implementation Intention
  5. Get Your Team to Do What It Says It’s Going to Do

Hat tip to Sarah Moore for creating the habit calendar in this article!