Sub topic 2
The Three Parts of the Habit Loop
This chapter assumes you know what a habit is: a behavior you repeat so often that it starts with little thought. It also assumes you are comfortable reading short Python snippets. No programming is needed to follow the ideas.
The working model
A habit can be described as a loop with three parts:
- Cue: something that triggers the behavior, such as a time, a place, or an event.
- Routine: the behavior itself.
- Reward: the result you get, which makes the loop worth repeating.
The three parts run in order. The cue starts the routine, the routine produces the reward, and the reward makes the cue more likely to trigger the same routine next time.
A worked example
Take a common habit: after finishing your morning coffee, you walk around the block.
- Cue: you finish your morning coffee.
- Routine: you walk around the block.
- Reward: a few minutes of fresh air.
Writing the loop as three named fields helps you check that a plan is complete. If one field is vague, the habit is unlikely to run on its own.
from dataclasses import dataclass
@dataclass
class HabitLoop:
cue: str
routine: str
reward: str
def describe(self) -> str:
return f"When {self.cue}, I {self.routine}, so that I get {self.reward}."
walk = HabitLoop(
cue="I finish my morning coffee",
routine="walk around the block",
reward="a few minutes of fresh air",
)
print(walk.describe())This prints:
When I finish my morning coffee, I walk around the block, so that I get a few minutes of fresh air.Common errors when reading a loop
Most mistakes come from describing one part too loosely.
| Problem | Example | Better version |
|---|---|---|
| Vague cue | "In the morning" | "I finish my morning coffee" |
| Routine that is a goal | "Get fit" | "Walk around the block" |
| Missing reward | "I just do it" | "A few minutes of fresh air" |
| Reward that is far away | "Better health in a year" | "A short break right now" |
A cue should be something you can notice. A routine should be an action you could film. A reward should be something you feel soon after the routine, because a delayed reward is weak at holding the loop together.
Why the order matters
The loop explains why a habit can run without much deliberate choice. Once the cue and routine are linked by repeated rewards, the cue alone starts the behavior. Later chapters cover each part in detail, including how a craving connects cue and reward. For now, practice splitting a behavior into the three parts.
Exercise
You reach for your phone every time you get stuck on a work problem, and you scroll for five minutes. You feel a brief distraction from the frustration. Name the cue, routine, and reward.
Show answer
Cue: getting stuck on a work problem. Routine: picking up the phone and scrolling for five minutes. Reward: a brief distraction from the frustration.
Exercise
A plan says, "Every day I will exercise to become healthier." Which part of the loop is too vague, and how could you fix it?
Show answer
The cue and the routine are both vague, and the reward is distant. A fix is: "When I get home from work, I put on my running shoes and jog for ten minutes, so that I get a clear head."