A Year Of My Heart

A year ago, I decided to get all analytic on my training. Mainly I just like tech and pretty representations of data. So I bought a heart rate sensor. And now it’s been a year of me using it almost every time I train. Which means I can look at a year in the life of Frances training, with all the … whatever that reveals.

What does it reveal, Frances?

Well, other Frances. I trained 156 times — that I recorded, let’s say 170 because I pretty much did not train without it unless I forgot either sensor or phone. For a total of 190 hours — there’d be a few more in that for the times my phone battery died. For a measly distance of 1481 kilometres — of actual training rides, not including cross-town, Kreuzberg-Wedding type stuff, so maybe double that at least, no wonder I spend so much on my bike and it feels like it’s constantly in need of repair. Hey, just like me! (Wow, there’s a realisation, right there.) About 1/3 of that was ballet, another third cycling (mostly road at the moment, but some cyclocross), 1/6 bouldering, and the remaining 1/6th a mix of yoga and core training.

Oh, and supposedly I burned around 121,000 calories, which is about 60 days of eating 2000 calories a day. I’m not really convinced about this. I think it’s more of an imaginary number, and not the mathematical kind.

What else? Speed, both average and top are derived from iPhone GPS. I’m not sure how much dispersion there is in this, but I suspect it can easily be 5km/h or more in either direction. My next gear purchase (after … umm … new brakes and probably new rear derailleur pulley wheels) is a speed/cadence sensor — which probably means also a proper cycling head unit instead of phone …

I seem to unintentionally train in 9-10 week blocks, then give up in despair for a couple of weeks, then, like a goldfish circling its bowl, forget all that and get right back into it. Knowing that this might be my natural rhythm though, it could make sense to train in 9 week blocks with a week off, if for nothing else than keeping my enthusiasm. Also I doubt I’ve been training like that this year, my rhythm’s all over the place.

My maximum heart rate seems to be constant around 190 (excluding the huge jumps into the 200s that were either the battery going flat, the sensor getting jostled, or actual random heart weirdness from having stupid fun training in -10º weather). I dunno, I have no context or expertise for reading anything into these figures, other than I seem to like training if it involves a degree of discomfort and some suffering — which I didn’t need a heart rate sensor to tell me.

So, a year of data. What to do with it? No idea! Will I keep using it? For now, yes. It’s become automatic to put it on. I don’t really use it during training, though I’d use it for cycling if I could find an iPhone mount that could hold my ancient 4S. But mostly I do it on feel, and that corresponds pretty closely to the various heart rate zones. I do do regular post-training gawks, to compare how I felt with actual data — and knowing that data across sessions gives me a bit of a feeling for where I’m at on a particular day or week. And one other thing: I train a lot less than I think.

Worth it for seeing a year of training all pretty like that? Yup!

Polar Flow and H7 Heart Rate Sensor — One Year Weekly Training Report
Polar Flow and H7 Heart Rate Sensor — One Year Weekly Training Report
Polar Flow and H7 Heart Rate Sensor — One Year Daily Training Report
Polar Flow and H7 Heart Rate Sensor — One Year Daily Training Report

Website rsync Backups the Time Machine Way

Continuing my recent rash of stupid coding, after Spellcheck the Shell Way, I decided for Website rsync Backups the Time Machine Way.

For a few years now, I’ve been using a bash script I bodged together that does incremental-ish backups of my websites using the rather formidable rsync. This week I’ve been working for maschinentempel.de, helping get frohstoff.de‘s WooCommerce shop from Trabant to Hoonage. Which required repeated backing up of the entire site and database, and made me realise the shoddiness of my original backup script.

I thought, “Wouldn’t it be awesome, instead of having to make those stupid ‘backup.blah’ folders, to let the script create a time-stamped folder like Time Machine for each backup, and use the most recent backup for the rsync hard links link destination?” Fukken wouldn’t it, eh?

Creating time-stamped folders was easy. Using the most recent backup folder — which has the most recent date, and in standard list view on my Mac, the last folder in a list — was a little trickier. Especially because once a new folder was created to backup into, that previously most recent was now second to last. tail and head feels hilariously bodgy, but works? Of course it does.

