ChatGPT: Publish NSTextView Changes to ReSwift, but Also Use a Lamport Clock

Me: How can you wrap NSTextView events to go through a ReSwift store? ChatGPT: It’s not clear what you’re asking. Could you please provide more information or context? I’m a large language model trained by OpenAI, so I don’t have the ability to browse the internet or access in … | Continue reading


@christiantietze.de | 1 year ago

Dec 3 and Dec 4: EmacsConf 2022 Live

EmacsConf 2022 is this weekend! It starts 15:00 CET (German Time), aka 9am-5pm Toronto/EST. There’s a metric crapton of talks and demos and stuff. Recent years have been good to the Emacs web community. Overview: https://emacsconf.org/2022/talks/ The website is great; it includes … | Continue reading


@christiantietze.de | 1 year ago

Use System File Open Dialog for File Actions in Emacs (Just Once!)

Emacs users sooner or later disable all the GUI stuff, and usually also get rid of system alerts and file pickers. But if you just once want to pick a file using your operating system’s file picker, these three temporary variable overrides will do: (let ((last-nonmenu-event nil) … | Continue reading


@christiantietze.de | 1 year ago

Mutating Struct and State Observers: How the Latter Will Be Notified Even for 'No-Ops'

I may be 7 years late or so – but until last week, I didn’t realize that didSet property observers would fire when the observed property hasn’t actually changed. All you need is a mutating func that doesn’t even need to mutate. Observation This can be illustrated with a simple pi … | Continue reading


@christiantietze.de | 1 year ago

Wiki Updates for Nov 29th

I just wanted to write one short post. Then I discovered that I didn’t yet have a wiki page for a central concept. Then I needed another one. And an hour later, here we are. New wiki pages: Domain-Driven Design Aggregate Root Bounded Context Entity Value Object … | Continue reading


@christiantietze.de | 1 year ago

Org-Mode Outline Levels 9+

Emacs’s outline-mode only has font settings aka “faces” for 8 outline levels; then they wrap, so level 9 looks like level 1 and so on. org-mode inherits these faces, and thus also only defines 8 styles. That’s more than enough, I believe, to have some visual variety in your outli … | Continue reading


@christiantietze.de | 1 year ago

Gitea Ltd. Takes Over Gitea Open Source Project, Community Pushes Back

I discovered this piece of news by accident, and I want to share this with you because I believe this is a very interesting case, providing insight into open source projects, even those that are wildly popular. Gitea is an open source “git forge” (think: GitHub; or rather GitLab, … | Continue reading


@christiantietze.de | 1 year ago

CocoaHeads Talk about JavaScriptCore Plugins on Thursday 2022-11-24, 7 p.m.

This Thursday (in 2 days), I’ll be doing a short presentation of plugin systems via JavaScriptCore, plus an interactive demo and something for attendants to play around with. (Fingers crossed I finish it in time ) You can join via Zoom. It’s free, and should be fun :) Time: 202 … | Continue reading


@christiantietze.de | 1 year ago

Smooth Scrolling in a Table View for Custom Shortcuts

NSTableView comes with a couple of default shortcuts in an override of its keyDown(with:) method. These aren’t mentioned anywhere, so Xcode’s documentation quick help will repeat the NSView docstring to you, saying: The receiver can interpret event itself, or pass it to the sys … | Continue reading


@christiantietze.de | 1 year ago

There Could Be No “Later”

In recent weeks, I’ve been feeling quite restless. There’s not enough time, too many things I just can’t seem to take care of. You probably know that feeling – or rather, the attitude towards things. There’s a couple of things that need to be sorted out. And there’s stuff that ar … | Continue reading


@christiantietze.de | 1 year ago

Screen Time Database Pecularities

I have Screen Time enabled and synced across devices for quite a while for top secret reasons. My Mac can list Screen Time activity from my mobile devices many weeks in the past. The iPad itself, though, can’t show anything that was before last Thursday. Huh? knowledgeC.db and th … | Continue reading


@christiantietze.de | 1 year ago

NSTableView Variable Row Heights Broken on macOS Ventura 13.0

Variable row heights in your NSTableView might be broken in your apps on macOS Ventura 13.0 – it’s fixed with the upcoming 13.1, but that’s only available as a beta at the moment. When you replace table contents by calling aTableView.reloadItems(), this will ingest the new data a … | Continue reading


@christiantietze.de | 1 year ago

macOS Ventura App Compatibility

Happy macOS release week, everyone! Earlier this week, macOS 13 Ventura was released. It’s a point-oh release, so you might want to sit this out a bit and wait for 13.1, as is common practice. (My main developer machine is running Big Sur, and I won’t be updating for a couple of … | Continue reading


@christiantietze.de | 1 year ago

Sketch Employees for Hire

This list was extracted from my reaction to Sketch laying off 80 employees for higher visibility. Update 2022-10-18: There’s a spreadsheet overview of 57 Sketch alumni you can check instead! Here are some amazing ex-Sketch folks that I’ve found thus far who are for hire now: A … | Continue reading


@christiantietze.de | 1 year ago

Sketch Layoff of 80 Employees — Does It Really Send an Alarming Signal?

Sketch shared the news today (on LinkedIn!) that 80 employeed are being laid off. This will mostly impact Operations and Marketing, who have done great work in the recent weeks and months. Our Product team remains well-equipped, with a core team continuing to drive things forwa … | Continue reading


@christiantietze.de | 1 year ago

NSTextView (Plain Text) and the Pasteboard: PasteboardType.string Is Not Handled

For a plain text (not rich text/RTF) NSTextView, I found that: writablePasteboardTypes contains only "NSStringPboardType" by default. readablePasteboardTypes contains a lot of types, but only "NSStringPboardType" for plain text copying.- An NSPasteboard understands both "NSStr … | Continue reading


@christiantietze.de | 1 year ago

Overview of Attribute Fixing in NSTextStorage

NSTextStorage provides attribute fixing of user-entered text, via NSMutableAttributedString.fixAttributes(in:). Attribute fixing… … applies font fallbacks to special characters not included in the text font, e.g. “ZapDingbats” for some Unicode symbols, or “AppleColorEmoji” for … | Continue reading


@christiantietze.de | 1 year ago

'Black Box' Unifies Software Modeling in Modules

The metaphor of the “black box” is very common in programming. It is so general that it’s nearly meaningless; but it summarizes a lot of specialized principles nicely and shows a unifying principle. A black box is characterized by: a boundary inputs outputs A black box has i … | Continue reading


@christiantietze.de | 1 year ago

Example of High Cohesion and Low Coupling with Presenter, View, and View Model

Here’s a short definition of the two terms: Cohesion is about how well elements within a module belong together and serve a common purpose. Coupling is about how much one module depends or interacts with other modules. Thus, cohesion is an intra-module concern whereas coupling … | Continue reading


@christiantietze.de | 1 year ago

How to Fix When Some Text Changes Don't Come with Automatic Undo?

When you work with NSTextView and happen to use insertText(_:) to programmatically insert text, you get an undoable action for free. This might give the impression you get undo/redo functionality for free. Eventually, you’ll notice how other changes don’t have an affordance in th … | Continue reading


@christiantietze.de | 1 year ago

Reactive Code is Sequentially Cohesive

Reactive, declarative code is sequentially cohesive: you have a sequence of events and reactions to events, and it’s pieces are tied together real close. The processing chain itself is then a function or feature of the app. The chain of operators is a thing itself; the step-by-st … | Continue reading


@christiantietze.de | 1 year ago

Delete to Beginning of Line in Emacs to Rewrite Code

Ever since Brett Terpstra posted about ⌘← to jump to the first character of the line back in 2014, I’ve used behavior like this in Xcode. Nowadays, ⌘⌫ automatically deletes up to the beginning of the line, stopping at whitespace. That’s quite handy to rewrite the current line. Th … | Continue reading


@christiantietze.de | 1 year ago

10 Year Indieversary AMA Postmortem

Thanks everyone for joining the AMA yesterday! Was a fun experience :) We talked about a couple of technical and historic things. Here’s an outline of the pieces: My first App Store success When I released Calendar Paste v1 in 2012, I shaved my head and got a mohawk to cel … | Continue reading


@christiantietze.de | 1 year ago

Replacing zoom-window with winner-mode to Temporarily Change Window Splits in Emacs

On Reddit, there was a recent thread called “Your dependency on external packages reduce with experience”. I have been using zoom-window in the past to temporarily “unsplit” buffers. So this: ┌───┐╔════════════╗┌─────┐ │ │║ ║│ │ │ A │║ C ║│ B │ │ │║... | Continue reading


@christiantietze.de | 1 year ago

Wiki and Website Updates

I’ve added a couple of “hidden pages” to the website: Edward Yourdon: Structured Design (1979) Related wiki page: Cohesion Wiki pages on MVC, MVVM, DRY Receive Christian’s new posts via email | Continue reading


@christiantietze.de | 1 year ago

10 Year Indieversary: AMA On Sep 6th

I realized that my officiel 10th “company” anniversary is just around the corner! To celebrate and hang out with people online, I’d like to party with all of you in a live chat and video. To round things up, I’m doing this Ask Me Anything style. No agenda from my part, but I’m op … | Continue reading


@christiantietze.de | 1 year ago

SwiftUI Isn't Easy to Get Into: My Road From Headache Towards Mastery

How long does it take to become a true SwiftUI master? How far am I on my own way to mastery? 🤔 Let’s quantify and have a wild guess! Point of Reference: Text Kit I start this introspective journey by looking at another topic I feel like I could become quite the expert, e … | Continue reading


@christiantietze.de | 1 year ago

Drawing Studies: Tonal Values

YouTube video of today's evening sketching This time I remembered to record our weekly sketch-together over Discord. Here’s a 4x speed version with narration of this evening’s sketches. The focus was on tonal values, so no colors, just pen and ink, then ink washes on watercolor p … | Continue reading


@christiantietze.de | 1 year ago

Rely on @Published Property Wrapper Events, Not the Observed Object

Pop quiz! What is the output of this program, e.g. when run in a playground or an autoclosure block? import Combine class ValueHolder { @Published var value: Int = 0 init() {} } let valueHolder = ValueHolder() let sub = valueHolder.$value.sink { value in print("received", v … | Continue reading


@christiantietze.de | 1 year ago

Schedule End of the Work Day Using Org

To get more structure into my day so I get work stuff done in time and have free time in the evenings to tackle other things, I’m now experimenting with notifications to end the work day. The following is a translated version of the current data. I am using the German term "Feier … | Continue reading


@christiantietze.de | 1 year ago

Output Port Adapter for Single Point of Configuration in Complex UI

When you have nested and complex UI components with multiple sub-view controllers, passing an optional output port (event handler or delegate) down the tree is cumbersome. There are two straight-forward approaches: Sub-components use the output port directly: When you inject th … | Continue reading


@christiantietze.de | 1 year ago

Emacs Blogging: Insert Tag from YAML Frontmatter Posts

My blog posts here usually have a line like: tags: [ swift, xcode, codesigning ] For tags I don’t use a lot, I sometimes don’t remember how to write them. So I do the only sane thing – and go to my website’s list of tags and look for a match. Got annoyed by that now after a coup … | Continue reading


@christiantietze.de | 1 year ago

What's the Problem with Old but Excellent Mac Apps?

Tyler Hall wrote about "Half-Assed Mac Apps " the other day. His argument goes like this: Catalyst made it easy to deploy iPad apps to the Mac. But iPad apps don't make the best experience on Mac. Users ... | Continue reading


@christiantietze.de | 2 years ago

Funding Open Source Software as a Third Party?

In a Discord chat, we've recently talked about how well funding for Blender turned out (https://fund.blender.org/). At the time of writing, they get $137k per month for development. I cannot say if that's ... | Continue reading


@christiantietze.de | 3 years ago

Atkinson Hyperlegible Font May Be Pretty Good If Your Granny Can't See Well

My grandmother approves of Atkinson Hyperlegible free font for her phone book printout | Continue reading


@christiantietze.de | 3 years ago

Emacs Settings for PHP Development

The project that I've been working on over the weekend, I worked on in emacs. This is part of my re-learning the basics of text editing and programming in emacs to slowly move away from TextMate when it ... | Continue reading


@christiantietze.de | 4 years ago

Fira Code 2 Released

My favorite monospace programming font, Fira Code, was updated to v2. (https://github.com/tonsky/FiraCode/releases/tag/2) This is even supposed to solve an issue (https://github.com/tonsky/FiraCode/issues/459) ... | Continue reading


@christiantietze.de | 4 years ago

With DevMate Closing Shop, Here's What You Can Do

Don't panic. DevMate's components can be replaced, one by one. Here's a breakdown of it all. | Continue reading


@christiantietze.de | 4 years ago

Being Afraid to Change a Working App

Today I work on The Archive. The focus is on an issue brought up by the community (https://forum.zettelkasten.de/discussion/541/bug-v1-2-x-note-list-doesnt-update-on-external-change). ... | Continue reading


@christiantietze.de | 5 years ago