Measuring Productivity

Measuring Productivity

People always want to be "more productive", but few know what they mean when they say that. It might mean that you have better focus at work and can complete your tasks faster than before, or it might mean that you never forget anything at the grocery store again and therefore make fewer trips. Whatever your goals, you should measure your productivity to know if you're making progress, right?

It turns out this is complicated. I recently worked an 80 hour week and got a lot done, but I'm not sure if I was "productive" or made any progress towards my goals of increased work efficiency and effectiveness.

I spent a good amount of time last night thinking through how I might evaluate my last week and found that I couldn't come up with anything concrete. I could only measure my productivity with a feeling. While not a complete list by any stretch, I wanted to write out why I think a few different ways of measuring productivity fail.


Measure the Obvious

The most obvious metric to track would be some measurement of total work. "I was asked to lay 500 bricks today, and I laid 500 in 5 hours" gives you a complete measurement of your work output. If you normally lay 50 bricks in an hour, you can clearly see that you've become twice as productive!

This works great as long as your task is repetitive and controlled. You may not be able to lay bricks in the rain, so a rainy day might drop your productivity measurement to 0. Or you may need to take the time to set up a shelter you can work under. If it takes you an hour to set up and tear down the structure, you'll lay 500 bricks in 7 hours of work. But were you really any less productive? You did some work instead of none, but you also took longer than you would on a sunny day. This is the problem only measuring outputs: you can't account for any outside factors.

For example, I'm a software engineer. My job is (generally) to write code, so you may think that good measurement of my productivity would be the number of lines of code that I write in a day. I would say it's the most obvious metric available. But anyone who has written code before will tell you that's a terrible measurement system: the hard part of my job isn't physically writing code but finding a way to model the real world problem in a way that makes sense in code. Most of my time "writing code" is actually spent reading code and trying to find better models. In fact, the days I consider most productive usually involve removing more lines of code than I add!

For example, I might find a piece of Python code that counts the number of times each word in a file occurs (the details aren't very important here):

def count_words(filename):
    f = open(filename, "r")
    try:
        word_counts = {}
        file_contents = f.read()
        words = file_contents.split()
        for word in words:
            if word not in word_counts:
                word_counts[word] = 0
            word_count = word_counts[word] + 1
            word_counts[word] = word_count
        return work_counts
    finally:
        f.close()

This could be rewritten to be much more compact and readable:

from collections import Counter

def count_words(filename):
    with open(filename, "r") as f:
        file_contents = f.read()
        words = file_contents.split()
        word_counts = Counter(words)
        return dict(word_counts)

Hopefully you can see that the obvious metrics of work output don't always measure your productivity.


Account for Interruptions

Our tasks don't live in a closed system: there are people and things around us that can change when and how we perform tasks. Using my job as example again, sometimes customers find critical bugs in the software we ship. Some of these need to be resolved yesterday, and so my day gets interrupted to help fix or verify a fix for a bug.

The problem isn't always the amount of time these interruptions take. Some bugs have obvious fixes and take only a few minutes to get fixed up. The problem is that it forces me to drop all the context I've built about my current task. When I do come back to that task, I need to recover all that context, which might take half an hour if the problem is particularly convoluted. The worst part is that because I've lost that context, I can't be sure that I've recovered it all!

There's tons of writing on the cost of context-switching out there and so I won't write much more on the topic here. But when I get interrupted, I can't even measure how much time I lost to the interruption: it may have only taken a few minutes on the calendar, but I won't have a good estimate for how much context and focus the context-switch cost me.

Because interruptions have such an unknown cost, we're going to have a hard time accounting for them when measuring our productivity levels.


Defer to Experts

Often the people most qualified to tell you how productive you've been are experts in the field. In the case of work, this is probably your colleagues. They are the most qualified to tell you that you crushed it on a day, or to tell you that you're moving too slowly. My team at work holds a daily sync meeting where we talk about what we're going to do that day, and that's where I get feedback about the amount of work I'm scoping for the day. Sometimes I scope too much and it rolls into the next day; my teammates tend to give me feedback on that second day if they think that was expected or not. Sometimes I scope too little work; they tend to ask what I'm going to do when I run out of tasks.

This is an excellent way to measure productivity at work, but what about in your personal life? Things get dangerous here.

If I turn to an expert to judge my blogging capabilities, I'll turn to a blogger or a productivity guru online and look at any resources they might have. But I always have to remind myself that the people putting themselves out there do this for a living. A professional blogger has different goals and standards than I do for their blog. Their motivations are different and the amount of effort they can dedicate to these task is different from the amount I can put in.

If I don't take this into account, I'll feel terrible about my output. How could I consider myself productive if I don't make a YouTube video for every blog post? What kind of home cook produces less than 3 new dishes every week? Experts are experts because they dedicate an inordinate amount of time to the things they're experts in. This may seem like a tautology (and it probably is), but it means that we all need to adjust our expectations from what we read or see online.

But I'm not an expert, so I probably can't make the most correct adjustment to their levels of productivity. If I see someone online do 50 pullups, I'll be extremely discouraged when I think I can do 10 but can actually only do 3. I may get discouraged and give up on improving myself.

I personally try not to give people real answers to questions where I'm the expert and they're not for this exact reason. If someone asks me how long it'll take to "learn how to code", I could tell them that it takes me about 20 hours to pick up a new programming language. But that would give them the wrong impression: I have my own definition of "pick up" honed from years of learning programming skills, and I also have knowledge about many other languages to inform my learning process. I so far removed from the "getting started" phase of programming that I really can't give an estimate.

My conclusion is that turning to experts only works if you are also an expert.


It's just a Feeling

My conclusion here is shockingly disappointing. Productivity is all about how you feel. We can't measure raw output, we can't account for interruptions, and we can't really turn to other people as references to see how we're doing if we're not already experts.

But if you feel like you had a productive day, then you had a productive day. If you feel like you've become better at a part of your life, you probably have! If you're total output has dropped but you're solving harder problems, you're improving and you should keep doing what you're doing.

The reverse is also true: if you feel like you didn't have a productive day, you need to examine what you did and why you feel that way. I produced a lot of output last week at work, but am pretty disappointed in my efficiency. And I'm extremely disappointed that I couldn't work towards any of my non-work goals because I had no energy left at the end of the workday.

Straight to the hips
On the plus side, I did make a chocolate tart.