[Pidgin] #11466: Log activity scores don't distinguish between very old logs and no logs at all

Pidgin trac at pidgin.im
Sat Feb 27 19:33:49 EST 2010


#11466: Log activity scores don't distinguish between very old logs and no logs at
all
-------------------+--------------------------------------------------------
Reporter:  gmcnew  |        Type:  defect                 
  Status:  new     |   Component:  libpurple              
 Version:  2.6.6   |    Keywords:  buddylist sort activity
-------------------+--------------------------------------------------------
 When you sort buddies by recent log activity, activity scores are
 calculated by summing log sizes with an exponential decay (see
 [http://developer.pidgin.im/ticket/5447 ticket 5447]). This works great,
 but scores are truncated to integers after being calculated, so buddies
 with scores below 1.0 are treated as if you've never talked to them at
 all.

 For example, let's say I had a single 7 KB conversation with Kevin six
 months ago. That's about 26 weeks, or 13 half-lives, so his activity score
 is 7 * 1024 * 0.5^13^ = 0.875. This is truncated to 0, so Kevin will be
 mixed in with all the buddies I've never talked to.

 This seems wrong -- surely the sort should see a difference between some
 activity (even if it's very old) and no activity at all.

 The fix is simple: use ''ceil()''.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/11466>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list