Category Archives: Life

Teaching myself programming under lockdown

As with many of us, COVID-19 has given me an abundance of free time, and I’ve been using it to do something I’ve tried and failed to do numerous times over the years: to teach myself to code.

I can remember going straight from devouring HTML For Dummies and using it to build the Shenmue Fan Site, circa 1998, to C For Dummies – how different could they be? The realisation of those surefire smash hit game ideas I’d sent to my favourite developers as a kid was imminent.

That plan lasted all of an evening. HTML and C are quite different, as it turns out.

Since then JavaScript, PHP, more attempts at C, Python and Swift have fallen by the wayside. Books, PDFs, online tutorials, and even children’s learning resources clutter my hard drive. I’d done enough to understand the fundamentals but have always failed to find the time or impetus to make it stick.

So, in the early days of lockdown, when I was climbing the walls with boredom, I had a go with Swift Playgrounds, which has recently made its way to macOS from the iPad. It’s designed for kids, but I found myself sitting up late, replaying levels and trying to craft more efficient solutions or get my head around the logic.

At a certain point, though, it seemed like a waste to be putting so much effort into a kids’ game, when I could be learning the real thing. I had time with a three-week furlough coming up, so I set a lockdown resolution: I will learn to code.

Python Crash Course cover
Python Crash Course by Eric Matthes

The book that finally cracked it for me was Python Crash Course by Eric Matthes, which I got in a Humble Bundle and, at the time of writing, is once again available there. Python is a popular choice as a first programming language and it gets a thumbs-up from me – it’s quite straightforward, and an interpreted language is more friendly when you’re making those beginner’s mistakes.

What’s more, Python is the de facto programming language of the Raspberry Pi if you want to get into hardware projects and is a big player in proper fields like machine learning too.

Anyway, like most coding books, it takes you through the principles of programming chapter-by-chapter, then into several larger projects that apply your new knowledge into crafting actual useful software. Get that far and the sense of achievement when hours of work takes you from a blank text file to an actual playable game – the first I’ve written in 30-odd years of merely playing them – is something else.

I wrote that! So will anyone else who works through that book, admittedly, but I’ve carried on working on it until my version has music and sound effects, and I replaced the single, ephemeral high score with a persistent top 10 leaderboard. Even writing the lion’s share of the game’s functionality parrot-fashion has taught me so much about the inner workings of how a game is structured.

A project like this, which will give you a useful skill and a sense of achievement, is what everyone needs in these strange times. I’m now confident enough to try putting together a few software ideas that have been rattling around in my head for a while, I’m dabbling in more applied Python books, and I’ve got my eye on finally cracking C this time.

Stay safe, and take advantage of lockdown while you’ve got it.

Running with the Apple Watch

Apple Watch Workout appI’ve been running for a couple of years now, having started with a C25K programme and working my way up to regular 10Ks, 10 miles, obstacle runs, and several 5Ks a week. I’m doing my first half marathon in April and, assuming that goes well, might do a full one in October. Rain (sometimes) or shine, on a weekday evening I’m a regular somewhere along Bournemouth seafront, where you’ll find me somewhere between Boscombe and Sandbanks.

Until now I’d been tracking my runs with my phone strapped to my arm with Strava, but waking up on Christmas morning to a brand new Apple Watch provided an opportunity to improve my fitness tracking.

Integrating Apple’s Workout app with Strava

Apple Workout run in progressApple’s Workout app is excellent, offering support for tons of different activities and providing lots of lovely stats afterwards. It can track my heart rate during and after a run, syncs with numerous other devices without needing to pay a premium subscription, and doesn’t provide the bafflingly inflated calorie estimates that Strava is known to do.

My problem was that I had several years of runs and a handful of similarly inclined friends on Strava, and I didn’t fancy losing that social aspect, not to mention my PBs on the numerous Strava segments I regularly run.

