Started reading: The Kaiju Preservation Society by John Scalzi. It was page 2, when I read the name of the mobile app the protaginst was working on, when I got good feelings about this one. πŸ“š

During the last four days, I drove home from Canberra (not a bad thing), my job went live with the project I’m working on, I intended the funeral of my grandfather who passed away last week, and I came in contact with someone who has Covid-19. One more day to go.

Just got my new passport today. Shortest six weeks of my life. πŸ˜‰

πŸ”— Facebook on 30 Percent Platform Fees: β€˜Hold Our Beer’

Meta talking about platform fees for the metaverse feels to me like a school rock-band talking about how they’d divvy up revenue from ticket sales before they get their first gig.

Went to the National Gallery of Australia today. Must say that I enjoyed it much more than I thought I would. I didn’t think of myself as someone who liked going to galleries. Maybe it’s just because it’s been a while since I’ve gone to one (last time was in 2017).

Trying to use GitHub Codespaces on an iPad. It sorta works. When it does, it works quite well. But there are times when the Enter and cursor keys just stop responding, and a reload of the page is required to get it working again.

I’m also a little surprised there’s no iOS app for Codespaces.

Good morning from Canberra. Photo’s taken just a little after 7:30 this morning.

Dad and I will be driving to Canberra today to spend some time with the family over the Easter long weekend. Estimate travel time is 6.5 hours, so the trip will pretty much take all day. Not that I mind. I do enjoy the occasional long drive.

Really enjoying the newsletter Speaking Tech by Michael DeHann. It reminds me a lot of Steve Yeggi’s Drunken Blog Rants.

The thing about Severance is, while it may be the case that those on the severed floor at Lumon are living through a mega-corp workplace dystopia, at least they get to keep regular working hours.

Started watching Severance yesterday and I got to say, it’s pretty good. Certainly something that grabbed me early, which is probably the reason why I couldn’t get into Ozark.

A Case For Mocking in Unit Tests

Here’s a short account of a realisation I had this morning on the occasional usefulness of mocks in unit tests. I’ve never been a huge fan of mocking in unit tests. The code to set them up is tedious to write, and tends to be very fragile. Any change or refactor you make to the module being tested β€” even if the behaviour doesn’t change β€” and all your tests break because the mocks are no longer called the way they were. This goes against one of the key principals of unit testing in my opinion, in that it is the behaviour of the module is being verified, not the actual implementation.

However, today I came across a case where a mock would have come in handy.

I was working on changes to a unit test for a module that interacts with DynamoDB. Because of my natural dislike for mocking, this tests was written to make use of a real client making reads against a “real” DynamoDB database, running in a Docker container.

Today, I had to make a change to the public contract: the addition of a field controlling whether the reads should be made with strong consistency or not. Given the nature of DynamoDB, this is something that only makes sense in a production setting, with DynamoDB replicas running within the vast AWS data-centres spanning the world. But for my lowly unit test, setting this field on my test DynamoDB instance would make no difference at all.

So how can I verify that the module I’m working on would actually make strong consistent reads?

This is my realisation in that you can choose to do thing’s a certain way, but there will always be trade-off. Using a “live” database would mean that much of the mock setup doesn’t need to be written, and that you are actually exercising the code which is making real calls to the database. But when it comes to asserting whether the actual calls made to the AWS client are correct; well, that will require intercepting them, and verifying that the passed in arguments are what you expected. Difficult to do if you are using a real client instead of a mock.

Love this remark from Gruber about the comment from Twitter about Musk’s board seat:

The first thing I’ll note is that Agrawal had to share the β€œbrief note” itself as a screenshot, because, well, Twitter only supports up to 280 characters in a post. Duh, right?

Could have been worse than a screenshot. They could have shared their brief note as a Twitter thread. πŸ˜„

Passport renewal forms filled in and sent away, along with new passport photos. Apparently there’s a bit of a backlog, and it will take six weeks for my new passport to arrive. I guess after the last two years, people are eager to get back to travelling overseas again.

Finished reading: Indie Microblogging by Manton Reece. Great read, especially about all the work the Indyweb is doing, and the principals behind Micro.blog’s design. πŸ“š

Went for a walk this afternoon and came home to two deliveries of online orders, which was quite surprising. Guess I wasn’t the only one working this weekend.

Fired up Logic Pro for the first time in a while. Trying a rearrangement of Passion for Exploring from the VVVVVV Sound Track. Got the chorus sounding pretty good, although some of the synth attributes need a bit of fine tuning. Here’s a sample of what I’ve got so far.

Had a drinks with friends and watched a comedy set at Comedy Republic last night. Nice place for a catch up. Managed to get a table before it got really crowded, which was lucky. Comic was pretty good too.

On the subject of Twitter’s edit button announcement, I find it amusing that they tweeted about it on April 1, only to tweet again a few days later to avoid the impression that it was an April Fools joke. I guess tech companies can no longer announce anything on that day anymore.

I don’t know how people on Twitter live without an edit button. I’m always posting something, then a minute later finding either a miss-spelling or a clunky sentence that can be rewritten. If I was posting on Twitter, every second tweet would be a correction.