a pack of 'garden meadow' Seedballs, alongside a pack of 'poppy' Seedballs, and the back of the plantable thank you note.

My work sent all UK staff this thoughtful Spring gift of wildflower seedballs, to easily add some wildflowers to our homes and gardens. Even the little note that came with the packs contains seeds and is plant-able – just bury it and give it some water. I’m just waiting on some new planters to arrive, then I’ll get these added to the garden 🌼

This review of the Microsoft Surface Studio Laptop, by Bill Bennett, largely matches my own experiences with it. I’ve been using the Studio for the last couple of months, having bought it as a replacement for my aging self-built desktop, and it’s easily one of the best laptops I’ve ever used. Definitely the best Windows laptop.

My Surface Studo Laptop, with a sticker saying `#include <everyone>' in rainbow text stuck to the top right corner
My Surface Studio Laptop

I’ve gone for the “middle of the road” spec – i7 + 16GB RAM, as I couldn’t justify the jump in cost of the 32GB option – like Bill notes, these devices are expensive compared to available offerings from other PC manufacturers, but for me the following helped mitigate the price:

  • Solid build quality.
  • Great screen.
  • Really good laptop keyboard.
  • Similarly good trackpad – easily the best I’ve used outside of a MacBook.
  • No bloatware.
  • It’s in what I consider my “sweet spot” for laptop size.
  • I have just enough non-Apple needs to make a MacBook Pro (which has a similar price) not quite the best choice.

I wouldn’t say I’ve managed to really push the Studio very hard yet. I’ve mostly been using it for exam study and light “tinkering” in a WSL development environment, but I’ve also done a little bit of gaming in World of Warcraft. Playing WoW is pretty much the only time I’ve heard the fans make any real sort of noise, and with a little lowering of settings I was getting 4K on my external monitor at ~60fps from the 3050m GPU. For my needs I’d be happy to trade some resolution for higher settings at the same fps, but it’s not something I’ve devoted much time to.

In terms of noise outside gaming – I basically never hear it. Sometimes it will ramp up to a low-level “woosh” that’s barely noticeable above ambient, but most of the time it’s dead silent. Especially compared to my similarly specified (but 3 years old) work Dell – that sounds like a leaf blower from the moment it’s turned on, rising to jet engine as the day wears on.

The Studio’s signature folded tablet mode is “fine”; as Bill notes, it’s heavy, so you won’t use it on-the-go. In my limited use of it, the tablet mode is pretty nice for browsing/reading on the sofa as it’s more comfortable and balanced on your lap in tablet mode. I’m less concerned the whole thing is going to tip back off my knees and crash to the floor. It’s one of those features I’m not going to need 98% of the time, but on that rare 2% I’ll be glad I can make use of it.

Speaking of the fold – I don’t know if it’s just the way I lift the lid on the Studio, but I do find the double-hinge mechanism quite prone to opening up as if I were switching to tablet mode when I’m just trying to open up as a laptop. It’s not a big deal, but it’s happened enough I thought it worth mentioning.

Overall though, yeah, I’m really happy with the Surface Studio Laptop. It’s a very good laptop wrapped up in a premium-feeling package. As an aside, between this and the Xbox Series S, I’ve been very impressed with the quality of devices Microsoft is creating these days – it makes me wonder how well they’d get on in the smartphone space, if they ever decided to jump back in.

All going well – and DNS willing – this site has been migrated off of WordPress.com and back to self-hosted. That’s all well and good, but along the way, the site has picked up a couple of new tricks –

  • IndieWeb integration through microformats and Webmention
  • Fediverse integration through ActivityPub

Fediverse support means you can now (for example) follow this blog on Mastodon, by following @chris@chrismcleod.dev. You might even be able to like and comment directly from Mastodon (I haven’t tested this Update: commenting via a reply works). Regular RSS options are still available.

IndieWeb features come by way of the plugins provided by the community, and the Autonomie theme by Matthias Pfefferle (who also wrote the ActivityPub plugin I’m using). I haven’t rolled out all of the possible features – I’m not using Post Kinds yet, for example – as I want to think a bit more about what I want to achieve with the site before I go overboard.

Moving everything over was relatively quick and painless, and the setup of new features was simple. There’s a couple of small things to tidy up, and more to be added to the site as time goes on. I’ll write up the process of getting things setup in another post so others can replicate on their own site if they want.

Finally, I got around to my first Associate-level Microsoft certification. I’d originally planned to sit the AZ-204 exam for the Azure Developer Associate certification in November, as a follow-on to sitting AZ-104 in September. I’d fit AZ-102 somewhere after those, as I just wanted to do that one for fun. In the end, that all turned out to be too ambitious; with work being as busy as it turned out to be, and me quickly realising I’d bitten off more than I could chew, I kicked both exams further down the road. Both were pushed into February, while I figured out how I wanted to approach things. I decided I would give myself space to pass one Associate exam before committing to any more. For whatever reason, on the day I made the decision I was more confident about the Azure Developer material (funny that, given I’m a Lead Developer!), rather than the Administrator course, so I went with that. But I still needed a deadline, preferably not too far in the future, so March 31st was picked!

The last week of February, and all of March was given over to study in the evenings and some weekends. I used the official Microsoft Learn materials – both the new set linked from the certification page, and the older, more in-depth material which was previously tagged. When I started out I would do a practice test once a week to see how I was doing, and for a while it felt like I was doing pretty badly! Test scores were regularly around 65% until it started to sink in around weeks 3-4 and scores started to creep up slowly. At that point I started doing tests every day on MeasureUp – which has a nice feature where you can set the practice test to have just questions you haven’t seen in your previous N practices – and every other day on Whizlabs.

As the exam approached I was feeling really confident: I was starting to regularly score 95%, with an average score of ~85%, and practice tests under exam conditions were taking less than 30 minutes. While I didn’t think the exam would be easy, I was thinking I was in a good place.

The exam itself was… ouch. Much of it seemed at the time like it was something the learning material had only skimmed over, and I didn’t have nearly as many “I recognise that question!” moments as I did in the Fundamentals exams. It was easily the hardest Microsoft exam I’d taken, possibly one of the hardest exams I’ve ever taken. Question after question felt unfamiliar and not something I’d covered in study or practice. In my defence, a lot of the question wording left something to be desired. This is a constant complaint of mine with MS exams – the questions often feel like they are incomplete sentences, badly translated, or both. I remember one question asked me to pick a solution with barely any context to go on – I spent a good 5 minutes rereading the entire page and checking I hadn’t missed a link to an exhibit or case study that would allow me to intuit an answer! Looking back, I can see things a bit clearer-eyed and relate the questions I remember to the material, but at the time I had such a sinking feeling I would fail the exam.

But in the end, my preparation didn’t let me down. As unconfident as I felt part-way through the exam, I still passed comfortably, with a good score that was slightly above my average practice score.

So now that AZ-204 is out of the way, what’s next? I still want to do AZ-104 (Azure Administrator Associate), but I’m not in a hurry to repeat the gruelling exam experience just yet. Hopefully I can squeeze it in this year though. I’m also one step closer to reaching my ultimate goal – Microsoft Certified: DevOps Engineer Expert (AZ-400) – of which, Azure Developer Associate is one of the pre-requisites.

More importantly – I want to actually use more of what I learned! I feel like I’ve still only barely scratched the surface of Azure. While much of it is overkill for the simple side projects like I do in my spare time, I still have a few ideas in my head for what I could be using it for.

This post will fall into the “well duh…” category for a lot of people, but sometimes we need a reminder.

rsync in action

I got myself a new laptop recently (more on that another day), and wanted to back up filesfrom my old desktop to a portable drive, potentially for loading onto the new device. The main thing I wanted to back up was my photo library; most of the rest of my files are in the cloud/git repos, but I have a large “pre-cloud” library of family photos and consolidated backups from old computers that I’ve not managed to sort through and upload anywhere yet, so I wanted to make sure I had a copy of it. The library is hundreds of GB of various file types, from media to all sorts of metadata files used by the likes of iPhoto.

Try as I might, I could not get the library to transfer using the Windows 10 file explorer. Transfer speeds were abysmal (less than 20Kb/s for a USB-C drive capable of ~1Gb/s), and it would keep hanging on various files. When this happened, it would with a retry/skip action, so needed human interaction to keep going. At the speeds I was seeing it would’ve taken several days to copy over – and if the copy failed I had to start from scratch. Basically, Explorer it wasn’t a viable solution.

Last night, as I was dozing off to sleep, my brain reminded me that rsync exists to synchronise two directories, and WSL makes it easy to use on Windows. There are probably a billion Windows utilities that will do the same job, but I already have rsync in my WSL setup, so why complicate things further?

My source folder is E:\Pictures, and the destination drive is D:\. In WSL, this translates to /mnt/e/Pictures and /mnt/d/ respectively. There are a great many options in rsync, but I find -avz is a useful starting point for most jobs, and tend to only deviate from that if an initial run fails or I have a specific need. All in all the command I used to backup my photos was:

rsync -avz /mnt/e/Pictures /mnt/d/

Simplicity in itself. A few hours later – instead of days – and my library is safely backed up to the external drive and ready for its future home.

I ran into an issue last night where I couldn’t generate a new React application template using npx create-react-app my-app. Annoyingly, this was only broken in the WSL environment of my personal PC, where it had been a while since I’d had to use the command. On Windows, where I’d never run the command before, it worked fine. The error I received was:

You are running create-react-app 4.0.2, which is behind the latest release (5.0.0).
We no longer support global installation of Create React App.

This was odd, as I’d never globally installed create-react-app. Never the less, I followed the error’s suggested fix of running npm uninstall -g create-react-app. Unsurprisingly, it didn’t work. What followed was an hour of trying various other “fixes” from around the internet – update NPM/clear the NPM cache/update NPX… none of which worked for me.

In the end I resorted to fixing the issue through brute force – finding wherever this mystery instance of create-react-app was lurking and purging it from my system with good old rm. Using a combination of find and rm I found 2 places containing binaries. Removing these directly didn’t fix the problem either, but working my way further up the diectory tree to their common parent directory did.

As it turns out, I’d accidentally stumbled on the NPX cache, which is kept hidden away from the usual NPM cache. Mine was in a slightly odd place because I use NVM to manage my NodeJS versions, but you can find yours using npm config get cache, then looking for an _npx directory within the returned path. Delete the contents in there, and npx create-react-app my-app should start working again.

Or, to make it really easy, run npx clear-npx-cache.

A few of us at work might be moving to a project that uses React more heavily than anything we’ve done before, so I wanted to make a list of any interesting links which might be useful to share with the group. Some might not be specifically about React, but were useful for me getting up and running on my home PC, or are worth storing for future reading:

Much like my development environment notes, this post is pretty much just for me – but if you find it useful, I’m glad!

You know when you have something nagging at you, where it’s “I should be doing this, I want to do this, but I just don’t have any drive”? That’s been me looking at this editor most days for the last 2 months. Ennui, I think they call it. But not really through boredom in my case. Just the overwhelming sense of *waves arms at everything* getting on top of me a bit lately. So now that I’m managing to get some words out, what have I been up to?

Training

At the start of September I virtually attended a four-day, Microsoft-delivered training course, covering AZ-104: Microsoft Azure Administrator. The course itself was good, with great instructors. It was also a nice change of pace to the relentless project work I’d been doing. The one knock against it was there was too much content that could be covered in the four days that in reality we only covered a fraction of what could be in the exam.

As the instructors acknowledged – the course by itself is not enough to pass the exam; it needs more practice, reading, and knowledge. Which is to be expected, but I don’t think I appreciated just how much more would be needed.

Right now, I’m scheduled to take the exam at the end of November, but I’m not feeling like I have enough time with everything that’s going on in the race towards the end of the year. I’ll give it another week or two of trying to get into my groove with regards to study and revision, and if I’m still not comfortable then I’ll reschedule to early next year.

I should have attended an AZ-204 course at the start of October, and sat that exam… today, I think… but I rescheduled that one last month when I realised what was involved in the AZ-104 exam. I also felt that the project was too busy at the time to justify leaving my colleagues a person down for another week of training so soon after the last one. AZ-204 is still in my plans, it’s just been moved down the road a bit.

Work

I can’t go into my project work, at all, but the other things going on at work have been both weird and rewarding.

The first was I was asked to record a short (thirty seconds) video on the positive experiences I’ve had over the last year – a kind of “yes, this last year and a bit has been rubbish, but there were good points” feel good piece – my video was largely on training and personal development. It was combined with several others and played as part of a video package at the annual meeting which kicks off our new financial year. So a video of me in my tiny home office, talking quickly about how I’d achieved several certifications in the last year, played to several thousand colleagues in the UK. Even though I knew the video was coming during the livestream, it was incredibly bizarre to see myself onscreen.

In a similar vein I was asked to give a seven minute talk on training and development to a couple of hundred colleagues in an account-wide all-hands call. I seem to have acquired a reputation for thinking about this topic a lot while also putting things into action, and it was insights on this “doing part” I was asked to get across to my colleagues. I plan to write a blog post on this in the future as it’s something I’ve been mulling over in my head for a while and deserves a longer-form expression.

Delivering the talk itself didn’t make me as anxious as I’d expected. I didn’t stutter and uhm-and-ah as much as I might once of. So I’m getting better at this, at least. I did find it all went very fast though; I think we were running behind so the person controlling the slides sped things along at a clip, faster than I’d practiced. By the end of it I was quite out of breath. I think in part it’s because I’m highly conscious of breathing too hard while wearing a headset, so I breath quite shallowly when not on mute. But that’s something I can work on – my breathing while delivering a talk.

Hobby

Not much to report here, really. I started on an Armies on Parade entry, which is usually one of the hobby projects I’m most able to focus on and work through each year. But this year isn’t going to happen. I managed to get the barest base of a board created; just a 22″x30″ board in a retro flocked style. I started on pieces of scenery to decorate the board with, and managed to get the army to parade on it built and primed… and then I just seemed to stop. I’m not entirely sure why, but every time I thought about painting or making progress I just… didn’t do it. So I’ve resigned to not completing Armies on Parade this year. Hopefully I’ll be back to it in time for next year.

I’ve also made a few small inroads into items in my backlog, and not *just* by adding to it (although I have done more of that than I’d like). Assembling the odd kit here, priming something there, maybe making small progress on basecoats. But never much of anything, and certainly not getting anywhere near finished. I said in the talk I gave recently that “even small steps add up” and I feel I need to remember that myself. The only real issue is I have so much stuff “in flight” right now it’s hard to juggle it all or store it conveniently and safely when it’s not being worked on. I think I’m getting to a point where some things are going to have to be packed away – not permenantly, but properly out of the way – to give me some breathing room. Maybe that will give me the headspace I need to make some proper progress. Or maybe some dedicated time off to work on things might be an idea? I’m not sure.

Wrap-up

So that’s the major events I want to get into from the last couple of months. Hopefully it won’t be another couple of months before I manage to get the words out again – I really want to write that personal development article, for one thing – but with the way things seem to be right now I can’t make any promises

Because Docker have changed their licensing and subscription TOS overnight, I’ve had to rebuild my development environment so it doesn’t use Docker Desktop on Windows anymore. What follows are notes I’ve made along the way on how I got this working on my particular laptop. This is not a tutorial! While the notes below might help you, they’re mostly a reminder to myself, in case I need to rebuild again, or adapt this into documentation for the rest of the team.

Docker on WSL

Uninstall Docker Desktop. Make sure WSL2 and a distro are installed and updated, then follow this guide by Jonathan Bowman.

Install docker-compose:

sudo apt-get install docker-compose

Git configuration in WSL

Setup Git to use your email address and username:

git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"

Use the Windows Credential Manager, to share credentials across WSL/Windows:

git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe"

WSL Tweaks

Set the default WSL distro:

wsl -l --all  your available distos
wsl --setdefault Ubuntu-20.04

Create the file %USERPROFILE%\.wslconfig, and add the following:

[wsl2]
memory=8GB              # How much memory to assign to the WSL2 VM.
processors=4        # How many processors to assign to the WSL2 VM.

Adjust the values as necessary. This limits the VMMEM process to a sensible amount of resource usage – it’ll consume everything it can otherwise.

Restart WSL:

wsl --shutdown

(Open a new WSL terminal to start it again)

Windows Terminal Tweaks

To create a command which opens a single tab which is split into four panes, with each pane set to a different service directory, open the settings.json file, and add the following in the commands array:

{
            "command":
            {
                "action": "wt",
                "commandline": "new-tab -p \"Ubuntu-20.04\" -d \"//wsl$/Ubuntu-20.04/home/chris/dev/graphql\" ; split-pane -V  -p \"Ubuntu-20.04\" -d \"//wsl$/Ubuntu-20.04/home/chris/dev/inbound-service\"; split-pane -H  -p \"Ubuntu-20.04\" -d \"//wsl$/Ubuntu-20.04/home/chris/dev/outbound-service\"; mf left; split-pane -H  -p \"Ubuntu-20.04\" -d \"//wsl$/Ubuntu-20.04/home/chris/dev/front-end\""
            },
            "name": "startdev"
}

The network-style formatting of the starting directory is necessary, otherwise the path won’t be parsed properly.

Other

Install Node, etc on WSL by following this guide in the Microsoft docs.

To get VS Code Remote working, open a WSL terminal, then run the following:

code .

This should automatically install the Remote server. Once done, a Remote editor can be opened in Code on the Windows side. Extensions for Remote are managed separately, so install any that are needed, such as Docker, etc.

To have the VS Code Remote window make sure Docker is started when it’s opened up, add the following to ~/.vscode-server/server-env-setup on the WSL side:

DOCKER_DISTRO="Ubuntu-20.04"
DOCKER_DIR=/mnt/wsl/shared-docker
DOCKER_SOCK="$DOCKER_DIR/docker.sock"
export DOCKER_HOST="unix://$DOCKER_SOCK"
if [ ! -S "$DOCKER_SOCK" ]; then
    mkdir -pm o=,ug=rwx "$DOCKER_DIR"
    chgrp docker "$DOCKER_DIR"
    /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
fi