Defibrillators save lives!

Five years ago this week, I experienced a sudden cardiac arrest after being out for a 5km run with the kids during Victoria’s COVID lockdowns. It’s surreal to think that half a decade has passed since that moment.

This morning after celebrating Coburg parkrun’s tenth anniversary, I read a news article calling to mandate publicly accessible defibrillators. I find it very confronting reading such stories, knowing that effective cardiopulmonary resuscitation (CPR) and defibrillation saved my life and to know that we don’t have easy access to defibrillators in many venues.

In the case of a sudden cardiac arrest, for every minute defibrillation is delayed the casualty’s chance of survival drops by 10%. Calling emergency services for help and knowing how to perform CPR are equally critical.

This is why, to celebrate five years of “bonus time”, as I have come to call it, I have bought a CellAED to keep in the glovebox of my car. I come fitted with my own Subcutaneous Implantable Cardioverter Defibrillator (S-ICD) these days, but I cannot share this if one of my friends or family needs help. Automated External Defibrillators (AEDs) are very easy to use and provide audible instructions.

Today, I encourage each of you to think about where your nearest defibrillator is and whether you should keep one closer to home.

Desert Island Discs: My Eight Tracks, Book, and Luxury Item

Inspired by “Desert Island Discs”, which is a long-running BBC Radio 4 programme where guests are asked to choose their favourite music tracks, a book, and a luxury item they would take with them if they were stranded on a desert island, I thought I’d write mine down. I used to listen to this many years ago when I lived in the UK and rediscovered it a few years ago on BBC Sounds. I love the concept where folks reflect on their musical tastes and the significance of certain tracks in their lives and share their stories. I’ve even had the kids listen to episodes recently.

Music is such a big part of my life, and I have so many tracks that I love, so it was hard to narrow it down to just eight. However you may know me, you’ll have some insight into my musical tastes, I am sure. But I am also sure I will surprise you.

Here goes!

# The Tracks

# Track 1: Spirit of Radio - Rush

One of my earliest memories is of the radio playing in the small kitchen in our family home. I remember the familiar and friendly voices of DJs like Alan Freeman, Tony Blackburn, and Dave Lee Travis. The radio was a constant sound. Dad used to drive a lot for work as a sales representative. He collected “Tiger Tokens” as he filled his petrol tank and one day he gave me a stack of these coupons, which I could use to claim an item from a catalogue. I chose an alarm clock radio and was hugely excited to set this device up in my bedroom. If I was in my room and awake, the radio would be going, morning, noon or night. I loved the variety of the music. I enjoyed the comedy, the stories, and the access to news and current affairs.

Ironically, I don’t think I ever heard Rush on the radio. I discovered their music many years later and there are so many Rush songs that I love now. The lyrics to this one really speak to me.

# Track 2: It’s The End of the World As We Know It (And I Feel Fine) - R.E.M.

I first saw R.E.M. perform live in Milton Keynes in 1995. It was one of the first concerts I attended and I saw them on two consecutive nights. I feel very lucky that (unlike Rush) I got to see R.E.M. many times over the years and I absolutely love their music.

There’s something about this particular song that I cannot put my finger on, but it’s the one song that I put on when I am having a bad day. By the time Michael Stipe starts singing the first chorus, I’ll have a smile on my face. It never fails to pick me up. Never mind laughter, this is the best medicine for me!

# Track 3: Vyšehrad - Bedřich Smetana

Classical music wasn’t something I had a great deal of exposure to in my younger years. My great uncle Jack had a large collection of classical records that I understand he would play at volume at home. When he died, his vinyl collection came to our home and I played some of the Deutsche Grammophon long players on our turntable, but that was about it. When I was in sixth form, my family moved away to be closer to Dad’s work and to reduce the amount of time he spent on the road at a time when my sister was a baby and sleep was in short supply. I moved in with family friends and their kitchen radio was tuned to one of the classical radio stations. This was the time that I first became familiar with classical pieces.

A few years later I would meet my wife, who played violin in orchestras. When we started seeing each other seriously, I tuned my radio to one of the classical stations so that I could form a better appreciation of this genre, so that I wouldn’t look like a complete philistine turning up to one of her concerts.

