When it doesn't just work

Posted on 2023-12-08 10:32 +0100 in Tech • Tagged with Apple, watch • 3 min read

My journey into the Apple ecosystem has been gradual but all-consuming. I've gone from, around a 8 years ago, being unconvinced about how good the whole Apple world is, to pretty much having all the hardware they make available, in some form, that I have an actual use for1.

One of the devices I was late to, but won over by, after moving away from Android to iPhone, was the Apple Watch. These days I have two: the original SE, and also a Series 8. Generally I've marvelled at just how seamless the experience is. I swap watches: the connection to my phone "just works" and it figures all that out. Stuff syncs. Stuff stays in sync.

I lean heavily on the watch. The Series 8 is my daily driver, and the SE acts as my nighttime tracking device while the 8 charges and I sleep.

I record walks. I record runs. I record lots of heart rate data. I pay for things, pretty much everything, with it. I... take it for granted really.

My main watch face

Yesterday though, something odd started to happen. I noticed that some things didn't seem to be syncing from my watch to the phone. Health-related things weren't turning up. A recorded workout didn't show. The control of all things audio seemed to decouple and the watch kept taking over use of my AirPods from the phone in an annoying way I'd never experienced before. Things like that.

I tried a reboot of the watch. Stuff turned up.

It happened again. I tried a reboot of the phone. Stuff turned up.

It happened again.

I then rebooted watch and phone, stuff seemed fine, and I didn't think much more about it.

Then this morning I swapped from the SE back to the Series 8 as I sat down for breakfast, my usual routine, and the syncing was failing again.

This, for me, this is when Apple stuff gets really frustrating. There's no easy or obvious way to diagnose what's going on. Like: I could not sync some health data from the watch to the phone, but I could use "Find My" to ping the watch (presumably a difference in communication route, BT vs Wi-Fi perhaps). There's no obvious error dialog. There's no obvious log to look at. There's no "your BT is borked" alert or something.

Searching online the advice seemed to be the nuclear option: unpair the watch, reset it, start again. So I've done that this morning and it's been quite the pain. Getting it set up again was straightforward enough, but having to go through the whole thing of dismissing all the "here's some tips on how to use this watch you've had for a year and used every day" cards was annoying, also having to set up my payment cards again was annoying. Also, and this is on me for not backing them up recently, trying to recreate my watch faces from memory and remembering which ones they were based on was also annoying.

Apple are actually so good at a lot of this seamless shit; but damn do I wish they'd also be good at making a tool that lets you easily and smoothly diagnose some issues. I would imagine sync issues between watch and phone are common enough that a wee tool where you run through diagnostics, and where there's a Q&A to help narrow down the issue, would be a great experience.

Anyway... it seems to be up and running again, so hopefully that's that issue solved. I tried a couple of things that would need to sync from the watch to the phone and they showed up instantly; actually faster than I've been used to for quite a while.

Fingers crossed...


  1. During a conversation about this at work the other week, I think I figured out that the only Apple product category in which I don't own an example of the hardware is displays2. :-/ 

  2. When the VisionPro comes out I'll be able to say there's two. 


Fender Mustang Micro

Posted on 2023-11-05 20:28 +0100 in Life • Tagged with music, guitar • 2 min read

The urge to go gadget crazy, when getting a new hobby, or reviving an old one, is a real thing. Having recently bought the new guitar with a view to trying to learn to play properly, it's something I'm very mindful of and doing my best to avoid. However, in the middle of the week I did crack and buy one little extra thing:

Fender Mustang Micro

As I said in the previous blog post about the guitar: I ended up getting something that could be played acoustic without being annoying for neighbours, which in turn meant I didn't need any sort of amp, or pedals, etc. This has been working out just fine. But early last week, in an idle moment, I was looking up what might be good options for a small amp for practising should I want to and I stumbled on the Mustang Micro.

Reading up on it and checking out some reviews, it sounded perfect for my setup. I enjoy living in a small space, so could do without a proper amp kicking about, so something that just plugs right into the guitar sounded ideal.

I added it to a list of things to keep in mind and then... a couple of days later I was working from home which meant I'd be about to receive a delivery if I was to place an order and... oops!