Bare bones explaining: The script needs to be in a folder with another folder called ‘backups’, and a text file called ‘excludes.txt’.  Needs to be given chmod +x to make it executable, and generally can be re-bodged to work on any server you can ssh into. Much faster, more reliable, increased laziness, time-stamped server backups.

#!/bin/sh
# ---------------------------------------------------------------
# A script to manually back up your entire website
# Backup will include everything from the user directory up
# excludes.txt lists files and folders not backed up
# Subsequent backups only download changes, but each folder is a complete backup
# ---------------------------------------------------------------
# get the folder we're in
this_dir="`dirname \"$0\"`"
# set the folder in that to backup into
backup_dir="$this_dir/backups"
# cd to that folder
echo "******************"
echo "cd-ing to $backup_dir"
echo "******************"
cd "$backup_dir" || exit 1
# make a new folder with timestamp
time_stamp=$(date +%Y-%m-%d-%H%M%S)
mkdir "$backup_dir/${backuppath}supernaut-${time_stamp}"
echo "created backup folder: supernaut-${time_stamp}"
echo "******************"
# set link destination for hard links to previous backup
# this gets the last two folders (including the one just made)
# and then the first of those, which is the most recent backup
link_dest=`ls | tail -2 | head -n 1`
echo "hardlink destination: $link_dest"
echo "******************"
# set rsync backup destination to the folder we just made
backup_dest=`ls | tail -1`
echo "backup destination: $backup_dest"
echo "******************"
# run rsync to do the backup via ssh with passwordless login
rsync -avvzc --hard-links --delete --delete-excluded --progress --exclude-from="$this_dir/excludes.txt" --link-dest="$backup_dir/$link_dest" -e ssh username@supernaut.info:~/ "$backup_dir/$backup_dest"
echo "******************"
echo "Backup complete"
echo "******************"
#------------------------------------------------
# info on the backup commands:
# -a --archive archive mode; same as -rlptgoD (no -H)
# -r --recursive recurse into directories
# -l --links copy symlinks as symlinks
# -p --perms preserve permissions
# -t --times preserve times
# -g --group preserve group
# -o --owner preserve owner (super-user only)
# -D same as --devices --specials
# --devices preserve device files (super-user only)
# --specials preserve special files
# -v --verbose increase verbosity - can increment for more detail i.e. -vv -vvv
# -z --compress compress file data during the transfer
# -c --checksum skip based on checksum, not mod-time & size – SLOWER
# -H --hard-links preserve hard links
# --delete delete extraneous files from dest dirs
# --delete-excluded also delete excluded files from dest dirs
# --progress show progress during transfer
# --exclude-from=FILE read exclude patterns from FILE – one file or folder per line
# --link-dest=DIR hardlink to files in DIR when unchanged – set as previous backup
# -e --rsh=COMMAND specify the remote shell to use – SSH
# -n --dry-run show what would have been transferred

Ballet & Tech (A First Attempt)

Me (on and off for the last couple of years): “It would be awesome to have a power meter or something so I can go all data on my training…”

Twitter:

Has any dancer ever measured a performance with a fitbit or pedometer? How many steps? How far do they dance? PLEASE will someone do this?

Me (in Jo Siska’s ballet class on Wednesday): “OMG Jo! Look! Data!”

Inaccurate data. But that’s what this is, a test of how to get meaningful and accurate(-ish) data on what goes on when I’m dancing.

When I was living in Wedding, part of my training routine was morning cyclocross rides in the forest around Flughafen Tegel. Last year when I inherited an (old, 4s) iPhone and stuck Trails app on it, I started to see what the intangible feeling of each ride represented. A couple of things were missing though, one of which I finally prodded myself to buy this week – a Polar H7 heart rate sensor (yeah, I got the pink strap). The other is one of those crazy expenses I’m unlikely to throw euros at unless I have around four thousand of them spare for a new bike: a power meter.

Power meters tend to be the province of bike crank arms, pedals, or hubs and cost about double what normal people spend on a whole bike. And none of them are objects you can take into a dance studio. Slightly getting there is the rpm2 shoe insert power meter, still no good for dance though. Which leaves the very new Stryd – and very cheap, not much more than a Fitbit (which I’ll get to later), and about the same size as the H7 – a power meter for runners.