One of the first trips we made together was to Prague and Kirsty took me to Vyšehrad Cemetery, the final resting place of many notable composers including Antonín Dvořák and Bedřich Smetana. On that trip she also bought a Czech recording of Má vlast, which is still in our CD collection. It’s a beautiful and evocative set of six symphonic poems, which I listen to often. I’m choosing the first piece because I am always drawn in by those opening sounds of the harp playing.

# Track 4: Can’t Take My Eyes Off You - Andy Williams

Isn’t this the ultimate love song? It certainly has a special place in my heart and it makes me think of the people closest to me.

I first heard James Dean Bradfield of the Manic Street Preachers performing this song with his acoustic guitar and I thought it was absolutely beautiful. Being a nerd, I looked into who wrote the song and found that it had been written by Bob Crewe and Bob Gaudio, and first recorded and released as a single by Gaudio’s Four Seasons bandmate Frankie Valli, but then covered many, many times over. I listened to many of these covers over the years and Andy Williams’s version is my favourite.

It became a special song in 2002 when we were walking through Prague (Prague again!) on my stag night. My friend Alastair started singing it as we were heading towards a bar on a freezing cold Czech night. One by one the members of the party joined in and enthusiastically imitated the horn section. At our wedding a few weeks later, we had a ceilidh band play. In an intermission, without warning, the members of the stag party began singing this song and many of our guests joined in. The band said they’d never heard anything quite like it. We chose to take that as a compliment.

# Track 5: In the Land of Grey and Pink - Caravan

My love of vinyl records was born in the back room of one of our friends’ houses when I was about 12 years old. Roger was the same age as my dad and grew up in South Wales. He was a real music lover and had an amazing collection of records that he’d built up over the years. He took me to my first ever concert, Guns N’ Roses, in 1993. When he heard their cover of Knockin’ on Heaven’s Door, he insisted that I hear Bob Dylan’s version and pulled out a well-loved copy of Before the Flood from the 70s. I coveted his record collection from that day.

Roger would happily put on an LP when I was at his house and he introduced me to many bands that I still love to this day. Some of these were well-known, like Pink Floyd, Alice Cooper, Thin Lizzy, E.L.O., and The Beatles. Others were more obscure like Caravan, Camel and Man.

I play the album In the Land of Grey and Pink often and think of Roger, who died of cancer over 20 years ago now. This is the title track and will remind me to keep good dental hygiene on the island.

# Track 6: Zombie (Acoustic) - The Cranberries

The death of someone I don’t know doesn’t normally affect me, but I’ll never forget being on the Mornington Peninsula the morning I heard that Dolores O’Riordan had died. I went out for a run and somebody was blasting Zombie out of an upstairs window. I had to stop and listen. Coincidentally, I was in the same place when I learned that Neil Peart of Rush had died two years later.

The Cranberries were a band that my whole family could listen to. I remember Mum buying Dad the cassette of their debut album and it being in the car stereo for a long time. I confess, I still have that cassette (and nothing to play it on).

When I learned to play the bass guitar, Zombie was one of the first songs I learned to play all the way through. I played it in a battle of the bands at work once and my friend Adrian said to me after our first rehearsal that I had such a big smile on my face as we played it, it must be a very special song! It is.

The acoustic version is wonderful. Every time I would listen to this with my friend Alastair, one of us would have to say, “Rippin’ song, this!”

Rippin’ song, this!

# Track 7: The Chariot - The Cat Empire

Melbourne has been my home for the last two decades and I need a song that takes me back there. The Cat Empire are a Melbourne institution and this song takes me back to one of the very first live shows I saw in the city with Kirsty at the Sidney Myer Music Bowl. The band are incredible and I love this message of the power of music. You can’t help but feel moved by it.

Please turn this one up!

# Track 8: Life’s Shadow - Beckett

Perhaps a little maudlin for a desert island, but this track by the little-known Geordie progressive rock band needs to be played more. Some people may recognise parts of it as they found their way into a heavy metal classic, but that’s not my story to tell.

