warning:this site is a work in progress, so some things are broken

You should start logging things

3 min read
leia em português

Recently I rebuilt this site. It wasn't only a new design: it got new features too, some of them dynamic. One of them is a gym section where I log every workout, so you can see when I trained and what I did, cardio included (usually treadmill or football). It's a cool feature, but it also helped me remember how much I lift on each exercise and how often I actually go to the gym. Then it hit me: why the fuck didn't I start logging this before? And why don't I log other stuff too?

I couldn't find a good reason, because there isn't one. The cost is tiny: you write something down at some point in the day. And since I know some programming, here's what I did for the gym log.

How I automated it

I didn't want to write it down somewhere by hand, or commit it to the repo myself, so I made an iPhone Shortcut. I have a fixed list of exercises for each day, so I mapped all of them, and the Shortcut starts by listing my options: back + biceps, or back + biceps + treadmill, for example (I never do gym and football on the same day, so that one isn't there). Today's workout comes first.

When I pick one, it shows a draft with every exercise for that day, prefilled with the last weight, sets and reps I logged:

dia: hoje
# B · costas + bíceps · 0 = pulei
pull down 30kg 4x10
puxador aberto 55kg 3x8
puxador fechado 55kg 3x8
...
esteira 20min 5% 8.5km/h

Most days I only change one or two numbers, like when I finally go up on the pull down. If I skipped an exercise, I put a 0 on it (that's the "0 = pulei" in the header: my draft is in Portuguese, and pulei means skipped). Then I hit done.

Behind the scenes, the Shortcut sends the text to an API on this site. The API reads it line by line, and if something doesn't make sense, like a typo or an exercise that doesn't exist, it tells me instead of saving garbage. If everything's fine, it adds the workout to a JSON file and commits it straight to the site's repo on GitHub. When a new commit is detected, a redeploy is triggered, and about a minute later it's live. The Shortcut ends with a notification saying what got logged, like ✓ back + biceps + treadmill 20 min · 3/7 this week.

If I forget to log a day (it happens, Sunday football is the usual victim), I change the first line of the draft, dia: hoje (day: today), to dia: domingo (Sunday) or dia: ontem (yesterday) and it goes to the right day. Logged something by mistake? The menu also has an undo. No laptop, no git, and "Hey Siri, log workout" works too.

Log more things

Learn from my mistake and start logging things. Your future self will thank you. Imagine knowing when and how many books you read, how much you actually slept this month, how much you spent on food delivery, how many coffees you had this week, how many jobs you applied to and which ones answered, how many hours you practiced that instrument you swore you'd learn, or every restaurant you went to and whether it was worth it.

It helps at work too. A lot of people keep a brag document: a running list of what they shipped, problems they solved, people they helped, and the impact each one had. When review or promotion season comes, nobody remembers what you did eight months ago, not even you. With the log, the case for your promotion is already written, with dates and numbers. Same idea, different reward.

I already do some of this. I built huntlog to track my job applications, and this site has a reviews page for food, drinks, movies and whatever else I try. Next for me are books and keyboard practice, even if they never show up here.