Before all that, Wednesday. In the studio with my heart sensor on and my iPhone beside the barre, cos it uses Bluetooth to sync. That’s several problems right there. First, doing ballet (or generally dance) training with an iPhone lodged somewhere is not so practical, which means a pedometer is going to count exactly zero steps. Second, Bluetooth is possessive, it likes quasi-line-of-sight and proximity. Bouncing around ten meters down the studio with heart monitor facing away from it is going to generate some highly improvised heart rate info. If, for the sake of science, I slip my iPhone into my trackie pocket, I’ll get pedometer info, but any GPS-based data capture (speed, distance, location) is comically useless, having an accuracy of greater than 4 meters. I was dumping my heart info into Trails, which is a fine app for cycling training, and much of the time it had my location not even in the same building, plus my altitude changed by 24 metres.

Thursday on my morning training ride around Tempelhoferfeld, I used both Trails and Polar’s Polar Beat. The data resolution of both is pretty good, Polar Beat is more fine-grained, and neither had a problem with my phone being in the back pocket of my jersey. I’ve been doing enough cycling with data recording to know what looks right.

Which leads me to Fitbit, cos my flatmate has one. It stores the data locally so no need for a live Bluetooth connection. It does heart rate, pedometer, a bunch of other useful garbage, makes pretty data, syncs to phone, laptop, or to fitbit.com, and looks like a dainty watch strap.

So, Friday, ballet again. This time with a Fitbit and my H7 going to Polar Beat.

I’m siding with Fitbit when they say their data accuracy decreases outside fairly limited activities: both heart monitor and step counter are dependant on arms not windmilling for acquisition of useful data. Perhaps it requires repeated use to find the best spot on my wrist, but compared to the H7, Fitbit reported my average heart rate at ~20bpm less – I stuck fingers to neck and what the H7 shows is a good match. As for steps – and ignoring the first 18 minutes or so where I have no idea who it thought I was – it gave around 250 for the entire 40 minutes of barre, and 2200 for the class; obviously not counting a pas de bourée as three steps.

The H7 doesn’t do step counting – unless you pair it with their walnut-sized Stride Sensor somehow affixed to your foot. Its heart data though is magical. You can see every exercise through the class mirrored in my increased heart rate, and check out the centre adage starting at 40 minutes, where the curve is almost identical for both times, and the arc through the entire class, building intensity in small stages at the barre until peaking through the centre into longer and longer periods of maximum effort, before révérance-ing out. I can also look at sections, so if I select just the centre, then my average heart rate goes up to 167 and only once drops below 120. Lots of good data you can do stuff with. (And I can even assign training to Ballet, with a fancy Olympic-looking arabesque!)

But what about power? Or other stuff? Stryd for the power (and heart rate), and RunScribe for everything else? Would they even handle dancing? RunScribe would be awesome for visualising the mechanics of dancing, g-force, velocity, ground contact time, pronation – if it could handle the foot chaos. And then what to do with all this information? If it’s all just for a bit of woohoo! then Fitbit and its social network gamification of sleeping is fine. But if it’s for the purpose of improving performance, technique, being more diligent in how you train, that’s a whole other thing.

Ballet training with Polar H7 Heart Rate Sensor
Ballet training with Polar H7 Heart Rate Sensor
Ballet training with Fitbit Charge HR
Ballet training with Fitbit Charge HR

Gallery

Tanami Track & Desert

Somehow I got from trying to find my way across Berlin to several hours traipsing up the Tanami Track and across the desert in South Australia and the Northern Territory. Along the way I found a couple of impact craters, marvelled at the astoundingly and diversely complex geological processes across central Australia, followed dry, braided rivers to their inland deltas, seasonal lakes and waterways, found airport runways, a scrawl of tracks, trails, roads, paths that faded in and out, cattle stations, groups of houses, mines, diggings, scratchings, was amazed at the quantity of signs of human existence in the blankness, more amazed still by the utter beauty of the land, realised it looked a lot like my favourite kind of art and some of the stuff I was doing a while ago, and I was better just to take screenshots than a paintbrush, also that I am unlikely to ever see this land from the ground, and to see it like this, from surveillance satellites mapping the planet down to metre-resolution is something I’ll never experience.