It’s the story of a man on death row. “Please don’t worry ‘cos I’ve gone”. When I go. Wherever I go. I don’t want anyone to worry.

# The Book

The Hitchhiker's Guide to the Galaxy book cover

The Hitchhiker’s Guide to the Galaxy by Douglas Adams. I must have read it more than a dozen times at this point and I would read it many dozen more. The wit and wisdom of Douglas Adams never cease to entertain me. And it would serve as a reminder, “Don’t Panic!”

# The Luxury Item

A wind-up radio

I’ve never known what I would choose for this. Until I collected my eight tracks. It would absolutely have to be a wind-up radio. While I am sure I would love the sounds of waves crashing on the beach on that desert island, I would be pining for the spirit of radio to keep me company until I am rescued.

# The One Record I’d Save From the Waves

R.E.M. It's The End of the World As We Know It 7-inch vinyl single

If the desert island was on fire and I could only save one record, it would be It’s The End of the World As We Know It (And I Feel Fine), without a doubt. If I lost the other seven records, I would be very glum indeed. I would need to put this on the turntable and crank it up to eleven to lift my spirits back up! Maybe if I listen to it enough I’ll be able to sing all the words correctly and as quickly as Michael Stipe.

# Listen to All Tracks

Want to hear my selections? I’ve created playlists on your favourite streaming services:

🎵 Listen to my Desert Island Discs playlist on Spotify
🍏 Listen to my Desert Island Discs playlist on Apple Music
▶️ Listen to my Desert Island Discs playlist on YouTube

Taking a career break

I’m taking a 12-month career break to spend more time with my family. And before anyone worries - I’m in perfect health! This is purely about making time for what matters most.

# Why Now?

Life’s too short, isn’t it? I often think about time when making big decisions. I find myself in a funny spot: I’m definitely too old for a traditional gap year, but I’m too young to retire. And I don’t want to stop working anyway.

There are a few personal reasons that make this the right time. Our kids are growing up quickly, and these years are ones I don’t want to miss. At the same time, my parents are getting older on the other side of the planet and I miss them. We’re fortunate enough to be in a position where I can take this step back for a while.

I think a lot about this this picture from Marlay parkrun back in October 2019 - it’s become a reminder to me about priorities.

Marlay parkrun, October 2019 Getting active with my family in Dublin, October 2019, also the last photo taken with Uncle Stan and me together

Source: ABC News Article

# When Is This Happening?

I’ll be on my career break from 1 July 2025 to 30 June 2026. A neat 12-month window and also the financial year for those in Australia.

# What Will I Be Doing?

When I mentioned to the family that I was planning a sabbatical, everyone had their thoughts as to how I’d fill my days.

Our 14-year-old, thought I would be going backpacking and napping more. Our 10-year-old is very tactile and xpected me to spend my days trampolining and enjoying “lunchtime snuggles”. K figured I’d visit my parents, listen to tonmeds of self-improvement audiobooks, and finally cook meals that take longer than 15 minutes to prepare.

What I’m actually planning is a seven-week adventure through the UK (including many parkruns), Portugal (for a family wedding), and Spain with my folks. Then I’ll be embracing the stay-at-home dad life and saying “yes” to our kids a lot more.

I’m also training for my seventh Melbourne Marathon, brushing up on some tech skills (I’ve been off the tools too long), and learning to play some new songs on the bass.

# What About Work?

Work’s in good shape. They’ll cope without me for a year. And I am grateful that the leadership team support my decision.

# Will I Return?

I hope so. I expect the workplace will look quite different in twelve months time and that might mean returning to a different role, but that’s okay. It’ll be good to return refreshed and ready for the challenges of 2026.

Shoulder Injury

Yes, my left arm is currently in a sling. Having described why this is multiple times, I thought I’d write it down.

On Thursday morning, while running before work, I tripped and dislocated my shoulder. My caring running partner called an ambulance, and while the paramedics were assessing me, the shoulder joint was relocated with an audible click. After being evaluated at a local hospital, I received an official diagnosis of a chip on my shoulder!

