James Tauber

journeyman of some

blog > 2005 > 03 >

James Tauber's Blog 2005/03/26

Poincare and Leonardo

I sometimes get mail from people that have stubbled across the Poincaré Project posts and have wondered how they can easily get a full listing of them. I've now made such a list available on the Poincare Project page.

This is really just a temporary manual substitute for categories in Leonardo. The next version will support category-specific pages and feeds. It will also support comments and trackbacks.

by James Tauber : Created on March 26, 2005 : Last modified March 26, 2005 : (permalink)

Simple Algorithm for Recurring Tasks

I previously mentioned the little tool for Mac OS X called Consistency from Sciral which is for managing flexibly recurring tasks.

The approach is very simple. For every task, you specify a minimum time and a maximum time between occurrences. The Sciral Consistency UI gives you a table with a row for each task and a column for each day and you simply mark when you've done the task for that day.

The squares are colour-coded as follows:

  • purple means you shouldn't do it yet (less than minimum since last time)
  • green means you can do it (more than minimum but less than maximum since last time)
  • yellow means you really should do it today (period since last time is maximum)
  • red means overdue

This works surprisingly well. However, I wanted a system with a couple of additions. Firstly, I wanted to prioritise tasks based on this approach with ordering within tasks of the same colour. Secondly, I wanted something that would handle tasks that can be done multiple times during a day (like reading blogs or email).

For prioritisation, the following seems to do the job:

score = max(0, (1 + interval_since_last - minimum) / (1 + maximum - minimum))

This maps to the colours as follows:

  • score = 0 means purple
  • 0 < score < 1 means green
  • score = 1 means yellow
  • score > 1 means red

and you can sort the tasks relative to the actual score to prioritise within a colour band.

Handling tasks that can happen multiple times within a day turns out to be easy. Simply change the units that you use to measure interval_since_last, minimum and maximum to hours for that task and it just works.

One thing I observed implementing this in Python, though, is that interval_since_last should be an integer rounded down. Otherwise something with a minimum of 1 will start to have a score > 0 before that 1 interval is up.

I'll make my command-line Python implementation available soon.

by James Tauber : Created on March 26, 2005 : Last modified March 26, 2005 : (permalink)

Poincare Project: Groups

Part of the Poincare Project.

Although we've already defined them as monoids with inverses, a group is such an important concept in pure mathematics that we'll summarise here.

A group is a set G of objects with some binary operation # that maps every pair of elements of G to an element in G such that:

  • the operation is associative: (a # b) # c = a # (b # c) for all a, b, c in G
  • there is an identity element e in G where x # e = e # x = x for all x in G
  • every element a has an inverse b such that a # b = b # a = e (where e is the identity element)

As we've already seen, integers under addition form a group. Integers under multiplication do not form a group because the multiplicative inverse of an integer is not an integer (e.g. inverse of 2 would be 1/2). The rationals under multiplication do not form a group either because 0 does not have an inverse. However, the non-zero rationals under multiplication do form a group.

There are many sets outside of the numbers that form groups. For example, consider the different ways you can rotate an object. Consider G to be the set of all rotations. Now consider # to be the composition of two rotations, i.e. a # b is the single rotation that is equivalent to performing rotation a after you have performed rotation b. It turns out that (G, #) forms a group.

UPDATE: next post

by James Tauber : Created on March 26, 2005 : Last modified March 26, 2005 : Categories poincare_project : 0 comments (permalink)