Well, That’s Disappointing

I’d been waiting for my new MacBook Pro for weeks, and yesterday it finally arrived. I was rehearsing in the evening, so decided to postpone the unpacking until today because I wanted to photograph it like I did six years ago, and because I was planning to install everything anew. Today being lazy, it was around 4:30pm I got organised.

Half an hour later, just when I’m pulling the wrapper off the thing itself, getting ready to plug it in, I discover a fucking dent on the bottom case. A fucking dent. On my new, 2947.00€ MacBook Pro. I couldn’t believe it. I almost said, “aw, fuck it, whatever,” and then thought, “Wait, I just spent three thousand euros on something that I expect to last me six years, which I’ve already chosen to ignore the slightly dirty cable packaging and the definitely not clean bottom case, and now a fucking dent? Fuck this.”

So I packed it back up, put the lid back on the box and called BetterWorx. Oops. Closed. Wait ’til Monday. I’m not even going to speculate on how a new laptop can arrive buggered, but it’s going back and I’m fucked if I’m accepting this one.

16:27, brand new 15" MacBook Pro unpacking excitement
16:27, brand new 15″ MacBook Pro unpacking excitement
17:03, brand new 15" MacBook Pro unpacking disappointment. Yes, that's a fucking dent
17:03, brand new 15″ MacBook Pro unpacking disappointment. Yes, that’s a fucking dent

Mavericks? I would have called it 10.9 Anarchists myself

Mainly it was because iCal and Address Book lose that utterly vile skeuomorphic stitched leather look, and also realising my afternoon was slightly free, and I’d downloaded the 5.31GB of OS X 10.9 Mavericks, and I was dead lusty for all the new stuff, so 40 minutes later or so I was booting on my venerable (but definitely alive) 2008 MacBook Pro into the first non-cat OS in 12 1/2 years. (Actually a bit more because I was messing around with pre-release versions even before that).

And that was easy, wasn’t it? (Besides needing to reindex my Mail which caused 20 or so emails from years ago to try and send themselves until I mashed the ‘off’ button for Wi-Fi). Tabs in the Finder? Nice! Not sure I’ll use Tags, mainly due to having a decade of junk on my laptop already organised. iCal’s new look and the Day view are especially pleasing (though adding notes is still not entirely possible with keyboard). Safari’s Inspector has been given a new set of clothes. iBooks! Awesome! Really brilliant that it’s finally on Macs. And Maps! My short play with it hasn’t revealed whether it can replace my current map choice for tracking my training rides, but the 3D view of around here makes the trees look like Krynoids from Doctor Who: Seeds of Doom.

Important stuff like Apache, PHP, and MySQL worked almost immediately: the former just needing its httpd-vhosts.conf file updated; the mid needing the former’s httpd.conf edited to load the PHP module and the last working without a problem. And that is the easiest setup for my localhost environment ever.

I also had to buy Little Snitch, which no longer worked, but considering how much I use it, it’s €30 very well-spent – especially considering 10.9 was free. Oh, and iWork, Aperture, bunch of other stuff also updated. Pity I can’t afford one of the new MacBook Pros.

New Computer Logic Board!

Oh indeed it’s going mental around here with overuse of the word, ‘New’.

A couple of weeks ago my nearly-four-year-old laptop went completely black when I dragged an image to be edited. Panic! High blood pressure! Gnashing of teeth! Somehow it decided to restart after half a day, and I of course began my usual assault on the internet to find out wtf was that wtf.

“macbookpro4,1 black screen” gave some pretty definitive answers, and as soon as I checked I had the dreaded NVIDIA GeForce 8600 GT graphics card, I was pretty sure I was staring “ugly immediate future” in the mouth.

One large Mac shop nearby Technische Universität was distinctly unhelpful (unlike last year when my top case gave out), and said my laptop wasn’t covered as I had a blaaaahblllaaaa … (won’t dwell on the minutia). So I resorted to running the fan on high which seemed to be the only solution for temporarily deferring inevitable logic board death while I a) tried to get through a stack of work and b) alternately pondered what to do or whined.

Being not one who likes to lose an argument when the price of doing so is about half that of a new laptop, I searched for precedents. Excitement, yes. Found them and called Apple just as my screen gave out again and on the very last day of the four-year period Apple would cover replacement for free, and received a definitive, “Yes, my supervisor says you’re covered.”