I've been using it every day since it turned up and I'm so damn impressed! This thing might be small, but it's pretty mighty! For a complete notice like me, to muck about, and fiddle and get some great sounds out of it, I couldn't have asked for anything more.

The Options

The range of amp styles is way more than I could possibly do justice right now, but what's important for me is it's got versions that are nice and clean, and versions that are dirty and distorted. The effects are pretty much spot on too; there's everything I could ever possibly want there.

My only real complaint about it is that the UI itself -- small lights that use colour to indicate their setting -- is terrible. I don't know how else they could have done it, but I know this is bad. I am at least grateful that it's standalone and doesn't require some app on a phone to control or something like that.

I know it's going to take a while for me to get the most out of this, but already it's giving me a bit more confidence to experiment and doodle away in idle moments. Also, the USB connection means it can be plugged into my Mac, presumably allowing me to record with GarageBand or similar software. While I wouldn't use it to subject anyone to my terrible playing, that will be something for me to explore in terms of keeping a record of my progress.


Evolve Words

Posted on 2023-10-31 21:39 +0100 in Coding • Tagged with Python, evolution, biology, terminal, textual • 2 min read

This follows on from my previous post. If you've not read that, it's worth having a dive in first for the background.

The Ruby code I mention, that was written back in 2008, was actually a pair of scripts. The first one, called selection, did what visual-selection does, only visual-selection does it with a nice TUI interface: it takes a random collection of letters and symbols and evolves them into a target phrase.

As covered before: I don't remember all of the details of the conversation that was going on at the time, but I do seem to remember something along the lines of "yes, but you start out and end up with something the same length" and "nothing more complex is made" (let's gloss over the whole "complex" thing for now... well okay let's just gloss over it, end of story; this is just a fun coding exercise).

What I do remember is that the seed of an idea was planted. Fine: how about I start off with one small word, and using a list of English words as the "fitness landscape" that the mutations had to survive in, mutate a population over and over and see what happens. Would I "randomly" create known words, with fewer letters, with the same letters, with more letters?

So this version of the code randomly did three forms of mutation: it would randomly flip a letter, or randomly delete a letter, or randomly insert a random letter. It would do this over and over and eliminate words that aren't in the original list (the simple form of selecting for survival within the landscape).

Like I said last time: never going to convince anyone of anything, but fun to write some code.

This version became selection2.

So, having turned selection into a TUI application with Textual, I had to do the same with this code...

Evolve Words

As before, because it's fun to do so, this leans heavily on the worker API and textual-plotext.

If you want to check out the app itself there's a GitHub repo and it can also be installed from PyPi using pipx.


Visual Selection

Posted on 2023-10-26 18:50 +0100 in Coding • Tagged with Python, evolution, biology, terminal, textual • 4 min read

Over the last few weeks I've had a couple of sessions of working on a library to wrap Plotext -- a popular terminal-based plotting library for Python -- so that it can easily be used in Textual apps; textual-plotext is the result.

I feel it's come together pretty well

But... I've been itching to find a reason to use it in a project of my own.

Meanwhile...

Back in the mid-2000s, when phpBB systems were still the fashion, I used to hang out on a site that was chiefly aimed at the atheist and secular humanist crowd. We'd get a good number of drive-by YEC types who'd want to argue (sorry... debate) and often talk nonsense about biology and the like.

Now, I'm no biologist, I'm no scientist, I'm just a hacker who likes to write code for fun and profit; so any time there was a chance to write some code to help illustrate an idea I'd jump at the chance. I forget the detail now -- this was back in 2008; 15 years ago as of the time of writing -- but one time I remember a conversation was taking place where someone was just flat out claiming that "random mutation" can only cause "loss of information" and could never lead to a "desired result", or some such thing.

If you've ever had, read or watched those debates, you'll know the sort of thing I mean.

So that got me thinking back then, could I write something that could give a simple illustration of how this doesn't quite make sense?

So I had a little hacking session and came up with some Ruby code1 that did what I felt was the job. You'd give it a phrase you wanted it to generate (a stand-in for the current "fitness landscape", in effect), it would then generate a totally random string of that length, and then would set about mutating it, finding mutations that were "fitter" than others (a stand in for selection), breed the best two so far (randomly copy one chunk from another to create a child), then repeat over and over.

