NSFileWrapper Sometimes Changes Modification Date to the Past

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.

NSTextView Bypasses performKeyEquivalent Check for Backspace and Option-Backspace

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.

Continue reading …

Comparing Use of AI vs Learning to Code Has Nothing to Do With Knowledge

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?

Continue reading …

Preview Mass Text Replacements with Emacs 30.1 replace-regexp-as-diff

Teaser image

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.

Continue reading …

Ethan Marcotte, the Luxury of Job Choice, and Principles

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.

Continue reading …

Important Things Are Never Just Done

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.

Continue reading …

Guilt-Free for the First Time. Burkeman’s “Meditations for Mortals”

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.

Continue reading …

Free SwiftUI University Course fro -Boston College Professor

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!)

Continue reading …

Open Office Hours: Tuesdays, 17:30 CET

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.

  • Talk about projects;
  • Ask questions;
  • Conspire to do something cool.

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!