Weekly Summary

Wednesday: 30 mins yoga
Thursday: 45 mins yoga (torture)
Saturday: Run 8.2 miles 68:00 – 8:18 per mile
Sunday: Run 4.3 miles 34:32 – 8:02 per mile

Yoga is harder than it looks. It requires a lot more muscle strength than you would expect, in muscles you didn’t know existed. The running is ok. I am pleased with the times. 8:18 per mile is neither good nor bad, but keeping it up for 8 miles in a row is good, especially as 8 miles is about my limit right now and leaves me with quite a lot of aches. AH. I remember when running 2 miles used to leave me aching. I am hoping the yoga will get me some more muscle strength, but we’ll see.

SO, being a bit of a nerd, it was only a matter of time before I tried logging my exercise somehow. I resolutely refuse to own a smartphone, so GPS tracking apps and whatnot, cool though they are, are right out. Sports watches and the like seem very expensive, so instead I go with the old fashioned method of using a stopwatch and then putting my route into Google maps to see how long it was.

I was tempted to create a little web-app to record the data, but in the end I couldn’t be bothered with the tedium of going from SQL to PHP to JSON to JavaScript objects (don’t talk to me about NodeJS and NoSQL – they’re great, and perfect for keeping things simple and consistent, but I already pay for PHP/MySQL hosting and don’t want additional expense. And if I don’t host it remotely I have to figure out remote backups, which I’ll never do), and that’s before I even consider the snoozefest of creating all the boring CRUD forms. So instead, I decided to create… a Google spreadsheet? Apparently I am a chartered accountant now.

It turns out you can have a set of raw data records and use a thing called a Pivot Table to create a kind of view/report onto it. I was really excited to see how easily it let me get 50% of the way there. I am particularly impressed that it’s easy to write custom functions in JavaScript. It’s brilliant, really, it massively extends the spreadsheet’s capabilities in a nice language (yes, JS is nice, go away).

But then I was really disappointed to see how difficult it is to get me the rest of the way. Although I can write custom functions, I can only invoke them in my data records; I can’t tell the pivot table to group on a calculation – it has to group on a piece of data in the original set. Which means that if I want to group on year and then week, it’s not enough to have a ‘date’ column in my record, I must also have a year and week column. Ugly!

Furthermore, my minutes per mile is calculated by dividing the minutes field by the miles field. Makes sense. But 8.29268292682927 minutes is no use to anyone; I want to see 8:18. It’s trivial to write the routine in JS, but then you end up with a string, which can’t be averaged in the pivot table, because the pivot table has a hard coded list of aggregation functions it allows, and none of them understands what to do with [“8:43”, “8:02”, …]. Two (very obvious) features would fix this:

1. The ability to choose a different function (which should include the functions you can add via JS). I don’t understand why I can write custom functions, but then not be allowed to use them in pivot tables.
2. The ability to write custom formatting functions – there’s a plethora of numeric formatting options, but formatting a decimal minute as a human readable minute is missing. I could keep the average on the decimal, but then flick the cell formatting to my own routine. I don’t understand why I can write custom functions, but then not be allowed to use them for cell formatting.

Ironically, I have spent the last year working on a database system, which is very rough around the edges, and in fact, the middle, but would actually handle this kind of thing quite well.


I like blogging

Tagged with: , , ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: