Forget Streaks: A Smarter Way to Track Habits Without Stress
I’ve been looking for a way to track and motivate myself to build healthier habits, specifically around exercise, meditation, and phone use. So I started looking for a phone app that would let me see exactly how much time I was spending on each. There are plenty of habit-tracking apps out there, but they all seem to have the same shortcomings:
- They focus too much on daily goals. For example, I might want to meditate every day, but realistically there will be days where I just can’t, or don’t want to. Weekly goals feel much more manageable and motivating because there’s always tomorrow to catch up.
- They require manual logging. This isn’t really the developers’ fault, since every habit is different and there’s no easy way to automate them. But logging habits manually quickly turns into a chore. What I really want is something that measures quietly in the background without me having to do anything.
- They rely heavily on streaks. Streaks can be satisfying, but they also create pressure. I’ve often found myself doing a habit just to keep a streak alive, which undermines the real reason I wanted to do it in the first place. And once a streak breaks, it feels like starting over, which can be discouraging.
So I decided to make something bespoke.
I set up a MySQL database on my server where each row logs a start time, end time, and a label for the habit it’s tracking.

Meditation
The first habit I tackled was meditation. This one was fairly straightforward. I made a very simple meditation timer, similar to this one my friend Hugh built, but mine automatically logs the start and end times of each session into the database.
The one snag I ran into: since the timer is hosted on a web page, my MacBook would fall asleep after 10 minutes of inactivity, which stops JavaScript execution once the device locks. The fix was to run caffeinate
in Terminal while the timer is active, which prevents sleep and keeps the code running. Once I figured that out, it worked great and I’ve been using it ever since. I won’t link to my version since I don’t have authentication on my server, but here’s a screenshot:

Cardio
The next habit I wanted to track was cardio. My goal is 2.5 hours per week, since that’s what the WHO recommends for maximum cardiovascular benefit before diminishing returns. I already use Strava for runs, so my first thought was to pull the data from their API with a cron job. But since I don’t need most of that data and didn’t want to deal with authentication, I went with Apple Shortcuts instead.
When I open Strava, a Shortcut sends a POST
request to my server to log the start time. When I close the app, it sends another request with the end time. It’s a crude setup, but it works well enough. I may switch to the API later if I need more detail.

Strength Training (Bouldering)
After that, I set up strength training. Again, the WHO recommends 2.5 hours per week, and for me that’s bouldering, since it’s the only strength exercise I enjoy. Tracking it turned out to be even easier than running. Using Apple Shortcuts, my phone sends a POST
request with the current time when I arrive within 500 meters of my climbing gym, and another when I leave. That session gets logged automatically. I use the same method for football: when I arrive and leave the pitch, it tracks that as cardio.

Procrastinatory Web Use
The last habit I wanted to measure was procrastinatory web use, which was trickier. I needed to track activity on both my MacBook and my iPhone.
- On MacBook: I wrote a small app in Jai that calls an AppleScript to detect when I’m on websites I’ve pre-defined as “procrastination.” It logs those sessions to the database.
- On iPhone: my first attempt was to treat any browser usage as procrastination, since that’s usually true. The problem was that if I locked my phone without closing Safari or Chrome, the “end” automation never triggered. That meant I’d end up logging hours of fake activity. This wasn’t an issue with Strava because you always have to end a run manually.
The solution came when I discovered that iOS’s new Screen Time data can be accessed via Shortcuts (in the beta, at least). It only seems to cover Safari, but that’s enough for me. I set up a daily automation (runs at 12:30am) to pull the previous day’s web activity and send it to my server. Since Screen Time gives durations, not timestamps, I just fudge timestamps to make it work with the rest of my system. It’s not perfect, but it does the job.

Presenting the Data
Once I had everything logging properly, it was just a matter of presenting it. I built a simple dashboard where each habit has a progress bar showing how close I am to the weekly target. Bars turn green when I hit the goal and red when I don’t.
Awards (Peanuts)
I also added a small “award” system using peanuts. (I chose peanuts because they feel sufficiently minor/insignificant/meaningless).
- Brown = hit one goal
- Silver = hit two
- Gold = hit three
- Purple = hit all four

A counter at the top tracks how many weeks I’ve won each award. It’s obviously extremely contrived and pointless but it does gamify it in a way that makes even small wins feel good. Anyway, you can check the finished thing out here if you like.
Just don't judge me for how badly I'm doing at sticking to my habits...