Now, I’m waiting on appointments with an orthopaedic specialist and a physiotherapist. I hope to be out of the sling in the next couple of weeks. Despite the injury, I’m pain-free, though mildly frustrated with the limitations on my mobility.

Fortunately, I’m right-handed, which means I can do most of my daily activities unencumbered. The main lesson learned is the importance of being more careful about foot placement while running. While it’s an inconvenience, I’m staying positive and focused on my recovery.

# Update on Tuesday, 2025-05-06

I went to the fracture clinic this morning and saw the upper limb surgeon (and learned that such a specialism exists). There was some good news! I don’t need surgery at this stage. My muscles and tendons haven’t sustained any noticeable damage. Unfortunately, despite being largely pain-free, I remain strictly sling-bound 24 hours per day until six weeks post-incident to allow the socket to fully heal. No driving, running, or physiotherapy for me, which is frustrating as I don’t like to rely on others for day-to-day tasks. I’ll be back to the clinic on 3 June for imaging. Fingers crossed.

R! There you are!

Yesterday Analytics April came to an end in the Exercism #12in23 challenge and I completed my fortieth exercise in R. Given the choice of Julia, Python and R and a background including writing Python for years, I opted for the track with 30-something exercises over the one with 50-something as I had a chance of completing them all. There were a few new exercises added during the month, hence completing forty.

# Getting started

R was a bit of a pain to install, even with asdf. I had to install a bunch of dependencies using Homebrew as a prerequisite:

brew install gcc xz libxt cairo pcre2 xquartz

I also had to pin the SDK to an older version

export CFLAGS="-mmacosx-version-min=12.0"

