The Magic of the Text Editor Cursor: You Always Type Out of Range

2025-03-01
The Magic of the Text Editor Cursor: You Always Type Out of Range

Have you ever wondered why, in a text editor, the cursor always seems to sit at the end of a word, allowing you to add characters seamlessly? This is actually a clever illusion. This article explores the subtle relationship between cursor position and string ranges in text editors, using the metaphor of a 'rake and its prongs' to explain why you always type 'out of range'. It also provides an improved `NSRange` extension for more accurate handling of cursor insertion points.

Read more
Development

Xcode 16's Local Package Dependency Nightmare: Why I'm Using Two Editors

2025-01-23
Xcode 16's Local Package Dependency Nightmare: Why I'm Using Two Editors

Developer Christian Tietze encountered significant issues with Xcode 16 while working on a Swift Package. Xcode 16's altered approach to local package referencing broke file operations, test running, and more. To overcome this, he's forced to use both Xcode (for compiling and running the app) and Emacs (for editing and testing the package). The post laments Xcode 16's buggy update, Apple's aggressive software upgrade policy, and recommends developers learn a backup editor.

Read more
Development