tagging inactive intervals

Oren Gampel oren at orengampel.com
Mon Dec 30 23:51:41 CET 2013


Hi Joachim and all,

Picking this from previous thread, as this may benefit from further 
discussion.

As far as I can tell the current implementation counts for a specific TAG 
only intervals where the related rule is true. 
current window $program == ["Eclipse"] 
  ==> tag Dev,
So only times where Eclipse is active would be counted.

This is valid, but since the arbtt's docs state "It is also a program 
that will, based on expressive rules you specify, derive what you were 
doing, *and what for*." I assert that a more elaborate scheme is needed. 

For example, consider I would like to tag every time I'm working on a 
project for client A. I use Eclipse so I write the rule:
current window $program == "Eclipse" && 
  current window $title =~ m!clientA!
  ==> tag Work_for_A,

During my work I often browse the web, make a quick phone call, and 
sometime even lean back and think for 2 minutes.
Still, I would like to have all this time "billed" to client A.

In other words, I would like arbtt-stats output to ignore minor 
inactivity times in a specific tasks as related to that tasks.

Tag is not really a task, but I don't think a new entity should be 
introduced. I believe simply calculating how time is summed, or actually 
how gaps should be ignored.

BTW, I'm not sure whether these intervals are what's referred to as "idle 
time".

In the original thread mentioned Joachim suggests:
> Alternatively, one might be interested in something like „Intervals
> where at least 90% of the time tag foo is set“, which might handle
> interruptions more gracefully and faithfully than a hard timer.
> 
> But in any case such a feature needs a bit of thinking and contemplating
> and brainstorming... :-)

Other options:
- Specify maximal threshold of of interval to ignore. Either as time in 
seconds, or multiplier of the sample rate (the later might be good for an 
"all purpose default", say "ignore short gaps of 2x sample rate or less)
- Assign idle time to previous tag on some condition
- A more elaborate algorithm such increasing the threshold the more 
active a tag is (so if I coded for 5 hours, even 5 minutes of otherwise 
unrelated work, would still be counted. (I can hear the lawyers cheering 
for the extra billing time...)

Caveats:
Ensuring that these newly tagged intervals don't mess calculations that 
currently reach 100% (or at least warn about it).

Any thoughts or even pointers to what can be easily implemented would be 
great.

Oren





More information about the arbtt mailing list