I used to keep an ~/etc/todo flat text file with all the things I had to do listed in it. It always grew, and never ever shrank. Soon, I dreaded opening that file. I just knew that I had too much to do and never would be able to complete it all.

I tried Agile Programming's two-week retrospective/planning timeframe, and even that time period created todo files that would cause me mental anguish. Eventually, I figured out that I like working through a list of things for a day, zeroing out that todo file, and then relaxing, thinking over what I completed, and then what I would encounter next.

Currently I use the following script to manage my ~/etc/todo/* files. Basically, anything not done from previous days gets automatically bundled into the current day.

#!/usr/bin/perl my $dir = $ENV{'HOME'} . "/etc/todo"; my $today = `date '+%Y%m%d'`; opendir(my $d, $dir); my @files = grep ! /^\./, readdir $d; # drop hidden files like ., .., .svn, etc. closedir($d); $ARGV[0] eq "preview" and do { preview(); exit; }; edit(); ##### sub preview { @files = grep { $_ >= $today } sort @files; map { print $_ . ":\n"; map { print " $_" } `cat $dir/$_` } @files; } sub edit { @files = grep { $_ <= $today } @files; my $todo = join "", map { `cat $dir/$_` } @files; map { unlink "$dir/$_" } @files; open my $f, ">$dir/$today"; print $f $todo; close $f; system "vim + $dir/$today"; }