When I first wrote it I wasn't sure what to expect; would it ever finish given a reasonably large target string?

It did.

It was fun to code.

It got posted to the BB and of course wasn't in any way persuasive to them (honestly I never expected it would be). I seem to recall it being hand-waved away with calls of there obviously being an intelligent designer involved2.

Anyway, the "meanwhile..." in this: a few times this year I've thought it could be fun to rework this in Python (it's really not that complex after all; just a string-chopping loop really) and use Textual to put a fun UI on it.

So, that's what I did, complete with textual-plotext plot:

Visual Selection in action

While, 15 years on, this isn't going to convince anyone of the underlying point, I think it does serve a good educational purpose. It shows that you can create a fun UI for the terminal, with Textual, with not a lot of code. It also shows off how you can easily create dynamic plots. Plus -- and I think this might be the really important one -- it shows you can write "traditional" tight-loop code in a Textual application and still have a responsive UI; all thanks to the worker API.

The heart of the code for this application is this:

environment = Environment("This is the target string we want to create!")
while not environment.best_fit_found:
    environment.shit_happens()

Sure, there's some detail in the Environment class, but you get the idea: while we've not hit the target, let life find a way. A loop like that would totally bog down an application with a UI without some other work taking place. With Textual and workers the resulting method in the application, complete with code to send updates to the UI, really doesn't look much different:

@work(thread=True, exclusive=True)
def run_world(self, target: str) -> None:
    worker = get_current_worker()
    environment = Environment(target)
    iterations = 0
    self.post_message(self.WorldUpdate(environment, iterations, *environment.best))
    while not worker.is_cancelled and not environment.best_fit_found:
        environment.shit_happens()
        iterations += 1
        if (iterations % 1000) == 0 or environment.best_fit_found:
            self.post_message(
                self.WorldUpdate(environment, iterations, *environment.best)
            )
    if environment.best_fit_found:
        self.post_message(self.Finished(iterations))

I honestly think the worker API is one of the coolest things added to Textual and I so often see people have real "woah!" moments when they get to grips with it.

Anyway... I've covered science, religion, and how Ruby is better than Python, so I'm sure I've annoyed almost everyone. Job done I guess. ;-)

If you want to check out the app itself there's a GitHub repo and it can also be installed from PyPi using pipx.

Expect it to be my tinker project of choice for a wee while; there's a couple of other things I'd like to add to it.


  1. Possibly unpopular opinion with some folk who will read this, but I've long been a fan of Ruby as a language and actually generally prefer it to Python. 

  2. Me, the coder. While utterly missing the point of a simple illustration, while apparently not understanding the concept of an analogy, I guess at least they felt I was intelligent? 


Constant Siri voice loss

Posted on 2023-10-20 13:04 +0100 in Tech • Tagged with Apple, iPhone, Siri • 1 min read

This seems to have started with iOS 17, and I can't narrow down the how and the when of it happening, but over the last week or so I've found that every couple of days Siri seems to lose their voice. By this I mean the high quality voice that's used when they speak seems to disappear. I notice this when I ask my phone or headphones a question or to do something, and I get a really low-quality voice that speaks back to me.

The voice itself seems to be a version of the voice I normally use, but like it's using an on-device much-cut-down version. If I go into the settings to check what voice is selected, it's the one I normally use, but it wants to download it again.

Downloading the voice all over again

Sure enough, once the download is complete all is good again. I've not kept track of when it happens -- and I think I should from now on -- but it feels like it happens every couple of days; I almost always notice it first thing in the morning, the first time I ask the phone or the headphones something.

I hope it is some sort of iOS 17 weirdness and is gone when 17.1 turns up.


A new guitar

Posted on 2023-10-20 08:39 +0100 in Life • Tagged with music, guitar • 3 min read

