Sub topic 7
Tracking wins so progress stays visible
This chapter assumes you know the habit loop (cue, response, reward) and what counts as a small win. It also assumes you have a celebration in mind, or are designing one. Here the goal is to record each win, so you can see progress that would otherwise fade from memory.
Why tracking belongs in a habit system
A small win is small by design. Flossing for two minutes or reading one page leaves little trace. Memory rounds these events off: after three weeks you will not recall how many you completed, and you will probably judge yourself harshly.
A tracker fixes this by turning each win into a visible mark. It does three jobs:
- It records the response. The mark proves the behavior happened, so you do not have to rely on a vague feeling.
- It makes progress visible. A row of marks shows momentum, and that sense of progress is itself rewarding.
- It supplies data for review. In the last chapter of this tutorial you will adjust your habit after a few weeks. A tracker gives you the facts to adjust against.
Tracking is not the celebration. The celebration is the immediate positive feeling. The tracker is the record that the feeling was earned. Often the two happen together: you make the mark, then you celebrate.
What to record
Record the smallest fact that proves the win. The more you record, the more likely you are to skip recording on a tired day.
| Level | What you record | Example | Cost per day |
|---|---|---|---|
| Binary | Done or not done | A checkmark for "read one page" | A few seconds |
| Count | A number | Pages read: 1, 3, 2 | About ten seconds |
| Count plus note | A number and one line | "3 pages, read on the train" | Under a minute |
Start with binary. It matches the idea of a small win: either you did the tiny action or you did not. Move to a count only if the number helps you decide something later, such as whether to make the habit bigger. A note is useful for spotting patterns, for example that you skip the habit on days you work late.
Avoid recording quality ("did it well") at first. Quality ratings invite self-criticism, which works against the positive feeling you are trying to build.
Choosing a medium
The best tracker is the one you will actually use right after the habit. Pick by friction, not by features.
| Medium | Strength | Weakness |
|---|---|---|
| Paper calendar on the wall | Always visible, satisfying to mark | Easy to forget if you are away from home |
| Notebook or journal | Room for notes | Progress is hidden when the notebook is closed |
| Phone app | Reminders, automatic charts | Notifications compete with everything else on the phone |
| Spreadsheet or plain text file | Flexible, easy to analyze | Needs several steps to open and edit |
Two rules help with any medium. First, place the tracker where the cue happens. If your cue is brewing morning coffee, keep the calendar next to the kettle. Second, make the marking step part of the habit sequence: do the action, mark the tracker, celebrate. That gives the mark a fixed place in the routine instead of leaving it as an extra chore.
A tracker in code
A tracker can be very simple. If you use a text file or a small script, the core data is a set of dates on which you logged a win. The streak is the run of consecutive days ending today.
from datetime import date, timedelta
def current_streak(done_dates: set[date], today: date) -> int:
"""Count consecutive days with a logged win, ending at today."""
streak = 0
day = today
while day in done_dates:
streak += 1
day -= timedelta(days=1)
return streak
done = {date(2026, 11, 25), date(2026, 11, 26), date(2026, 11, 27)}
print(current_streak(done, date(2026, 11, 27))) # 3The function starts at today and walks backward one day at a time. It stops at the first date missing from the set. Using a set makes each lookup fast and ignores duplicates, so logging the same day twice does not inflate the count.
A common error: the streak is zero until you log today
Look at what happens when you check the streak in the morning, before you have done the habit. Today is not in the set yet, so the loop stops at once and returns 0, even if you completed the habit on each of the previous thirty days.
This is a correct answer to the question "what is my streak ending today?" It is a discouraging answer to the question you really have, which is "how am I doing?" A tracker that shows 0 each morning punishes you for the time of day. One fix is to start counting from yesterday when today is not yet logged:
from datetime import date, timedelta
def display_streak(done_dates: set[date], today: date) -> int:
"""Streak to show on screen: do not reset to 0 before today is logged."""
day = today if today in done_dates else today - timedelta(days=1)
streak = 0
while day in done_dates:
streak += 1
day -= timedelta(days=1)
return streak
done = {date(2026, 11, 24), date(2026, 11, 25), date(2026, 11, 26)}
print(display_streak(done, date(2026, 11, 27))) # 3, today not logged yetThe next chapter's topic, streaks and missed days, builds on this. For now the point is that a tracker's design decisions affect how you feel about your progress.
Showing more than a streak
A streak is one view of the data, and it is a fragile one, because a single missed day sets it to zero. Other views stay informative after a lapse:
- Total wins. A running count that only goes up. Missing a day never lowers it.
- Wins this week. For example "5 of 7". This frames a miss as part of a normal range, not a failure.
- A calendar grid. Each day is a cell, filled or empty. You see the overall density of marks, and one empty cell is clearly small against many filled ones.
The following code computes the second and third views from the same set of dates.
from datetime import date, timedelta
def wins_in_last_days(done_dates: set[date], today: date, days: int = 7) -> int:
"""Count wins in the last `days` days, including today."""
window = {today - timedelta(days=i) for i in range(days)}
return len(done_dates & window)
def week_grid(done_dates: set[date], today: date, days: int = 7) -> str:
"""Return a text grid, oldest day first: X for a win, . for a miss."""
cells = []
for i in range(days - 1, -1, -1):
day = today - timedelta(days=i)
cells.append("X" if day in done_dates else ".")
return " ".join(cells)
done = {
date(2026, 11, 21),
date(2026, 11, 22),
date(2026, 11, 24),
date(2026, 11, 26),
date(2026, 11, 27),
}
today = date(2026, 11, 27)
print(wins_in_last_days(done, today)) # 5
print(week_grid(done, today)) # X X . X . X XThe grid reads left to right from oldest to newest. Five wins in seven days is a strong week, and the grid shows it more honestly than a streak of 2 would.
Pitfalls
Tracking becomes the goal
If you start doing the habit so you can mark the tracker, the mark has replaced the behavior. Signs of this include doing a trivial version of the action just to keep the chain alive, or feeling relief at the mark and nothing about the habit itself. Keep the tracker in a supporting role. Its job is to record real wins and not to produce them.
Too much detail
A tracker with six fields takes minutes to fill in. On a low-energy day you will skip it, and the gaps will then make the data less useful. Reduce what you record until marking takes a few seconds.
Recording late
If you fill in the tracker at the end of the week, you are reconstructing from memory and the mark no longer connects to the moment of the win. Mark it right away. The mark is a small reward in its own right, and like other rewards it works best close to the behavior.
Hiding the tracker
A tracker in a drawer or buried in a phone folder does not make progress visible. If you cannot see it without a deliberate effort, move it. A tracker you cannot see does not do its main job.
Judging by the empty cells
Empty cells are information, not verdicts. A pattern of misses on Fridays suggests the habit does not fit your Fridays. It does not suggest you lack discipline. Read gaps as design feedback, which the review chapter covers in detail.
Setting up your tracker
Follow these steps once, then leave the system alone for a few weeks.
- Write down the exact small win you will record, in one sentence, such as "Read one page of my book."
- Choose a medium from the table above, picking the one with the least friction at the place where your cue happens.
- Decide the order: action, mark, celebrate. Write it next to your cue.
- Choose at least two views, such as a weekly count and a total.
- Set a review date three weeks from now and put it in your calendar.
Summary of the working model
- The tracker records the response and makes small wins visible, because memory alone does not.
- Record the smallest fact that proves the win, and begin with done or not done.
- Place the tracker at the cue and mark it immediately after the action, before celebrating.
- A streak is fragile and can show 0 before you log the day. Pair it with views that do not collapse after a miss.
- Watch for the tracker becoming the goal, for excess detail, and for late or hidden marking.
Exercise
A habit script returns a streak of 0 each morning, even though you completed the habit on each of the last 20 days. Why does this happen, and how would you change the displayed number?
Show answer
The function starts counting at today and stops at the first date missing from the set. Today is not logged yet in the morning, so the loop ends immediately. To fix the display, start counting from yesterday when today is not in the set, as in display_streak above. You could also show a total or weekly count that does not depend on today being logged.
Exercise
You track "meditate for two minutes" with a form that asks for minutes, mood from 1 to 10, location, and a note. After two weeks you have logged only four days. What is the likely problem, and what would you change?
Show answer
The tracker takes too long to fill in, so you skip it on low-energy days. Reduce it to a single binary mark (done or not done) placed at the location of the cue, and add a count or note later only if you need it for a decision. The simpler form also keeps the mark close in time to the win.
Exercise
Using winsinlast_days from this chapter, what does it return for today = date(2026, 11, 27) and done = {date(2026, 11, 20), date(2026, 11, 21), date(2026, 11, 27)}? Explain your answer.
Show answer
It returns 2. The seven-day window covers November 21 to November 27 inclusive. The 20th falls outside the window, so only the 21st and the 27th count.