Posts from 2023
December 2023
Show Organic Traffic in TelemetryDeck the Simple Way with a Values Breakdown Insight
Find out how to effectively set up and use TelemetryDeck to filter website views by referrer, focusing on organic traffic sources. This is a much simpler way than the geeky query language approach from last time, no weird coding required.
Using Type Markers for ‘is’ Type Predicates to Cover Generic Types
Wrestling with generics and is type checks in Swift? Consider using (empty) protocols as type markers instead.
Dependency Injection via Protocol Composition
Declaring dependencies as protocols, then combine via ’&’.
Update for modus-themes v4 and mlscroll.el Colors
The mlscroll Emacs package got an update that makes styling it even simpler.
Ignore Generated Xcode .xcworkspace Files in Git Except Package.resolved
To tell your teammates’ Xcode that packages need to be updated after a pull, check in the resolved packages file from within the Xcode project bundle. Here are git ignore rules to help you with that.
Show Referrers in TelemetryDeck for Web with a TopN TQL Query
TelemetryDeck can act as a lightweight and GDPR-compliant website analytics tool. But you need to create some things yourself, like computing a list of top referrers. Here’s how you do that with a TQL query.
TableFlip v1.5.1 comes with many HTML and exporting tweaks!
Transforming JSON to Tables: the Impedance Problem
There’s a mismatch between the nested object structure of JSON and tabular data. But there’s hope.
How Long Does a Disk Preclear in Unraid Take for 12TB of Data?
Spoilers: it takes 3 whole days.
November 2023
After starting the day with a pro-SwiftUI rant, to my surprise I end it with an embrace of traditional, tested and true AppKit patterns.
Not Quite 100% SwiftUI – Time Makes Perfect
Marin Todorov’s “A 100% SwiftUI App” talk from this year’s Swift Heroes went life (and it’s really worth the half hour!)
This update brings HTML export, more LaTeX export options, and much improved performance!
September 2023
Sparkle v2.5 Adds Relevant Version Highlighting to Release Notes
With Sparkle v2.5, you can ship release notes for multiple versions, and then use CSS to hide outdated information from the user.
Portable Painter Micro Palette
As a birthday gift, I got the Portable Painter Micro watercolor palette with some new colors. Here’s my first sketch with it.
UserDefaults.register(defaults:) Is a Bit Like Nil-Coalescing
Mental model: registering fallback values for UserDefaults is like Optional coalescing in Swift.
Some bullet points (and stats) about my previous year in life.
Kill Unsaved Emacs Buffers UX: Replacing Yes/No/Save with Meaningful Options
Since Emacs 29, I’m being asked if I want to save or discard an unsent mail in a very confusing way. I found a fix.
The Missing Array.appending(contentsOf:)
There is no immutable append variant to concatenate two Arrays, or Strings, or other collections in the Swift standard library. Here is one.
August 2023
Making Your App Extensible with JavaScriptCore: Annotated Presentation with Full Transcript
Last year’s presentation slides with the full talk transcript for my JavaScriptCore plugin approach.
SwiftData: Store Image Data, but Actually Outside the Database
Use the @Attribute(.externalStorage) option to save binary data with SwiftData but outside the database.
Async XCTest Assertion Helpers
The missing XCTAssert helpers that support async calls: AsyncAssertTrue(try await shouldSucceed())
Summary of how the responder chain is traversed on macOS to have events bubble up.
SwiftUI.View Is Your ViewModel
Hypothesis: You already have a View Model when you work with SwiftUI, which is the View type itself.
Decoupling SwiftUI.View Configuration from Layout and Action Handling
Decoupling introduces independence, which means the de-coupled pieces can change independently. Even in the smallest view component, this can bring tangible real-world improvements.
July 2023
I sometimes receive email where people (accidentally?) quote themselves, not my original text, and I can’t figure out why.
June 2023
Super Saturday Sharefest: Matt Massicotte’s XPC Work
Shout-out to Matt Massicotte for sharing yet another XPC and Concurrency related open source package!
A maintenance update with minor visual changes.
macOS Sonoma Menu Section Headers Look a Bit Off
The new NSMenu section headers feel like they violate the principle of proximity in visual design.
Swift Package Import in Objective-C Might Just Work
Unbeknownst to me, you can @import Swift Packages in Objective-C files just fine!
SwiftUI.List with Menu with Plain Button Style Breaks Event Loop
Super weird edge case: the plain button style makes interacting with the menu all but freeze the app. (FB12285575)
How to Inspect SwiftUI.TextField.onSubmit and Figure Out You Can’t Programmatically Use It
I looked for a way to trigger the onSubmit block in my own code, but none of my approaches bore fruit.
Swift Pattern Matching with Extra Conditions, and the Value of Syntax Summaries
Natalia Panferova of nilcoalescing.com posted “Swift enum pattern matching with extra conditions”: I believe there’s value in reviewing summaries like these for advanced Swift programmers!
May 2023
11 or so Android Ebook Reader Apps for Academic Writing Workflows: Annotations are Hard
I tested a bunch of Android EPUB reader apps to see if annotations would work with my Zettelkasten workflow. The result: it’s not easy to improve the workflow.
BOOX Vector PDFs Are Already Colored
Ok, no need to investigate further: PDFs are colored if you use color pens, so I’m now just using that instead of replacing colors in the PDF source.
Colorize Onyx BOOX Notes Vector PDFs (Really Rough Edition)
I wanted to colorize greyscale vector notes. This led me down a rabbit hole of replacing color definitions in the PDF’s source code.
Boox NeoReader Annotation Export Is Meh
The Onyx Boox e-reader is equipped with a good e-book reader app, but its export is almost useless to parse and use in an academic context.
Safari URL Scheme for macOS and iOS
Replace https: with x-safari-https:, and you can open a link in Safari, no matter the user’s default browser.
Wrap HTML Tables in Figures using Nanoc and Kramdown
On mobile phones, wide tables didn’t scroll horizontally – instead, they broke out of the content container and everything looked a bit wonky. So I wrap them in <figure> elements now.
April 2023
Fetch Personalized Command Explanations with ‘um’ from Your Terminal
March 2023
February 2023
January 2023
Display a Random Inspiring Quote for Journaling or Shell Prompts