productivity tip: Spy on yourself!

Where does all the time go? I know I'm dong stuff, but what did I do? It doesn't matter whether I'm busy or bored, in the zone or in a funk, when it comes time to tally up hours at my day job or to invoice my consulting clients, I quickly realize that I'm not completely certain how much time I spent on the various things I've been doing recently.

So I thought to myself, at least for the portion of time that I spend on a computer (which for me is a LOT), I ought to be able to keep better track of what I'm doing. But I'm not going to make myself open some fancy program, click a bunch of buttons and type a description of everything I'm doing each time I switch from one task to another. My work patterns are too dynamic for that, and I'm naturally averse to adding that kind of overhead to what I do. I need something more automatic.

My computer already knows what I'm doing, I just need a way for it to keep track and tell me about it. I need to spy on myself! So I wrote this simple script to do just that. Presenting winTrails (source code, .exe ). Every sixty seconds, winTrails logs the active window's title and program name to a file, stamping each record with the current date and time, like this:

Sat 2007/07/14 06:23 explorer.exe C:\misc
Sat 2007/07/14 06:24 explorer.exe C:\misc
Sat 2007/07/14 06:25 Thunderbird.exe Inbox
Sat 2007/07/14 06:26 Thunderbird.exe Compose: Re: question


The log file records are tab-delimited, so they can easily be imported into a spreadsheet where they can be sorted, summarized, sliced and diced. In the future I'll post some other scripts that I use to quickly summarize recent activity.

The great thing about logging both the program name and the window title is that I can look at the data at two levels:

  • a general overview by program -- for example, I spent 47 minutes processing email in Thunderbird and 32 minutes doing system work in puTTY
  • more specific tasks by title -- the time spent in Thunderbird included 4 minutes reading a client's question and 7 minutes composing a reply

It's not perfect, of course. The script doesn't know when I stop to take a phone call, or if I walk away from the computer and leave a window open, it will look like I was running that program the whole time I was away. I usually use the 'lock workstation' feature though, and winTrails doesn't log anything if no window is active. A screen saver on a short delay would have a similar effect.

One of the benefits of tracking time this way is that I can start to hold myself more accountable for the time I spend. If I look back at one day's log and realize that I spent way too much time on random web surfing, maybe the next day I'll try to be a little more focused. If I'm successful, it will show up in the log and I'll feel good about it.

How do you keep track of your time? Leave a comment and share your experiences and tips.

Read and post comments | Send to a friend

13 views and 0 responses