Keeping track of time with planner-timeclock and planner-timeclock-summary

Today I discovered the immense usefulness of keeping track of time. I
had converted the TODO my teammate sent me into entries in my
JapanProject plan page, and before starting my work I came up with
rough estimates of the time it would take me to do the tasks. I also
marked which tasks I felt were best suited for my coworker so that he
could get started without worrying about conflicts. I like working on
little tasks first, so I estimated the time it would take me to
complete each task and sorted by my estimates using the ‘sort’ command
and some cutting and pasting.

Then the fun began. I wanted to see if I could match my estimates.
Before I started working on a task, I used C-c TAB to mark it ‘in
progress’ and start the clock. When I finished it, I used C-c C-x
(planner-task-done) to mark it completed and automatically clock out.
This is not yet done for cancelled tasks, so I clocked out of those
manually with C-c C-o (timeclock-out). I also clocked out whenever I
caught myself being distracted so that the totals wouldn’t include the
time I spent chatting on #emacs or checking out del.icio.us links. ;)
At the end of the day, I used
‘planner-timeclock-summary-show-range-filter’ to show me the time
elapsed for all of the tasks I’d worked on over the past two days.
Here’s the report for that project, edited to reflect how it looks on
my screen and annotated with comments:

Timeclock summary report for 2004.12.28 – 2004.12.29

Project Time| Ratio| Task

JapanProject| 0:23:17| 3.6%| Translate javadoc comment for Messages.java

0:33:48| 5.3%| Translate javadoc comment for LoginAction.java
1:54:07| 17.8%| Study Struts in Japanese
0:46:08| 7.2%| Add javadoc tags for input, output and forwards
1:03:48| 9.9%| Help review code
0:04:14| 0.7%| Import todo list
0:00:37| 0.1%| 2min Fix Menu Action’s unnecessary code (delegated)
0:01:01| 0.2%| 2min Remove unnecessary list in UserRemoveSetupAction (cancelled)
0:02:10| 0.3%| 2min Remove hard-coded database path from MenuAction
0:02:46| 0.4%| 30min Create a superclass for our action classes that handles initialization of database and handling of privileges – remove all privilege handling in logic classes. …
0:07:32| 1.2%| 5min Add a method that returns the validity of a user in MUserPeer.
0:08:28| 1.3%| 5min Fix indentation
0:03:52| 0.6%| 10min Fix UserPeer so that it doesn’t get null pointer exceptions
0:04:34| 0.7%| 5min Add current password field in user_modify page (cancelled)
0:21:56| 3.4%| 15min Make a super class for our service classes that will receive the database connection. (cancelled)
0:06:05| 0.9%| 10min Remove hard-coded constants from the Logic classes
0:10:55| 1.7%| 10min Move logic from UserBean.checkPassword to UserListLogic
0:01:20| 0.2%| 20min Guard against null pointer exceptions in peer classes
0:04:57| 0.8%| 10min Instead of displaying uneditable data with bean:write, just disable the html:text element
0:25:03| 3.9%| 10min Deploy 10:00 version
0:04:46| 0.7%| 5min Separate the configuration file of database and system into another uninternationalized property file.
2:09:48| 20.2%| 1h Decide on a naming convention for localized messages and update files
0:00:07| 0.0%| 20min Explain what is happening in UserModifyAction’s nested ifs (pending)
1:50:23| 17.2%| 2h Write Javadoc comments in English and Japanese to explain bean structure
0:04:19| 0.7%| 2h Write Javadoc comments in English and Japanese to explain peer operations (pending)
0:05:40| 0.9%| 20min Make a factory class for the database (pending)
Total: 10:41:41|100.0%|

Day began: 13:03:58, Day ended: 20:51:46
Time elapsed: 31:47:48, Time clocked: 10:41:41
Time clocked ratio: 33.6%

The time record isn’t perfect. I cancelled some tasks after thinking
about them a little and did some tasks simultaneously. Sometimes I
didn’t notice that I was getting distracted, too. Still, having all of
that time information neatly summarized made me realize a number of
things.

First, I goof off much less when I have a nice, broken-down task list
in front of me. There’s just something about knowing there’s a five-
or ten-minute hack you can get out of the way. I found myself looking
forward to getting to the next task just to see if I could make my
estimate. That said, seeing a five-minute task stretch and stretch due
to unforeseen problems did make me a little nervous. I should probably
just make generous estimates so that I don’t end up with bugs because
of haste.

Second, I don’t goof off as much as I thought I did, although there’s
still room for improvement. Yesterday’s workday was 9:00 – 12:00, 1:00
- 5:30—7.5 hours. Today was the last day of work, so cleaning and
celebration interrupted my hacking at around 3:00—5 hours of work.
According to my task list, 10:41/12:30 was productive work. Hmm. 1:49
hours unclocked time when I was thinking or goofing off.
planner-timeclock-summary-show for today reveals that I actually
clocked 5:30 today, which means the goofing off happened yesterday.
That makes sense; I remember a pretty long unclocked segment
recuperating from Japanese overload. (This was before we came up with
the task list.)

Third, keeping track of time is way, way cool even if you don’t bill
anyone for your time.

Like the idea? It’s easy to try out. If you use the development
version of planner, just add

(require 'planner-timeclock)
(require 'planner-timeclock-summary)

to your ~/.emacs. If you want to try it out now, eval those statements
in your Emacs session. After that, simply use C-c TAB to ‘clock in’ a
task before you start working on it, and use C-c C-x
(planner-task-done) to mark it completed. To see a summary of how you
spent your day, check out the different functions in
planner-timeclock-summary.

If you use the stable version of Planner, you
can grab planner-timeclock.el
and planner-timeclock-summary.el from
http://sacha.free.net.ph/notebook/emacs/dev/planner/ , try out the
dev version, or cherry-pick the relevant arch patches. If it works for
you too, please e-mail me so that we can merge it into stable! =) (I
tend to trust myself very little, seeing how I manage to screw up dev
from time to time.)

Happy hacking!