All of which found me on Tuesday in BetterWorx, really hoping that previous definitive wouldn’t be graced by a conditional. And I’ve seldom been so happy to see my laptop fall apart when tested as I was when they ran the graphics test and it threw back the NVIDIA failure.

More agonising as I was informed I might not make the deadline and …

Friday arrived and so did my laptop, ahead of the deadline by a scant 8 hours. And!

New 500gb hard drive installed (been sitting on my shelf since before the floods in Thailand doubled the price). Wonky latch also fixed!

I spent last night doing a completely fresh install (ten hours of trawling through all my forgotten system tweaks that suddenly and glaringly weren’t there), and now hoping nothing more goes askew (could do with a new battery some time), and I get at least the rest of the year out of this poor, clobbered thing (pulled an enormous dustball out from under the command key when I noticed the backlight was a little askew).

(This is a thank you also to everyone at BetterWorx.)

Steve Jobs

Because I had dropped out and didn’t have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can’t capture, and I found it fascinating.

None of this had even a hope of any practical application in my life.

actually the whole purpose of this was…

actually the whole purpose of this was…
actually the whole purpose of this was…
actually the whole purpose of this was…
actually the whole purpose of this was…

you see, I got an iPhone.

In exchange for some work. It’s only a 2G, original, 8gb, but…

The first thing I did of course was jailbreak it. And having a choice in the matter, decided on pwnage tool, mainly for the excellent command line stuff. It took all of a few minutes to work out how to do this, courtesy their unlock wizard (which I think makes a mockery of the whole ‘iPhone is a walled garden stifling the true 8-bit 1980s era of computer hackery and creativity’), and having never done this before, was quite impressed with it finishing, syncing with iTunes immediately and enjoying the pleasure of my usual SIM card shortly after.

And then into the wonderful world of iOS hackery and places I’d never heard of before. Lucky my years of schlepping around the similar fringes in Mac OS have given me some familiarity with this side of town. The biggest realisation was this is not just an iPod with a phone attached, or even a consumer media device; it’s an entire operating system and hardware, or to put it in cruder terms, it’s a computer.

It makes me want to play with the iPad also, because I think in all this – the tacit approval of the jailbreaking and hacking community by Apple, the introduction within the native operating system on a user-accessible of things which Cydia and other repositories have had for years, e.g wi-fi syncing, folders, multitasking – it is a conceptually different approach to computers and interfaces.

Or more succinctly, I can do most of what I do on my laptop now on my iPhone. A distinction between can and enjoy is necessary, and further elaborates on my desire to play with an iPad, as the smallness and slowness of the process is tiring, like going back to dial-up. I can do remote server administration with SSH, VNC, FTP, either using graphic interfaces in a variety of apps, or command line in mobile Terminal. I can pass files around and edit them using the same protocols or BlueTooth, Wi-Fi, even making a mountable USB disk. I can read all the blogs in my RSS feeds, and keep them synched with my laptop, the same for Mail, Address Book, iTunes, Calendar – all so elegantly done I don’t even consider that it is being done. Things is equally smooth

Then there’s the stuff I used to invent cludges for between my laptop and phone for when I’d be out – BVG timetables, maps of Berlin, offline route-finding, other excitement like translation dictionaries, my entire library database so now when I wander into a bookshop I know what I might want to buy, a guide to knots, an interactive star map…

The camera though is terrible. Even my old K750c with its broken camera was better. It’s actually embarrassing and Apple should have done a better job earlier because it truly does suck. SMS is also crappy with the default app – speaking of which, many of these I either replaced or hid, though I’d prefer just to delete the atrocious Stocks app, I mean really whose wanker idea was that?

But this isn’t the post on jailbreaking I kept thinking I’d write. This is more about an idea I had, a moment of “… uuhh… … awesome!!!…” when I thought, “if I do this, then that, and it should work, then I’ll be able to do that!”

So… On my iPhone I installed Veency, the VNC server, along with OpenSSH, because there’s nothing like ssh-ing into anywhere to make a smile, and finished off with ISSH. Then I wondered why things weren’t working.