(I found this at https://stat.ethz.ch/pipermail/r-sig-mac/2022-October/014577.html).

For testing, I had to run install.packages("testthat") within R itself, as documented in Exercism’s R track installation documentation. This all took a longer time than I expected. I like minimal output from test frameworks as a rule but wow, the output is cheerful:

Test passed 🎉
Test passed 😀
Test passed 🥇
Test passed 😀
Test passed 🥇
Test passed 😸
Test passed 🎉
Test passed 😀
Test passed 🥇

# That’s what I like

It took me a few days to really get a feel for R. All variables being vectors takes a little getting used to when you’ve programmed in many languages that all have scalars by default but once you’ve got your head around that it’s kind of nice not to have to write loops for common tasks (especially after all of the boilerplate code in Go last month! Want to multiply everything in vector v by two?

> v
[1] 1 2 3 4 5 6 7 8
> v * 2
[1]  2  4  6  8 10 12 14 16

Et voila!

Being a language for statistical computing, R’s standard library comes with a whole host of mathematical functions that make life really easy. Generating Pascal’s Triangle is essentially a one-liner.

Here’s how we can calculate a single element:

> choose(4, 2)
[1] 6

A row, where a:b is a sequence from a to b in steps of 1 ,is simply:

> choose(4, 0:4)
[1] 1 4 6 4 1

And using sapply to apply an anonymous function (\):

> sapply(0:4, \(row) choose(row, 0:row))
[[1]]
[1] 1

[[2]]
[1] 1 1

[[3]]
[1] 1 2 1

[[4]]
[1] 1 3 3 1

[[5]]
[1] 1 4 6 4 1

I really like this. Another thing I really like about R is the pipe operator |>, similar to that of Elixir. A pipe expression passes, or pipes, the result of the left-hand side expression to the right-hand side expression. The left-hand side expression is inserted as the first argument in the call. So x |> f(y) is interpreted as f(x, y), which makes for nice, composable code:

acronym <- function(input) {
   input |>
   strsplit("[^[:alpha:]']+") |>
   sapply(substr, 1, 1) |>
   paste(collapse = "") |>
   toupper()
}

To get myself a bit more familiar with the idioms of the language, I thought I’d try “pairing” with 2023’s favourite programmer, Chad Gippety. I found the results were really good for getting started but when trying to improve existing code, I ended up going around in some terrible circles.

GPT: I apologize for misunderstanding the instructions. Here is the updated implementation that should pass all the provided tests:

parse_phone_number <- function(number) {
  cleaned_number <- gsub("[^0-9]", "", number)

  if (nchar(cleaned_number) == 11 && substr(cleaned_number, 1, 1) == "1") {
    cleaned_number <- substr(cleaned_number, 2, nchar(cleaned_number))
  }

  if (nchar(cleaned_number) != 10) {
    return(NULL)
  }

  if (!grepl("^([2-9][0-9]{2}[2-9][0-9]{6})$", cleaned_number)) {
    return(NULL)
  }

  return(cleaned_number)
}

Please let me know if you have any other questions or concerns.


paj: This is very close to my original implementation.


GPT: Yes, it is. The difference is that your original implementation used gsub() to remove all non-digit characters from the phone number, whereas this implementation uses str_extract_all() to extract all the digit characters. Both methods work, but using str_extract_all() with regular expressions is often considered a more elegant solution.


paj: No It doesn’t.


GPT: You are correct, I apologize for the confusion. I misread your previous message. The implementation I suggested does not involve removing any non-digit characters.


paj: No. You said, “this implementation uses str_extract_all()” but it doesn’t.


GPT: You are correct, I apologize for the confusion. I must have been referring to a different implementation in my previous message. The implementation we have been discussing does not use str_extract_all().


Your mileage may vary.

# What don’t I like?

The worst thing about R is its error messaging; many times during April I was slowed down but not being able to understand the errors it emits. For example: Given a test…

test_that("true if all sides are equal", {
  expect_is(triangle(2, 2, 2), "equilateral")
})

And the code…

triangle <- function(x, y, z) {
    "equilateral"
}
── Failure (/Users/paj/Exercism/r/triangle/test_triangle.R:7:3): true if all sides are equal ──
triangle(2, 2, 2) inherits from `'character'` not `'character'`.

Is not helpful. Another “feature” of the language that bugs(!) me is the automatic flattening of 1-dimensional matrices. For example:

> m <- sapply(1:4, \(n) n * 1:4)
> m
     [,1] [,2] [,3] [,4]
[1,]    1    2    3    4
[2,]    2    4    6    8
[3,]    3    6    9   12
[4,]    4    8   12   16

Let’s look at the first row:

> m[1,]
[1] 1 2 3 4

Easy! And the fourth column:

> m[,4]
[1]  4  8 12 16

Piece o’ cake! What about a single column?

> m <- sapply(1:1, \(n) n * 1:4)
> m
     [,1]
[1,]    1
[2,]    2
[3,]    3
[4,]    4

First row:

> m[1,]
[1] 1

Fourth column (to use the same code as before):

> m[,4]
Error in m[, 4] : subscript out of bounds

Yeah, that makes sense. How about a single row?

> m <- sapply(1:4, \(n) n * 1:1)
> m
[1] 1 2 3 4

First row?

> m[1,]
Error in m[1, ] : incorrect number of dimensions

WAT? Fourth column?

> m[,4]
Error in m[, 4] : incorrect number of dimensions

To get around this where the numbers of rows and columns were dynamic I had to write some tedious extra code:

if (!is.matrix(m)) {
  m <- matrix(m, nrow = 1)
}

# Overall

I enjoyed my month playing with R. It’s not a language I’ll be rushing to write production code in but if I reach the limits of the spreadsheets I find myself in for work, I have a new <- arrow to deploy from my quiver.

For Mindshifting May, I’m looking forward to tackling Tcl for the first time. Why not join me?

Mechanical March

Hot on the heels of Functional February came Mechanical March in Exercism’s #12in23 challenge. There was a veritable feast of languages from which to choose and I opted for Go (apparently it’s not Golang despite all of the easier-to-find on the web references to the contrary. Go is one of the dominant languages in my domain at work, where tools like Docker and Kubernetes are in plentiful supply. I last played with Go in December 2012 when I was considering working for one of Go’s biggest users and remember quite liking it after years of C, C++ and Python. I remember really liking the approach of returning errors as a second return value, so that it is handled by the caller. The language was only about three years old then, so I was keen to see how it had matured.

The only valid measurement of code quality: WTFs/minute, or so it’s said. I had so many WTF moments playing with Go this month that I am just chosing to share a few of them with you.

Before I get into Go, I’m going to call out how excellent asdf is when working wth multiple programming languages. Install the relevant language plugin from asdf-plugins (Go’s is called golang just because), asdf install golang latest && asdf local golang latest and off you go.

Oh and how good is Dash for docs? I’ve been using it with Alfred for years but it also integrates really nicely with VSCode, which is my editor of choice these days.

# Comments

I am considerably less anti-comment (and put much less stock into what the referenced author has to say) than when I wrote Comments Are Lies! in 2012 but /* increment i by one */ style comments still make my teeth itch. Exercism’s Weather Forecast exercise was painful to work through. Documenting this module following the Go Doc Comments specification felt like an exercise in futility. Comments must start with specific words and end with a “period”. Does this really make code or generated content easier to understand?

# Parsing and formatting dates and times

Most languages I have worked with use strftime(3)-style formatting specifications for handling date and time strings. The other timestamp etched in my programmer’s brain is 00:00:00 UTC on Thursday, 1 January 1970, the beginning of the Unix epoch. These are well-understood and recognised concepts.

Imagine my surprise when the format specifiers I had been using for over a quarter of a century didn’t work when undertaking the Booking up for Beauty exercise. A bit of digging around informed me…

// The reference time used in these layouts is the specific time stamp:
//
//  01/02 03:04:05PM '06 -0700
//
// (January 2, 15:04:05, 2006, in time zone seven hours west of GMT).

https://github.com/golang/go/blob/5e191f8/src/time/format.go

The what now!?

I’m sure there’d be some who’d argue that this is as simple as 1, 2, 3, 4, 5, 6, 7 (which just happens to be a Monday) but developers working with the Gregorian calendar in other languages have been seasoned to use the International Standard (i.e. 2006-01-02T15:04:05Z-07:00) and 6, 1, 2, 15, 4, 5, 6, -7 is arguably not as simple nor as useful as a mnemonic. This made the Booking up for Beauty exercise more confusing in Go than I would have expected. The Description() implementation may be harder to understand to folks coming from other languages because the placeholders are indistinguishable from regular text.

I found JavaScript’s zero-based months easier to reason with.

# How to test whether a key is present within a map

This is a doozy. Given a map…

units := map[string]int{
  "quarter_of_a_dozen": 3,
  "half_of_a_dozen":    6,
  "dozen":              12,
  "small_gross":        120,
  "gross":              144,
  "great_gross":        1728,
 }

…how do you determine whether units contains the string key “dozen”? Accessing a missing element using an index expression (units["score"]) returns a zero value for the stored type.

First I checked out Map types in the The Go Programming Language Specification. Nothing there. Next I went to Index expressions and failed to spot the pertinent text (hence “doc: defragment index expressions spec for map types”). From there I ended up on a blog post, Go maps in action, which has the answer:

A two-value assignment tests for the existence of a key:

i, ok := m["route"]

I mentioned earlier how I liked the Go approach of returning an error as the second return value. It transpires that there’s another opposing “comma ok” idiom for maps. Because of course there is. To make matters more confusing i := units["score"] will set i to 0 in the example above but i, ok := units["score"] is also valid with a second return value. After a month with the language I’m still unsure how you specify exactly how many return values to expect in these cases, since the following doesn’t compile:

func GetUnit(units map[string]int, item string) (int, bool) {
 return units[item] // not enough return values
}

…but this does…

func GetUnit(units map[string]int, item string) (int, bool) {
 i, ok := units[item]
 return i, ok
}

OK Go!

# Named Captures in Regular expressions

One of the many things I like about Ruby is how easy it is to use regular expressions to get things done. I guess it gets this from Perl and AWK.

For example to get a couple of words:

/^(?<first>\w+)\s+(?<second>\w+)$/.match('Hello World') # => #<MatchData "Hello World" first:"Hello" second:"World">

In Go, I have three problems (as my long-suffering friend Marcus points out). After specifying the regular expression, I need to create my own map to get the indexes for the named matches.

package main

import (
 "fmt"
 "regexp"
)

func main() {
 matcher := regexp.MustCompile(`^(?P<first>\w+)\s+(?P<second>\w+)`)
 matches := matcher.FindStringSubmatch("Hello World")
 namedMatches := map[string]string{}
 for i, name := range matcher.SubexpNames() {
  namedMatches[name] = matches[i]
 }
 fmt.Println(namedMatches)
}
go run main.go
# map[:Hello World first:Hello second:World]

So much boilerplate code to get stuff done. I had similarly verbose experiences with simple programming concepts like returning a positive integer (there’s no abs() in the standard library and finding an element in an array a slice – roll your own for-loop). And to get the last item from a slice, you need first to determine the length of said slice. I really expected Go to be considerably better than its C-like predecessors but it’s not and I’m not even going to dig into pointers in this post. It’s already too ranty!

While I am glad I have enough familiarity with its syntax to be able to review Go code at work, it is not a language I’ll be rushing to for solving hobby programming problems.

Okay, April, what do you have in store for me?

Functional February

Having really enjoyed JavaScript January, I had absolutely no idea which language I was going to choose for Month 2 of #12in23. It wasn’t until the morning of 1 February that I happened upon the relatively new jq track on Exercism. It had never occurred to me up until that point that as well as being a handy command-line tool for processing JSON, jq implements a language. It turns out that I had underestimated it, much as I had AWK all those years ago.

Did you know you can use jq as a simple command-line calculator, for instance?

jq -cn '6 * 7'
42

Or make functions, which help to make filters more legible?

jq -cn '
def double:
  2 * .
;

[range(10)] | map(double) 
'
[0,2,4,6,8,10,12,14,16,18]

Much like in JavaScript January, I found myself tackling a single exercise from the jq track in a few minutes each day. I also found that I was having a lot of fun with learning the new language and some days I found myself knocking off two or more excercises of an evening just for fun. Putting the “fun” in “functional”, as it were. Soon I found myself at the end of the track with a couple of harder exercises, an evaluator for a very simple subset of Forth and solving the Zebra Puzzle. It took me a couple of sessions to solve each of these but I was happy with how neat the solutions to these problems were in jq compared with what they might have looked like in some of the languages with which I am more familiar.

I don’t think I’ll be reaching for jq as my go-to language after this month, but I’ll certainly be able to use it more handily for building reusuable reports based on JSON responses from APIs.

Having accidentally completed the whole jq track with a few days of the month to go, I revisited Elixir, which I still really, really like as a language.

One more surprise from Functional February? I did most of the exercises in VS Code and I liked the experience so much that I wrote this blog post in it!

JavaScript January

One evening right at the beginning of 2023, I got an email from Exercism inviting me to join The #12in23 Challenge. I was home alone and thought that this sounded like fun (you should see the number of Rubik’s cubes in this house to get an idea of how I define “fun”). I’d played with Exercism a few years ago to get myself up-to-speed in Elixir, which was looking like becoming popular when I was Envato and I found it to be both educational and entertaining. I resolved to undertake one language per month and one exercise per day.

On a whim, I decided to take on JavaScript for January.

It seems almost unbelievable that in close to a quarter of a century working in software development the only JavaScript I have written was in the form of a small, cargo-culted change to a parkrun-related browser plug-in. It’s a language I’ve never really needed to touch and of which I have remained pretty ignorant. It was good to finally meet it head-on.

Most days I’d be able to knock off an exercise in about 15 minutes. The only exception to this was the exercise on the concept of Promises, which was a new concept to me and took most of a Friday evening. On a couple of days where the exercises were really easy, I did multiple exercises, as I didn’t start on 1 January and I thought it would be nice to end the month having completed (at least) 31.

It is good to do some programming again and I actually like JavaScript more than I expected to. The nullish coalescing operator (??) is a nice language feature that I don’t think I have used in any other language so far.

I’m excited for Functional February!

Back-to-back meetings are tiring, let's not do those!

Let’s start this post with the assumption that synchronous, face-to-face meetings are a part of how a successful organisation operates. Reaching any other position is outside of the scope of this post, although is certainly something I would like to explore separately. Great!

Back when I used to work in an office most days, I would often find myself joining meetings late because the previous one was scheduled to finish at the same time as this one started on a different floor of the building. Three or four hours of back-to-back meetings with a race from a meeting room on one floor and a meeting room on another left little room for refocusing or for comfort. It was very tiring.

At the beginning of the pandemic, when we moved to working from home full-time, I found myself grateful for losing the inter-meeting staircase dash, but I found that bonus came with its own price. Meetings that had been scheduled back-to-back, had even less of a gap than they did before - I’d exit one online video call and enter another one in the space of a couple of mouse (or Shortcat) clicks. Working from home looks more sedentary than office life for this reason and I don’t like this aspect of it.

These days I work a nice hybrid mix. About five days per month from SEEK HQ and the rest from the home office. I like this mix but that’s not the point.

# So what?

Parkinson’s law states that “work expands so as to fill the time available for its completion” and meetings exhibit similar properties (so do look a lot like work). The good news is that we don’t have to allot a full hour or a half-hour to every meeting. I like to schedule meetings for 25 minutes or 50 minutes depending on how much material there is to cover; that way I give all attendees the gift of a short break before our next event so that we can stand up, stretch, walk around, focus on something other than a computer screen, rehydrate and maybe even find their next meeting room.

Research from Microsoft shows that Your Brain Needs Breaks and Microsoft have responded to this with functionality that allows us to make all of our events shorter.

I enabled similar functionality some years ago, I think when Google first introduced “Speedy Meetings” in their workplace calendars and haven’t looked back. I really like how Calendly allows not only to set a custom duration for meetings but also to add buffers before and after a meeting when you Customize Your Event Types.

# In conclusion…

Technology is a big help here and scheduling 25 minutes for a meeting sets expectations for all attendees that there will be a break before their next one, to reduce fatigue. It’s then up to the organiser to have the discipline to end on time.

Why not try this with your meetings in February and let me know how it affects your energy levels? I’d love to hear from you!

Pronouns-iation

In my last blog post, Keeping in the Development Loop, I listed a bunch of email newsletters that I enjoy as a technologist. Today I want to share one more email newsletter that I get a lot of value out of and that’s Better Allies ®. Each Friday (ish, depending on your timezone), Karen Catlin shares five tips on inclusion, from which I think have learned a lot. I’ll let my colleagues be the judges.

Since reading 5 Ally Actions - Apr 9, 2021 I have been including my pronouns and the pronunciation of my name in my email signature. It took less time than it took to read that week’s newsletter to add these. Easy!

Three months ago, I started a new job and on my first day I found myself setting up new email signatures, Slack and Zoom profiles - each of these includes my pronouns and the pronunciation of my name, it’s just what I do these days. I was quite surprised to see that this practice is not commonplace in my new workplace but I expect this will improve.

I was recently in a webinar where a participant was misgendered by one of the presenters answering their question, which they asked using Slido (whose homepage boasts, “It’s how you include everyone in your meetings”). There’s currently no facility in Slido to display pronouns or pronunciation alongside your name. I think this could have saved some discomfort if it were available and used – so I’ve submitted a support request to add this feature.

People tend to get my pronouns right all of the time and pronounce my name correctly most of the time, so I’m sure some people are reading this and wondering why I do this. In short, I want to help to normalise the practice of sharing pronouns as I understand this is helpful to genderfluid, transgender, and nonbinary folks. I also believe that no one should have to hear a broken version of their name. Kudos to NameDrop for making this really easy.

This week (13 - 19 November) is Trans Awareness Week, a week to celebrate, support, and learn about trans and gender diverse people. In the spirit of being a better ally, here are my 5 action items for this week that you may like to consider:

  1. Subscribe to the “5 Ally Actions” Newsletter.
  2. Add your pronouns to your email signature and online profiles. I’ve just added mine to this page!
  3. If you administer a Slack workplace, enable “Pronouns Display”. By default, the pronoun field is hidden in Slack profiles, I learned this week.
  4. If you’re maintaining a service that connects people, make it possible and easy to display pronouns and name pronunciation (and perhaps a recording).
  5. Customise your chatbot to look for problematic terms and suggest alternatives.
← Newer Page 1 of 13