Kyle Hughes

@kyle@mister.computer
1,049 Followers
644 Following
7.4K Posts

I am a polite software developer and I am always committed to the bit. I will be your favorite app maker’s favorite app maker.

I am enamored by user-facing software, especially mobile, and especially iOS. Swift is my current weapon of choice but I will use any made-up word to solve any problem. I ship my side projects for free.

I run this single-user Mastodon instance in good faith and I intend to keep it that way.

pronounshe/him/his
websitehttps://kylehugh.es
githubhttps://github.com/kylehughes
threadshttps://www.threads.net/@kyle_hughes
little dog big yard
The brain-tickling bit of Rank Things for me was this idea: can I represent a sorting algorithm in a navigation view such that you can go backwards in the stack and change your choice? With my stateful sorting algorithms, the answer is yes. Each screen owns the state of the algorithm at that point and is able to produce the next state of the algorithm based on the user selection. There are no loops, only structs deterministically producing other structs.
Officially all moved in. Nothing else to do. Everything is where it should be.

This screen is why I had Rank Things on the shelf for years. I wanted a way to communicate the “user experience” of each sorting algorithm, because it meaningfully affects the app. For example, Insertion Sort has you compare one thing to many other things in sequence. That can be boring, but it can also keep you in the flow.

I’m not sure that I nailed it, but it’s good enough for government work. Plus, it uses the same stateful sorting algorithm implementations to drive the animation.

I back up my Macs via Time Machine to my Synology. My Macs spend most of their time each day pegged to 800-1,200% CPU usage on diskimagesiod. Does this implicate Time Machine or my Synology setup?
Rank Things exists because of one key insight: ranking is sorting, and we have algorithms for sorting. It uses an innovative “stateful sorting algorithm” implementation to allow you to undo your decisions during the ranking process. It is not a simple tier-list maker—there is nothing else like it.
WTF
It doesn't get better than this, folks.

PersistentKeyValueKit remains unsherlocked and the most modern way to use UserDefaults & NSUbiquitousKeyValueStore for another year :)

I am personally a big fan of debug keys: mutable in DEBUG builds, immutable otherwise. Saves me a lot of `#if DEBUG` paths in my application code.

Does anyone remember what these were for?
×

PersistentKeyValueKit remains unsherlocked and the most modern way to use UserDefaults & NSUbiquitousKeyValueStore for another year :)

I am personally a big fan of debug keys: mutable in DEBUG builds, immutable otherwise. Saves me a lot of `#if DEBUG` paths in my application code.

It doesn't get better than this, folks.
@kyle Does it ‘no op’ out in release builds? E.g. constant-ises the value so that it has zero-runtime cost, or maybe even optimizes away branches?
@grork I thought I had it using autoclosures for that reason but it appears I don’t and I can’t remember why 🤔