Strava has its own Apple Watch app, of course, and it’s perfectly functional and capable of depositing its runs into the Activity app alongside any Apple-tracked workouts. In fact, my first run with an Apple Watch, on Boxing Day, was tracked with the Strava app. But it lacks some of the stats, including heart rate recovery (being a native app, Apple’s Workout can keep tracking your heart rate after the run has ended) and those all-important GPS-tagged route maps. And since I was going to be using Activity for tracking weight training and other workouts anyway (Strava is limited to running and cycling), I was keen to streamline things by using one app for all my exercise.

The solution, then, would appear to be liberating my Apple-tracked data and dropping it into Strava. But that’s not always an easy thing to do with Apple.

HealthFit solves the problem

Trying a failing with a few apps, I came across HealthFit, which, wonderfully, does exactly what I need it to and nothing else – the last thing I wanted was to bring a third fitness-tracking service into this. All it does is export your workouts from Apple’s Activity app in the widely supported Garmin .FIT file format, where they can be saved to your iCloud Drive, emailed or automatically uploaded to a number of different services, Strava among them (the others are TrainingPeaks, SportTracks, Final Surge, Selfloops and Dropbox).

Exporting an Apple Watch Workout run to Strava in HealthFit
Exporting an Apple Watch Workout run to Strava

A few taps and my run is exported, and it’s a matter of moments before Strava pops up a notification that it’s ready to view in its app, indistinguishable from a Strava-tracked run. Better, in fact, since my exported runs feature heart rate charts – a Strava Premium feature if I used their Apple Watch app.

The only niggle was that, since Strava was installed on my phone and allowed to write its workouts to the Health and Workout apps, anything exported into Strava through HealthFit was appearing twice. That was solved by simply revoking that permission in the Health app (in the Sources menu), giving Strava read-only access.

Conclusion

Were I not into fitness, I’m not sure I’d find the Apple Watch worth it. A timekeeping and notification machine is cool, but a questionable value proposition. However, if you throw in comparable fitness-tracking to the high-end offerings from Fitbit – at the time of writing the only Fitbit with built-in GPS is the Ionic watch, which starts at £299, or only £30 less than the much more flexible Apple Watch Series 3 – and it becomes much more justifiable. The fitness-tracking focus of watchOS 4 suggests that a couple of years on the market has led Apple to a similar conclusion.

The Apple Watch is the absolute definition of a technological luxury item, completely unnecessary but kind of cool when you have one. It’s a fantastic fitness-tracker, though, particularly for outdoor activities, and the sheer omnipresence of iOS means, by proximity, any fitness-focused online service is likely to have some level of support. This comprehensiveness, coupled with the constant nudges to close my rings, is often enough to get me out when the cold weather and post-work fatigue might otherwise tempt me to take an evening off.

See you in Southampton!

Returning to Japan

AkihabaraIt’s been 11 years since I last went to Japan, which seems particularly long given that I went twice in the space of a year back then.

I’m going back in less than a month, and this time will be particularly interesting. For one thing, I’m going with a much-reduced interest in games, which was always one of the attractions before. I’ll check in at Akihabara once or twice, of course, and I might try to squeeze in a visit to Yokosuka, but this time I’m going to be travelling all over, from Osaka to Hiroshima, Hakone to Miyajima. Maiko performances and onsens rather than afternoons spent in Super Potato. I’ll be with friends, most of whom have never been before and couldn’t care less about whether my Dreamcast games have spine cards.

I doubt I’ll be doing anything resembling blogging beyond a few updates on Facebook, Twitter and Instagram. But expect photography. Lots and lots of photography. I have two cameras, unlimited data, a lot of cloud storage and, by God, I know how to use them.

A slow year for games

Yesterday’s update on my HTPC was my first post on here since my annual look at the best of the year, a gap of nearly ten months. I must have a lot of exciting games to talk about after such a long hiatus, right? Well, no.

Truthfully, the back end of this site is loaded with unpublished drafts of hands-on impressions of the impressive HTC Vive, the gloriously nostalgic revival Doom, The Witcher 3’s standard-setting expansions, the ridiculously gorgeous Uncharted 4, and even a handful of books. None more than a few paragraphs and all abandoned after my failure to arrange them into a coherent post in time for a timely publication.