This one has been brewing for a year, more or less. Now that I commute into and back from Edinburgh most days of the working week, I find myself walking past a couple of music shops. Seeing these reminds me of the days, back in my 20s, when I mucked around in a couple of bands and had fun making noises on a bass guitar. Since that time I've also owned a cheap six string electric, which is currently in storage (and has been since 2016) and an acoustic, which I have with me but I live in an apartment building and I'm not an arsehole so I never play it.

So, yeah, walking past those shops has made me want to muck about on a guitar again. I've never properly learnt the guitar, I've just managed to learn enough chords to make some noises I like for my own amusement, but even then I've not picked one up since around 2016 and what little I do know is very rusty.

Add to the above: earlier this year I was at a friend's and admiring her collection of bass and six string guitars and picked a couple up and realised I could not play anything. It had been too long, I'd lost most muscle memory and coordination, and what little knowledge I had.

So this made me want to fix this even more.

Given the apartment thing I decided on a plan: how about I get an eclectic, and then some sort of amplification that would always rely on headphones? Given such a setup I could knuckle down and try and learn properly.

So, this week, being on holiday, I told myself I'd pop into Edinburgh one day and have a look at my options; perhaps even come home with something. Yesterday was that day.

It didn't quite go to plan, but the outcome was that I ended up with something to play.

My new Höfner

So, on getting into the shop, and explaining what I was after and why to the chap in there, I tried the usual Stratocaster and Telecaster thing. Both were fine (I think I liked the feel of the Telecaster more in my hand). I had one eye on a Les Paul too, but never tried that. What I did see though was this rather lovely black Höfner.

Now, of course, it's hollow body, so sort of has that acoustic thing going on. This isn't what I wanted for playing in an apartment. But I had to try it anyway. As soon as I started dabbling I was sold. The sound was enough that it would be easy to pick up and play without having to faff with amplification of any sort, on the other hand it was nowhere near as loud as my acoustic. I felt like it bridged the gap between easy to pick up, and versatile enough should I ever want to plug it into something.

And... let's be honest: it was black. Sooooo black. I like black.

Long story short... it had to come home with me!

As mentioned earlier: most of my guitar stuff is still in storage, from when I moved to Scotland, but I did find my old tin of plectrums and the tuner.

Standard guitar kit

(Yes, the tin was once mine and was once full; the early 90s were a different time)

I even found one of my old stands, that I've had since around 1991! So now it's set up in my living room, next to the PCVR rig, ready to go at a moment's notice.

On its stand, ready to go

This is my plan now: each weekend I aim to put in at least an hour a day of practice, to try and get my fingers up to strength again, and to build up the muscle memory of where the strings are, to get the coordination between both hands, etc. I'm also going to be working through beginner's lessons from a tutor application. I'm going to treat this like I'm the complete novice I am and slowly work on improving.

There's no end goal; other than just get proficient enough that I can muck about on my own and be happy that I can play the sorts of things I want to be able to play.

Also, it's good to learn new stuff, especially new stuff that isn't just more coding.


I got a YouTube play button!

Posted on 2023-10-18 19:07 +0100 in Creative • Tagged with YouTube • 2 min read

According to YouTube I joined up on 2006-09-04. I don't think that's quite correct. I did have a Google Video account from very early on, and uploaded a couple of things, and it got ported to a YouTube account when Google discontinued the original video service and settled on YouTube post-purchase. So I guess, in some respects, it's kind of correct.

For most of that time I had hardly anything on there. Couple of videos to do with the weather station I ran for a few years, some things related to my photography, couple of things related to hacking with code; that's about it.

Then, a couple or so years back, when I got heavily into PCVR gaming, I started to record my gaming sessions and upload them.

As of the time of writing there are 1,109 videos in the PCVR playlist, and around 1,300 videos on my channel in total.

As for subscribers... eh, come on, few people are really interested in watching some old bloke stumble around in VR, and I was very late to the game anyway. But, apparently, around 350 lovely folk care enough about my nonsense to subscribe.

Nowhere near enough for a YouTube play button, that's for sure. Only... I now have a play button!

YouTube Lego Play Button

I mean, sure, I have to build it myself...

YouTube Lego Play Button

...but it's something to show for all my efforts, I guess. ;-)

YouTube Lego Play Button

