Weeknotes 2022 W41:
The Office

Week of October 10 to 16, 2022
What are these? These week­notes are a reflection on the past week. I write about anything from hobby projects and work to creativity and mental health. I publish my week­notes every Sunday morning. Consider subscribing via email or using the web feed!

I went to the office for the first time ever on Friday. It’s not something I intend to start doing regularly, but this was a unique opportunity to meet some people who were in town, including my manager.

It’s nice to work with people in person, though the time spent commuting and the lack of proper equipment (mechanical keyboard, ultra-wide high-DPI screen, vertical mouse, good microphone, etc) makes it not worth doing regularly. As mentioned in Week­notes 2022 W35: Spidey, working remote is still fantastic.

I’ve not experienced too many gremlins lately, but that changed when my M2 MacBook Air had a kernel panic, after which I couldn’t log in anymore (beach-balling at the login screen).

I disconnected my hard drives, after which I managed to log in. However, the desktop background was stuck to the top left, with the rest of the screen black, and there was no Dock. Very strange!

I restarted and reconnected my hard drives, trying to figure out what had gone wrong from Console.app, but macOS refused to open any application. I rebooted again and managed to get Console.app open, showing me the following messages:

obj_init:2806: disk10s1 wrong object - wanted oid 0x42e9e8 type 0x40000003:0xb xid 0 - got oid 0x1 type 0x80000001:0x0 xid 811378
nx_corruption_detected_int:55: disk10 Container corruption detected by obj_init:2807!
btree_check_recent_sanity:662: disk10s1 node 0x42951f (level 1): error getting index 22 child: 92
nx_check_recent_sanity:1095: disk10s1 omap check failed for omap 4358031: 92
nx_checkpoint_find_valid_checkpoint:589: disk10 xid 817961 sanity check of recently-changed structures failed: 92
nx_checkpoint_find_valid_checkpoint:584: disk10 sanity checking all recently-changed container state... please be patient.

Yikes! Those messages kept repeating over and over, too. I searched Google for relevant information, but quite a few of those messages yield zero search results:

My conclusion is that the drive is fucked. Specifically, fucked in a way that nobody else has ever experienced. Maybe somebody out there has some insights?

Luckily, I was using the drive solely for backup. It’s an old drive (from 2016), so I’m not so surprised. Now I’m down to only two backup hard drives: one I use for Time Machine, and one I use for Arq.

I have DriveDx, but I didn’t install the kext needed to get S.M.A.R.T. support for external drives on Apple Silicon Macs. Perhaps if I had installed that kext before, it’d have been able to warn me about impending failure.

I’ve spent some time on improving Nanoc’s performance. You can take a look at PR #1602, PR #1603 and PR #1604. In my tests, those changes yield a 20% speedup in the case nanoc is invoked when there are few content changes.

The most surprising learning for me was that calling #any? on Set is much slower than calling #empty? and negating the result:

    not #empty?: 24254424.3 i/s
          #any?:  1834197.2 i/s - 13.22x  (± 0.00) slower

13× slower is a lot! (You can take a look at the gist with the benchmarking code and detailed results.)

#any? is slow because it uses the implementation from Enumerable, which starts iterating over all the keys in the set, and thus over the keys in the Hash that backs it.

I’ve used stackprof in combination with speedscope to find the performance bottlenecks, and I think the combination of these two tools works really well.

My Fastmail account is up for renewal ($166.60 for 3 years, or $4.63/month), and I still think it’s absolutely worth the money. I’ve got a referral code for 10% off if you’re interested.

Let’s talk entertainment:


Week­notes for October 10 to 16, 2022. Browse the weeknotes archive, get these week­notes via email or subscribe to the web feed.