Newsletter Form Fixed
I fixed the newsletter signup form. If you found the button to previously not do anything, now it will work.
I fixed the newsletter signup form. If you found the button to previously not do anything, now it will work.
Here is a transaction type to copy & paste into projects to encapsulates thread-safe read/write access: Just make sure to not use the main queue, because .sync
call from main to main will deadlock your app! It ensures you read values synchronously, which isn’t dangerous, and enqueue and execute write operations in order. This is useful if you need to access any resource from multiple threads and want to avoid the overhead of mutex locks.
When you look at the docs for String.index(_:offsetBy:limitedBy:)
, you get this description: Returns an index that is the specified distance from the given index, unless that distance is beyond a given limiting index.
I recently dropped blog posts rendered via MultiMarkdown. I used MMD to support citations, but this is not a book, this is a website! So I retired my MultiMarkdown processor for nanoc, the static site generator that I use. If you need something like it for your project, here it is:
I stumbled upon an interesting coding problem in a recent macOS project related to in-app purchases. IAP can be represented by a feature option set in code. How do you secure UserDefaults
access in such a way that accessing values can be locked via the IAP available feature options? (This also applies to tiered licenses, like a “Basic” and a “Pro” feature set.)
This is how I made dark NSButton
with the NSButton.BezelStyle.recessed
display legible light text on dark background with macOS Mojave an up. Recently, a user of The Archive pointed out that the in-app guide doesn’t display properly with a light system appearance. In dark mode, you wouldn’t notice the problem, but in light mode, the button colors rendered them illegible. Only when you press a button does its text light up properly for its background color. Have a look:
I often forget the name of this thing, then I search for it, and forget it again later. It’s the Whole Value Pattern. The “Whole Value” pattern means you should get rid of using primitive or literal data types as quickly as possible. (Since Swift has no non-object primitives, you have to look a bit harder to spot these, but “literal value” is a pretty good indicator.)
Joe Fabsevich (@mergesort) proposes to call data to configure UI elements “View Data” and keep the objects dumb. From part 1: In my experience, things become harder to maintain when they start becoming a crutch, as a place to put your code if it doesn’t neatly fall into the Model, View, or Controller label.
Oskar Groth published a modern iteration of the “LetsMove” framework where you can show a dialog at app launch, asking the user if she wants to move the app to /Applications
first.
This is still a crucial feature if you distribute downloads that unpack into the ~/Downloads
folder: Gatekeeper’s App Translocation will actually start it from a random sandboxed folder. To prevent this from happening, distribute your apps as a DMG with a shortcut to /Applications
to nudge your users to move the app there directly.
Get https://github.com/OskarGroth/AppMover on GitHub.
See also:
This is not a pun on the U.S. president. Going through stuff from the past year, I just noticed how much more amazing daily life feels with a community. In the past 2 years, I helped found two communities: Without the local group of Urban Sketchers, I wouldn’t have progressed with my watercolor skills; and without the forums, there wouldn’t be a lot of places to hang out to talk about what I find most interesting about personal knowledge management: creating new insights!