As for how I got it: presumably anyone/everyone with a YouTube account with some content got the offer of goodies (I also got offered free coffee, sausage rolls, socks, and a bunch of other stuff I've forgotten), and I was lucky to claim one of these almost the instant the email turned up.

It's very likely the only YouTube play button I'll ever receive. I think it will take pride of place on my desk.


LinkedIn is useless

Posted on 2023-10-16 14:16 +0100 in Tech • Tagged with LinkedIn • 2 min read

I have a LinkedIn profile more by accident than on purpose. For most of that site's early days I just ignored it, even needing to go to the trouble of aggressively marking emails from it as spam as it seemed to want to turn itself into some sort of online networking cult, encouraging folk to send invites to their contacts, or worse. But after job-seeking in late 2017 the recruiter who found me the position I took up asked if I might join up and endorse him or some such nonsense and, at the time, I thought what the hell.

Since then though I've mostly found it useless, and at times straight up horrific. Don't even get me started on how a previous employer's push to make everyone use their profiles as more company branding created a perfect pool for people to go phishing in, while at the same time IT were on a phishing-awareness push; a perfect illustration of how some people lose their minds when it comes to that site.

The last year though, while working in a more FOSSy world, I've started to dip my toe back in when it comes to linking to what we're building with Textual. As such, I drop into the app once or twice a week and look to see what other folk might be talking about too.

During a recent dip in I saw this:

A suggestion from LinkedIn

Huh! Okay! That... that's actually kind of sensible! While I'm nowhere near looking for anything else to do, showing off the public projects you care about seems like a good idea. GitHub repos can be a good CV, I believe.

So I click through...

The project add form

And that's where it all falls apart. Pretty typical for LinkedIn I'd say. Name, description, obsession with skills, obsession with building up a social graph. But...

No link to the repo.

No.

Link.

To.

The.

Repo. O_o

o_O

I can't even.


Going full Apple search

Posted on 2023-10-14 08:39 +0100 in Tech • Tagged with Apple • 2 min read

For as long as I've had a smartphone -- so ever since the HTC Magic was released -- I've used whatever search tool Google have had available as my way of searching for stuff from my phone. Even when I made the switch to the iPhone, back when the iPhone 11 was around, I still installed and used the Google Search app.

Since jumping ship from Android to iPhone, I've followed the usual track that some do of "embracing the ecosystem", and it generally has paid off. The more I lean into "the Apple way", the more stuff actually does work together and work together well (I won't say "it just works", because that can sometimes so very not be true, but really I do find that Apple's ecosystem is more coherent and more stable than the one Google provided). But searching for stuff... that stuck with the Google search app.

So, more as an experiment than anything else, starting this morning I've removed the Google search app from the home screens of my iPhone and my iPad and I'm going to force myself to use Spotlight to do all my searching, and see how I get on with it.

Searching with Apple

Of course, when it comes to searching for stuff on the web, it's not going to make a whole heap of difference; it's sill going to end up searching with Google, but I do like the idea of search leaning into what Spotlight knows about my stuff too.

Also, on my phone at least, it has the added benefit of freeing up a slot in the dock at the bottom of the home screen.


astare v0.8.0 released

Posted on 2023-10-10 21:42 +0100 in Python • Tagged with PyPi, Python, coding, Textual • 1 min read

textual-astare is another Textual-based Python project that I've developed in the last year and I don't believe I've mentioned on this blog. Simply put, it's a took for viewing the abstract syntax tree of Python code, in the terminal.

astare in action

I've just made a small update to it this evening after someone asked for a sensible change I've been meaning to do for a while. When I first read the request I was going to look at it next week, when I have some time off work, but you know how it is when you sit at your desk and have a "quick look".

So anyway, yeah, v0.8.0 is out there and can be installed, with the main changes being:

  • Updated textual-fspicker
  • Updated textual
  • Made it so you can open a directory to browser from the command line.
  • Made opening the current working directory the default.
  • Tweaked the way dark/light mode get toggled so that it's now command-palette-friendly.

I think the code does need a wee bit of tidying -- this was one of my earliest apps built with Textual and my approach to writing Textual apps has changed a fair bit this year, and Textual itself has grown and improved in that time -- but it's still working well for now.