Tracking time

2024-03-15 08:50:47 +0100 +0100

https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Time_Sheet%2C_1909_%28front%29.jpg/512px-Time_Sheet%2C_1909_%28front%29.jpg

Time sheet from 1909; Halbert Powers Gillette, Public domain, via Wikimedia Commons

I spent nine years working for digital agencies, where one lives and dies by the sword 15 minute billable unit of time. When I left that type of work, I thought I'd never want to track my time again.

I was wrong!

Why I track my time

  1. An easy-to-review log of how I am spending my day. When I'm deliberate, I try to pick at most three things to do each day. I inevitably end up doing other things in response to incoming messages. Tracking my time shows me where I've actually put my effort for the day, so I can remind myself to get back to the things I really wanted to do.
  2. A review of the week. Same as previous point, but on a broader scale. Part of my weekly review is looking at the time summaries for the week, so I can see how well I did in doing the things I wanted to do, and see if I was doing too much "shallow work".
  3. To know when to stop. I try to estimate time effort on most of the tasks I work on. The timer helps me know when I've spent too long on something.
  4. Focus. It's just a little harder to multi-task if I have a timer in front of me telling me that I'm working on a particular thing.
  5. To have an idea of what I did yesterday. Writing my "what I did yesterday" standup is super easy because I have a log of where the time went.

For extra clarity, these are non-reasons to track my time:

  1. To justify my value as an engineer. This was the worst part (for me) of digital agency work and not something I want to get back into.
  2. To meticulously measure each moment of waking life. I don't need to record how I spend each minute in front of the work station or indeed while "at work" (the home office).

It turns out, when you're keeping score for yourself, and not to justify your existence to an employer or client, it's not at all stressful and in fact, calming and helpful for focusing.

How I'm tracking my time with Emacs Org mode

I keep my list of TODO items in Emacs Org mode. When I start on a task, I clock in with org-clock-in. When I stop working on the task, I run org-clock-out.

When I run org-clock-in, I switch the TODO state of a task to STRT:

(add-hook 'org-clock-in-hook
  (lambda ()
  (org-todo "STRT")))

That way, it's easy to see tasks that I've started in Org Agenda. (It's always a good idea to finish things you've started!) If something is going to take me more than 15 minutes, I'll create a task and clock into it.

/in-progress.jpeg
Part of the org agenda daily view, showing STRT next to the task I've begun.

In the Emacs modeline, I can always see what I'm working on. (I've tried and failed to find a reliable way to show this in the macOS menu bar, but as I'm in Emacs often enough, this doesn't really matter.)

/modeline.jpeg
The modeline in Emacs (using Doom Emacs)

If I want to look at how the day is going, I can use org-agenda-log-mode:

/agenda-log-mode.jpeg
Org agenda when seen using log mode, displaying "Clocked" next to entries with time recorded.

Or use a clock drawer in org mode, which is what I usually do as I write my weekly log:

#+BEGIN: clocktable :maxlevel 4 :scope agenda :block 2024-W11 :compact t :hidefiles t :narrow 60 :emphasize t
#+CAPTION: Clock summary at [2024-03-10 So 21:28], for week 2024-W11.

Which looks something like:

/clock-table.jpeg
Part of my weekly clock table, showing time tracked on two projects, and several subtasks of a project.

Nesting org mode headings under parent tasks makes it super easy to see where the time has gone.

Finally, to write my standup report about "what I did yesterday", I use an org-ql query:

("Standup: Clocked yesterday" lambda nil
  (interactive)
  (org-ql-search
    (org-agenda-files)
      '(and (clocked :on "-1"))))

Which looks like:

/clocked-yesterday.jpeg
List of tasks I clocked into yesterday.

Whenever possible, I try to include links in the tasks (e.g. to a patch, a bug tracker issue, a Google Doc, or a Slack message) so I can easily revisit what the task was.

For this example, I see I have two tasks I started and didn't complete–I'll go work on those now! 😅 Thanks for reading. If you have other tips or advice on using org-mode and clocking, I'd be happy to hear it.