Really, though, that about sums up my gaming for the year. There hasn’t been much of it. I’ve played some Doom, Witcher and Rainbow Six over the last couple of evenings, which was my first time on a ‘proper’ game in nearly two months, judging by the timestamp on my Doom save. I moved to a new flat in December and sold a lot of the family silver to pay for that, so even my collection looks threadbare and shorn of its crown jewels. Invitations from gaming friends to arrange a game in Battlefield 1 this weekend have been rejected because I haven’t even bothered to preorder it. I’m helping my girlfriend move house in preference to playing a new Battlefield. What’s happening? It’s like I’ve become an adult or something. *shudder*

I’ve been one of those people who talks about games more than actually plays them for a while now, and this indifference has recently acquired a pining for the old days and a cynicism of what now constitutes a game. An occasional release will pique my interest and bring me out of retirement – Persona 5, Red Dead 2, The Last Guardian and, of course, Shenmue III are a few that will do that over the next couple of years – but I now struggle to put together a top ten for the year simply because I haven’t played that many games.

Don’t expect things to change any time soon. My only preorder for the rest of the year is for a Nintendo Classic Mini, after all. But I’m still here, and I’m going to keep posting.

Bournemouth in the Premier League

Me and my brother with Alex Ferguson at Dean Court, circa 1996.Strictly speaking, I’m not an AFC Bournemouth fan. I’ve been a supporter of Manchester United since I was a kid and always will be. But I am a lifelong Bournemouth resident – no United fans actually live in Manchester, remember – and I remember going to Bournemouth games with my dad and uncle. I remember watching on TV as they literally passed a bucket around in the Winter Gardens to collect donations to stave off bankruptcy, and that’s not the only time I’ve seen it minutes from the end.

I met Sir Alex Ferguson and David Beckham in the tunnel at Dean Court when United came down for a pre-season friendly and my dad sponsored the match ball, circa 1996. A close family friend has the dual claims to fame of being a former Bournemouth player and an answer to a question on A Question of Sport. (It was on sports people named after body parts, incidentally.) My dad has a framed photo from the Daily Express on the wall showing the Bournemouth goalkeeper making a save as the Cherries beat Stoke City 4-0, his company’s logo on the hoarding below him.

It’s a club I have numerous connections with, in other words, and therefore also a lot of fondness. That’s what’s left me so chuffed over what’s happened today. Bournemouth in the Premier League is surreal and wonderful to see. It’s still odd to type, like it’s something that happens to other, better resourced clubs: Bournemouth in the Premier League. How on earth did that happen? Officially it hasn’t yet, admittedly. I hope I’m not looking back on this post with embarrassment after Charlton’s prediction comes true.

Good luck to them. They’ve played great football this season and are about to become very rich indeed – a far cry from shaking buckets for pennies. Becoming a Premier League fixture is perhaps too much to hope for, but you never know. Other clubs have come up and impressed, even if they don’t stick around for long. Invest it wisely and be a Swansea rather than a Portsmouth.

But that said, when Bournemouth visit Old Trafford, I’ll be sitting in the home end.

Passage to India

A couple of hours from now I’ll be on my way to India for a couple of weeks, my first foreign trip since I went to New York in 2009. I don’t think I’ll be going on a tour of the major locations from Temple of Doom or anything, but you never know. In any case, a trip like this is long overdue.

And it better be good, considering how many injections, visa applications and unexpected expenses I suffered for this jaunt.

I’m doing without my computer and phone, so my connectivity will depend on Internet cafes and my ability to remember my 30-character gibberish logins without 1Password, so don’t expect what updates I make to be particularly verbose. But I do plan to take a lot of photos and video, having finally replaced old faithful with another Lumix, and will post them here and on Twitter. I don’t often test WordPress’s gallery functionality, but when I do, I do it during altitude acclimatisation in the Himalayas.