No Open Office Hour On May 27th
Just a quick heads up: this week, I’ll have to skip open office hours. We’ll resume next week (on June 3rd / 2025-06-03).
Just a quick heads up: this week, I’ll have to skip open office hours. We’ll resume next week (on June 3rd / 2025-06-03).
Signal on Windows disables screenshot-taking via DRM tools to protect from recording sensitive information via “Recall”: Microsoft Recall takes screenshots of your apps every few seconds as you use your computer and then stores them in an easily searchable database. In Microsoft’s own words, its goal is to act as a sort of “photographic memory” for everything that you do on your computer. The words that other people chose to describe Recall upon its debut were decidedly less positive.
In my Emacs email setup (notmuch.el
using message-mode
), I had this for the longest time: It would insert Cc and Bcc headers into email composition buffers so that I could quickly edit these fields. However, the message-default-mail-headers
insertion is done unconditionally, so when replying to mail with people receiving a carbon copy, I would end up with two such header lines:
You will have heared something along these lines: The era of the junior developer is over. Why would anyone hire a junior when an LLM is at a higher level? I positively can imagine how Big Tech can cut cost this way for a while, not training juniors. Eventually, they’ll run out of new seniors, of course. You can’t make a sound moral principle from this.
Did you know that the Software Craftsmanship Manifesto extends the Agile Manifesto? Like this first line from the Software Craftsmanship Manifesto: “Not only working software” is a reference to the Agile Manifesto:
Miguel de Icaza has been working on an iPad adaptation of the Godot editor with all native UI. Check out his blog on the process and the SwiftGodot talk from GodotCon 2024.
SwiftGodot provides Swift language bindings to the Godot game engine so you can use Swift Packages from Godot. Check out the tutorial.
So: Yes, you can now create and run Godot games on the iPad.
It’s a $50 one-time in-app purchase if you want to buy it.
Read the Xogot release post
Rick van Voorden in yesterday’s Open Office hour told me about the fact that variadic types in Swift can, in fact, have an empty list of associated types. A quick refresher of variadic types in Swift using parameter packs:
Assumed audience: You need a domain managed in Cloudflare dashboard for any of this to work. I assume you do, and want to point to your Unraid NAS, with SWAG as the reverse proxy. So this is a niche topic. I used the old cloudflare/cloudflared Docker container configuration with a local YAML file via aeleos’s Unraid plugin. It was a very simple file, being just:
For the longest time, I had my compilation buffers split to the right in a rather large window. Until I started programming in Emacs. Previously, I looked at LaTeX build outputs, or the static site generator’s progress. That was it. Lots of logged text, so I wanted the space. But compiling C++ or Swift code compulsively, as I do, this got on my nerves really quick. So here’s a more normal configuration, showing compilation-mode
buffers in a 25% bottom split “side window” (essentially a sidebar, but anywhere).
I want to start a new series where I show snapshots of my Zettelkasten work. Because it’s tremendously useful for programmers – but at the same time it’s hard to grasp what I actually do. The mechanics are very simple. Trivial even, especially for programmers who have their favorite editors and writing tools.
When not faced with external constraints, good software craftspeople will evolve their software ‘inward’, ad infinitum. They are excellent coders. It’s a joy to watch them work. They know about the intricacies of the domain, they know the infrastructure and have in memory the pains of rushed quick fixes and other tech debt. Left to their own devices, they will clean up, rethink existing approaches, experiment with new architecture. The project can be improved, and they know just how to do it.
md-babel
is a cross-platform (Linux, macOS) command line utility that enables text editors to execute code blocks and then show the result. https://md-babel.org/ “Enables text editors to” actually means you can use it from VSCode or Emacs or Neovim. Others to come.
Not all Swift code can directly be made available to C – or rather via C to other ecosystems that allow FFI (foreign function interfaces) from C libraries. The key is twofold: The following is based on this Gist by Julian Kirsch : https://gist.github.com/HiImJulien/c79f07a8a619431b88ea33cca51de787
org-mode
files can be used for any kind of outline, including makeshift calendars and makeshift address books. To make this work with org-capture
to insert a new thing into such files, which always just appends, you can auto-sort a file e.g. before saving. That guarantees that the file is in a consistent state (sorted alphabetically) without you having to be clever about finding the corrent insertion point.
So I’ve used restclient.el in the past to embed HTTP requests in readmes and other kinds of documentation to test login flows and APIs as I’ve been writing the corresponding servers. But chances are you can’t use that package since you don’t use Emacs.
Andy Bell: “I’m getting fed up of making the rich, richer”: I’ve forever been obsessed with sharing knowledge. It’s why I’ve blogged so relentlessly over the years because I feel a constant debt to a community that shared so much when I started out.
Tolstoi’s Anna Karenina opens with this powerful, infinitely quotable statement: All happy families are alike; each unhappy family is unhappy in its own way. It’s not a universal truth, it may not even be empirically stable observation, but it sure feels relatable. We can learn from this, reasoning by analogy.
So I was happy spending a couple of days working on a Markdown pipeline. One that would allow me to process Markdown files, perform automated tasks, then produce 2 results: The swift-markdown
package wraps the cmark
CommonMark parser and offers a really nice to use API. Also Marin told me on every other occasion that I should try it, it’s good :)
Starting Tuesday, 2025-04-01, 18:30 CEST (in your timezone), I’ll be hosting an AMA Open Office Hour one hour later than usual.
Except 2025-04-08 (next week), we’ll be hosting our mobile meetup and I won’t be available. So I’ll be there this week on 2025-04-01, then there’ll be 1 week off, then we’ll resume the weekly recurring times starting 2025-04-15.
My daughter is less than a year old. We don’t see a point in forcing her to adjust her sleep schedule by 1h to the same time on the clock, just because DST kicks in. 5:30pm was late during winter; 6:30pm is just as late in her day during summer.
Also, it’s our first summer together, and we don’t yet know whether she’ll be waking up earlier and wants to go to bed later as the days get longer anyway.
So we’ll stick to the sun in the sky and the sun in our lives and pretend DST never happened.
Use the time to get in touch, ask questions about apps or programming projects, discuss your own code, or talk about Zettelkasten or Emacs or sketching or woodworking.
Since starting this experiment in January, I managed to show up on a weekly basis. So you can probably plan ahead to chat.
Join on Jitsi on Tuesday.
Are you new to iOS/macOS programming and app development? You’re very welcome to ask all kinds of questions if you need orientation, be it about Swift, app or web development, programming in general, career, having a baby daughter – you name it!
Helge Heß pointed out that naive usage of Pipe
in child Process
es can break your program if you pipe too much data. I wasn’t aware of this, followed his references, and here are my findings. Older Mac OS X versions had a pipe buffer size of 16KiB by default, offering 64KiB on demand; in my N=1 test on an M1 with macOS 14, I always get 64KiB buffers, even if I only send 1 Byte. Run pipe buffer size discovery tests yourself to check.
Calling NSPopover.show(relativeTo:of:preferredEdge:)
with a NSTextView
as the positioning view will slow down your app the more links your text view contains. I discovered this with auto-completion popovers in my note-taking app The Archive and hunted down the issue. In notes with ~100 links (hashtags, web links, wiki links, …) displaying the popover with completion candidates was much slower than in short/empty notes. The slowness scales linearly with the amount of links, and is related to accessibility children iteration.
Shiny Frog’s (of Bear.app fame) Matteo Rattoti shared a repository to demonstrate a NSFileWrapper Modification Date Bug:
This repository demonstrates a bug in
NSFileWrapper
where overwriting a file with the same content using-[NSFileWrapper writeToURL:options:originalContentsURL:error:]
sometimes causes the file’s modification date to be set in the past instead of updating to the current time.
It happens about 50% of the time.
Can reproduce on macOS Sonoma.
Here’s an AppKit quirk I found out this week. Usually, the NSStandardKeyBindingResponding
protocol declares standard text movement and editing functions like selectWord
or moveToBeginningOfParagraph
or deleteWordForward
. While text view subclasses can just override these to modify the behavior, you can get the same key event handling from any NSResponder
: call interpretKeyEvents(_:)
in its keyDown
implementation, and you’re set.
In New Junior Developers Can’t Actually Code, Namanyay argues that StackOverflow would teach you something, while AI is all about speed. The graph Namanyay shared is this: Side note: Do you remember when StackOverflow was strongly associated with copy-paste-programming without understanding, and that Real Programmers™ read manuals and books instead?
Using regular expressions to perform text replacements can be tricky. Without robust undo support or version control, a preview of the changes, or checking every replacement before it’s being made, you can end up with false-positive matches and mess things up. Now Emacs 30.1 released and ships with yet another way to perform mass text replacements more safely: Use run-of-the-mill diffs to show the changes that would be made if you applied a regular expression-based replacement. I love the ingenuity of this idea, because it is so obvious.
Ethan Marcotte resigned at 18F not even a year after getting on the team, doing exciting things – because it’s tied to the U.S. government, and the DOGE-istas crossed principles he set up for himself. The principles are like exit strategies you would use in investing: they help to make a (morally) good decision early, so that when the stressful time comes, you can follow the plan and won’t be swayed by emotion.
Your beliefs mean nothing, and everything. The thing about a large undertaking like, say, “fixing the government”, is that in true Getting Things Done fashion, this is not a Next Action. It cannot be ‘done’. It’s also not a Project, being comprised of 2 or more actionable tasks. It’s an Area of Responsibility. It requires constant effort and realignment of one’s actions.
Matt Massicotte, looking for leverage to make Apple feel that their course of action is not okay (also on Mastodon): To put it mildly, I have been struggling with this. I have been trying to find ways to respond. Something that could give me some kind of leverage.
The Braille Institute released an update to their Atkinson Hyperlegible font. My late grandmother approved of its shapes, so check it out if you want to maximize legibility of all letters and numbers in your life. (And when do you not want to be able to read what you type?)
Burkeman challenges the common notion of productivity, like striving for ever-empty inboxes and ticking of all the tasks on our to-do lists. He does that by offering paradoxical irritations (or interventions) – so that you, the reader, as a system of beliefs, have to react somehow to make sense of what you read.
When I addressed the second-to-last RxSwift reentrancy warning this week, I already cut my teeth on very simple state updates and refactored a them in a way that like much better now. I left the gnarly text editing component, the most involved piece of UI in a text editor, for last.
When I started developing Mac apps eons ago, I only had a crappy Intel Mac Mini that took forever to compile my apps. To make this manageable, I adopted library-based development and prepared UI components as dependencies I could compile once, then link as .framework
s into the app. Carthage was a big help there, automating the process.
So I am working on auto-completion in NSTextView
in a package called TextKitAutoCompletion. This is the first new Swift Package project I started with Xcode 16, I believe; the previous one was still Xcode 15. And with 16, they changed how you can reference local packages from example apps in subfolders.
I avoided hamburger menus for the better part of the past decade. This time, I had no better idea. The result is the new mobile navigaton for zettelkasten.de. Also, it seems like the UI component sticks with people, and is not just a weird fad anymore. It’s too old for being trendy.
Professor John Gallaugher of Boston College has a free course on making apps with SwiftUI, to be updated in 2025: https://www.youtube.com/playlist?list=PL9VJ9OpT-IPSM6dFSwQCIl409gNBsqKTe On his website, there’s a previous iteration of the course using UIKit (which I believe is still a very valuable framework to learn in 2025, given how often you need to implement or fix things in SwiftUI!)
Starting Tuesday, 2025-01-14, 17:30 CET (in your timezone), I’ll be hosting an AMA Open Office Hour here.
It’s free.
Join on Jitsi on Tuesday.
New to programming or app dev? You’re very welcome to ask all kinds of questions if you need orientation, be it about Swift, app or web development, programming in general, career, having a baby daughter – you name it!
I split off the Reactive Extensions (Rx) of my own Omnibar package so that you (and I!) can use it without having to download and build RxSwift. Omnibar: https://github.com/CleanCocoa/Omnibar
RxOmnibar: https://github.com/CleanCocoa/RxOmnibar