I could get into my phone from my laptop using JollysFastVNC, but not the reverse. Oh, I forgot to turn on Remote Login and Management in System Preferences. So then over on my iPhone, I SSH’d into my laptop, screensharing all around…

MacBook Pro screenshares into iPhone, screensharing into MacBook Pro, screensharing into iPhone, screensharing into MacBook Pro, screensharing into iPhone, screensharing into… yes, the whole point of all this was that I can do this.

(I could have uploaded the files with AirSharing, then shifted them around my iPhone perhaps with iFile and uploaded from there via FTP with FTP On The Go just to prove it was possible, ah but… Oh and it’s a game of Buzkashi, yes, that’s a calf, ohne Kopf.) (And yes, my carrier is the Beast.)

laptop screenshares into iphone
laptop screenshares into iphone
iphone screenshares into laptop
iphone screenshares into laptop

hate/love apple

Lucky I was in London for the long weekend, and so enjoying the longest break from my laptop and the internet I’ve had in years. All the better considering it was in a shop, where I hoped it was being repaired.

By the time my last laptop, a beautiful 15″ PowerBook, had reached the end of its life, it was a decorticated zombie, battery, hard drive, DVD drive all dead, and case bearing the crumbling patina along the front edge, held together with an external portable FireWire drive that when I accidentally knocked the cable would bring everything to a graceful and irreversible crash.

As with my new MacBook Pro, it suffered from some distinct hardware issues. First, the peeling of the light case border, then the death of hard drive and the problematic Matshita Combo Drive. All variously and uncomplainingly replaced by MyMac in Melbourne for free, thanks to the joy of AppleCare.

My new laptop, after several months of far less harrowing use than that PowerBook began to exhibit odd behaviour, the trackpad and keyboard freezing, which after some messing around I realised was caused by the battery. Or rather, the topcase somehow didn’t get on well with the battery. For much of the last – more than a – year, I’ve been using it sans battery, and poking with my finger at the underside of the trackpad to bring it back to life on the occasions I did include non-mains power.

Not much of a laptop then, and despite being all over the Apple discussion boards, this finger-poking fix wasn’t ideal. I took it into one shop in Kreuzberg, and they said it would be difficult to prove I hadn’t damaged the case myself, so for a long time endured an expensive, hobbled device. Finally, as also documented numerously on the Apple boards, even the finger didn’t work.

Gravis is rather shiny and large, in Ernst-Reuter Platz, and I acquired a beautiful 500gb 2.5″ FireWire 800 drive from there for the unthinkably low price of €120 not so long ago. I’m still awestruck by the capacity and cheapness of drives now compared to eight years ago when 20gb was just beginning to pass from acceptable for a laptop. With my now completely paralysed laptop, and me feeling as though I’d had a significant portion of my identity eviscerated, I ventured there shortly before going to London, thinking at worst I could buy an external mouse and keyboard and get another couple of years out of another zombie laptop.

Not so attractive as a friend pointed out, when I keep people’s Macs running as a job, and should really be able to speak highly of them, instead of turning up with a Frankenstein.

At Gravis, they listened to my explanations, notes on the Apple boards, took my baby away for a few minutes, then came back and said I could pick it up this week. Today I did.

On why I hate/love Apple…

Yes, there is the exceptional software and hardware design, but there always seems to be issues that affect a lot of users, and having had two laptops with serious issues it is very easy for me to feel deeply frustrated with the only computer and OS I’d consider using. Really, if I had to use a PC running Windows or more likely Linux, I’d dispense with the hassle altogether and find something else to do.

As with my previous laptop, I bought AppleCare for three years, and as with that previous laptop, it paid for itself the first time I had to use it. My revitalised – and working with battery – baby has an entire new topcase, the price of which, including labour is greater than the cost of this insurance. The simplicity with which my problem was dealt with, fast, no arguing, pleasant, and most importantly, free are the reasons that even though there are problems with hardware and software (and had this one not been dealt with in such a good way, I would be far more pessimistic), I remain in love with Apple.

(Yes, there is a moral to this story, or rather a couple: Buy AppleCare, use the Apple discussion boards to diagnose your problems, and backup early and often.)

(I’ll stop now and caress my beautiful laptop for a while.)