Arun Gupta, Miles to go ...

Arun Gupta is a technology enthusiast, a passionate runner, and a community guy who works for Sun Microsystems.
« Previous day (Jul 24, 2007) | Main | Next day (Jul 26, 2007) »

http://blogs.sun.com/arungupta/date/20070725 Wednesday July 25, 2007

Ready For San Francisco Marathon

4 - days to San Francisco Marathon
24 - weeks of Training (including this one)
2 - weeks of Taper Down (including this one)
656 - miles of Running (excluding this week, once again jMaki helped me calculate the total mileage)
6 - long runs
4 - Personal Records (PG&E, PG&E again, 7-mile, PG&E yet again)
4 - fellow runners from Family & Friends

And I'm ready.

For friends who'd like to cheer me up in person, here is some information:


For fellow runners, wish you all good luck and here are few references:

  • Packets can be picked at One Market Plaza on July 27th (11am-6pm) or 28th (9am-5pm) and find your bib# here. Race shirt is available at the Expo after packet pickup (Justin Herman Plaza).
  • Full Marathon Pace Groups are available with a finish time from varying from 3hr to 5hr 30 min. First Half and Second Half pace groups are available as well.
  • Pace Calculator - This tool calculates split times for Aid stations along the marathon course based on a desired finish time. It accounts for uphill and downhill, as well as increased fatigue that might be expected later in the race, by applying different “weights” to each section. A more generic version of this tool is available at Marathon Pace Band.

And for those whose wishes are always with me and will not be able to participate in person:

  • Live results will be available here and you'll hear my story afterwards on this blog and whenever we meet :)

Wish me luck, my goal is to finish the marathon in less than 4 hours.

Technorati: running runsfm

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

Total Running Mileage Mashup with jMaki

I updated the running log filter to the one given below. This allows me to generate the total running mileage of all the weeks. The changes are highlighted in this color:

jmaki.namespace("jmaki.filters");

myDays= ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
oneDay = 24*60*60*1000;

function addDays(myDate, days) {
    return new Date(myDate.getTime() + days*24*60*60*1000);
}

function formatDate(myDate) {
    var dateString = String (myDate.getDate());
    dateString = (dateString.length == 1 ? "0" + dateString : dateString);
    return (myDate.getMonth()+1) + "/" + dateString + "/" + myDate.getFullYear();
}

// convert Running blog feed to the jMaki table format
jmaki.filters.tableModelFilter2 = function(input) {

    var startDate = new Date();
    startDate.setFullYear(2007,1,12); // Feb 12, 2007
    var _columns = [
        {title: 'Title'},
        {title: 'Day of The Week'},
        {title: 'Date'},
        {title: 'Mileage'}
    ];
    var _rows = [];

    var totalMileage = 0;
    for (var _i=0; _i < input.channel.items.length;_i++) {
        var weekNumber = input.channel.items[_i].title.split(' ')[1];
        var weekStartDate = addDays(startDate, (weekNumber-1)*7);
        var desc = input.channel.items[_i].description;
        desc = desc.slice(0, desc.lastIndexOf("</span"));
        var spanArray = desc.split("<span");
        for (var _j=1; _j < spanArray.length; _j++) {
            var span = spanArray[_j].split("</span>")[0];
            if (span.search(/run/) == -1)
                continue;

            var runDay = myDays[_j-1];
            var runDate = addDays(weekStartDate, _j-1);

            mileageInt = parseInt(dayMileage);
            totalMileage += mileageInt == "nan" ? 0 : mileageInt;
            var row = [
                'Week ' + weekNumber,
                runDay,
                formatDate(runDate),
                span.split(': ')[1]
            ];
            _rows.push(row);
        }
    }

    var summaryRow = [
        'Final Week',
        'Last Day',
        formatDate(new Date()),
        totalMileage
    ];

    _rows.push(summaryRow);
    return {type : 'jmakiModelData', columns : _columns, rows : _rows};
}

The updated web page looks like given below. Notice the first row of the table gives the total mileage:

Technorati: jmaki mashup running web2.0

del.icio.us | furl | simpy | slashdot | technorati | digg |
|
« Previous day (Jul 24, 2007) | Main | Next day (Jul 26, 2007) »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.