Some important features of a task-management system have to do with handling "problem" tasks: for me, these are either overdue tasks or tasks that have been sitting around too long. These are important for first-order and system-stability reasons. The first-order reasons are things like: if the water bill is overdue, I really ought to get around to paying it. The system-stability reasons are things like: when I make a no-due-date task because something seems important, and when that just sits there for months without any change of status, staring me in the face, it saps a little bit of my energy every time I see it.
I am not sure exactly how to manage those "stale" tasks. Nor overdue tasks. But I do know that a Task
ought to be able to tell me whether it's overdue and whether it's stale. That's what I've implemented today.
This is a nice, clean exercise in modifying a class and testing it. The mistake most urgently to be avoided today is that of trying to implement persistence and display before getting the object's features right. (Or, at least, close enough to right to be useful, without accumulating too much tech debt.) What I really want to be doing is conditioning some display features according to whether the task is overdue / stale. This made me want to start by defining some CSS classes and rules for them. That will often result in an unmaintainable mess--and even worse if I also bash in a sloppy implementation of the necessary persistence logic while I'm at it.
Happily, (i) I've built up some discipline around these things and (ii) it's never too hard to convince myself to put off CSS work.
Here's the current commit in the veery/
repository.
Next post: Python task manager from scratch, part 33: Updating the persistence logic for tasks