1. Death Stats

    2009-05-03

    Inspired by this blog post by Tim Ferriss and the letter “On the shortness of life” by Lucius Seneca contained therein, I created a “death stats” script to help remind me to make good use of the time that I have left.

    Of course, I could die in a car accident any day, but we have to think of these things practically and probabilistically.

    The script runs in Bash — you’ll need a Mac or Linux machine, or Cygwin on Windows I suppose, in order to run it. I have it running on my webserver and emailing me each morning via a cron job. The math should be pretty self-explanatory, and you could easily add your own metrics. Note that I’ve changed my exact birth date for the posted script here, since in some situations that could be considered confidential information.

    The estimated death date I got using the “Normal” mode of the Death Clock.


    #!/bin/bash
    # Prep
    # YYYYMMDD
    BIRTHDATE="19820301"
    DEATHDATE="20570127"
    DAYSPERYEAR="365"
    SECONDSPERDAY=$((24*60*60))
    SECONDSLEFT=$((`date -d $DEATHDATE "+%s"`-`date "+%s"`))
    SECONDSTOTAL=$((`date -d $DEATHDATE "+%s"`-`date -d $BIRTHDATE "+%s"`))
    # There's probably a nicer way to format the percentage but this works
    PCTOVER=`echo "scale=2; (($SECONDSTOTAL - $SECONDSLEFT) / $SECONDSTOTAL)*100" | bc | sed "s/\.00//"`
    DAYSLEFT=$(($SECONDSLEFT / $SECONDSPERDAY))
    YEARSLEFT=$(($DAYSLEFT / $DAYSPERYEAR))
    # Output
    echo "Percent Over: $PCTOVER"
    echo "Days Left: $DAYSLEFT"
    echo "Years Left: $YEARSLEFT"

    The output looks like this (the numbers are made up):

    Percent Over: 29
    Days Left: 19002
    Years Left: 51

    I do hope and think it reasonably likely that Ray Kurzweil is right, and that my life could be substantially extended, but I’m not counting on it, and I don’t think I should — it would kind of defeat the purpose here. Read the letter by Seneca in Tim Ferriss’ post to see what I mean.

    Suggestions for improvements to the script are welcome.

    NB: This doesn’t work on OS X, because the date command is different.

  2. LaTeX Word Count

    2008-11-17

    I’m working on my graduate thesis in the LaTeX document mark-up format, and trying to apply Anthony Burgess’ Martini Method. Basically, set a certain desired word count and let yourself relax after you’ve achieved that word count every day. I started off pretty well with this method, but the next day my wife Amanda went into labor, and my productivity has basically been a train wreck ever since.

    I’m getting back on the horse.

    Anyway, it’s a little tricky to apply the Martini Method when using LaTeX — as a markup language a bit like HTML, it’s full of special words, symbols, characters and whatnot that are not actually part of what you’re writing. A simple Emacs word count will not do the trick. Much as I’d love to count all of those extra words, the point here is to produce a certain volume of output and that would miss the point. Plus, it’s dishonest. There exists a PERL script that will parse LaTeX and count the non-special words. However, someone’s gone even a step further and made a nice web interface for it, with color coding and everything. That interface is here, apparently hosted by one Einar Andreas Rødland in Norway.

    So far, it’s working quite well for me. Unfortunately, it just informed me that I’m not quite to my desired word count yet. More writing!

  3. My GTD Set-Up Page

    2008-05-05

    I’ve added a page to this site describing my GTD set-up, in case anyone might find something useful there. You may find it using the “GTD” link in the menu, or by clicking here.

  4. Using Jott, Sandy, and Google Calendar Together

    2008-03-29

    I want to tell you about how three different services (along with my own PHPMyGTD application) and my phone have changed the way I handle my appointments and reminders.

    (more…)

  5. Sandy Now Has Private iCal Feeds

    Sandy has had iCal feeds for a while, but I couldn’t use them with Google Calendar. Well, now they’ve created “private” iCal feeds. I use quotes on “private”, because it’s not really protected in any way, except that it has an obscure, randomly-generated URL. However, this is good enough for an application like Sandy.

    I’m going to post soon about how I use Sandy, Jott, and Google Calendar as a combined virtual assistant. Sandy aims to be a good virtual assistant on her own, but there are some advantages to using Jott and Google Calendar with her.