Today I had an interesting discussion with one of our team members. He was estimating an upcoming development task and came up with a 124 hour realistic estimation. Assuming that the estimation itself is true, how many days of work will it take to get the job done?![]()
That’s a tough question because it requires us to know how many hours of work a full day actually has. While a typical work day lasts 8 or 9 hours, which quota of that are we actually doing productive work? 5 hours, 6 hours, or even more?
Let us be honest – we don’t know. Hopefully it is something between 60 and 90 percent, but that really makes a lot of difference! How can we even calculate an hourly rate, agree on project deadlines and plan our vacations without knowing that number?
There is this awesome book called Peopleware (a must read for every software manager in my opinion) which tells us what to do in order to improve our own and our teams development productivity. Turns out that beside things like office space layout, noise level and temperature, the major reason for poor productivity is the amount of distractions. All those tiny little things that keep us away from actually getting things done. It could be a phone-call in the middle of a difficult programming task, the boss stopping by to chat about his bike tour on the weekend or just the coffee machine that ran out of water, whatever.
How can we measure all those tiny distractions throughout a work day, so that we can
- do meaningful estimation on project deadlines?
- calculate a reasonable hourly rate?
- improve on that number?
In our case, we actually have a time tracking application which we already use for assigning blocks of time to projects and tasks. However, it is cumbersome to work with it, mainly because you need to click a lot and you need to select a task or project on which the time should go. That’s just too much friction to be actually useful for logging all those 0.5 – 5 minute distractions we’re worrying about here. We need something else…
FocusMeter – a tool for tracking distractions and measuring productivity
After hacking around for a few hours I came up with a small tool that is so easy and simple that I actually want to use it! Sitting in the system tray and being controlled by the keyboard it really gets out of my way and still provides enough functionality to do the job. Let’s take a look at it!
Here is how it looks like before you start working (after booting your PC, coming to the office, etc.):
Notice that little gray dot? Yep, that’s the application. It is gray because we’re not working right now.
This is how it looks like when we’re doing productive work.
The icon has changed to green color in order to indicate that everything is good.
Here is what happens when we’re distracted (e.g. the phone rings):
Red is indicating that we’re not doing productive work right now.
The only keyboard shortcut we need to learn is CTRL + ENTER. Every time we type that combination we’re toggling between being productive and being distracted.
Alternatively, we could have also used the context menu which pops up when we right click the icon:
We also need to use this context menu for starting and stopping the overall work time. If we’re going for lunch, this is not a distraction (at least not for me
), thus we need to stop the timer during that time.
Did you notice the menu item Show RavenDB database? It will bring up RavenDB management studio and let us take a view on the underlying database. Right now, we are not concerned about showing reports on our data in a nice UI or exporting the tabular data to Excel or SQL server.
We wanted a tool which lets us begin collecting the data immediately. It was important that it would work disconnected and be very easy to deploy. We couldn’t spend days or even weeks for development, because we didn’t have that time nor did we believe that it would have been worth the effort. RavenDB was just perfect for that scenario. It took less than 6 hours in development!
The tool is open source and you are free to do whatever you want to do with it. I would be happy if someone could craft out some code to export the data to Excel, so that we can generate some nice graphs and get some insight after a few weeks of use.
You can easily compile the project from the source on github: https://github.com/dlang/FocusMeter
Alternative, you can also download the binary from the latest version as of writing this post (12th May 2012) here.
I intend to add an export feature to submit the data to a centralized SQL server, so that we can do some advanced company wide reports. However, that won’t happen in the next days. Right now, I’m just happy that we have started collecting the data.
Update 2012-05-12:
As per request, I just added an options dialog that lets you choose your own keyboard shortcut. It looks like this:









