99 posts tagged ‘Programming’
Coding Font Selection Tournament
Jason Snell: Leo Laporte pointed me to the very clever site Coding Font, which lets you step through a tournament-style bracket of monospace fonts to find the one you like the best. Unfortunately it’s lacking a bunch of the options mentioned above, but if you’ve ever been curious about switching up your terminal font, it’s […]
Swift Parameterized Testing
Keith Harrison: Swift Testing calls the test function once for each value in the arguments collection. […] If you pass a second argument, Swift Testing generates test cases for all combinations of the two arguments. […] You’re limited to at most two arguments. If you don’t need every combination you can zip the arguments to […]
op run
Mattt Thompson (tweet): This core insight — that configuration should be separate from code — led to the widespread adoption of .env files.[…]You add this file to .gitignore to keep it out of version control, and load these variables into your environment at runtime with a tool or library.[…]op lets you manage 1Password from the […]
Scott Knaster Occasionally Misses Expectations
Scott Knaster: I worked in Silicon Valley for many years with brilliant people at amazing companies that changed the world. A lot of my stories are about those people and places. But some of them are about something unexpected I saw on a walk around my neighborhood. Stuff like that.I tell stories face to face, […]
Swift Concurrency in Real Apps
Bryan Jones: Consider this code, wherein we create a custom NSTableColumn that uses an image instead of a String as its header. Holly Borla posted a fix that special-cases NSObject.init(): Now, overriding NSObject.init() within a @MainActor-isolated type is difficult-to-impossible, especially if you need to call an initializer from an intermediate superclass that is also @MainActor-isolated. […]
Swift Prospective Vision: Accessors
John McCall (forum): However, this approach has significant problems. The biggest is that the get accessor has to return an independent value. If the accessor is just returning a value stored in memory, which is very common for data structures, this means the value has to be copied.[…]This vision document lays out the design space […]
SwiftUWhy
John Siracusa: Welcome to my new series on things I don’t understand about Apple’s premier user interface framework.[…]To be clear, these are things I don’t understand, not necessarily things that are “wrong.” They sure look wrong (or at least “suboptimal”) to me! But maybe there are good reasons, and I just don’t know them yet. […]
Issues Adopting Swift Testing
I’m in the process of migrating from XCTest to Swift Testing. The basic stuff is pretty easy to translate, and in many cases I don’t even need to change the code inside my test methods. I’ve long been writing what Swift Testing calls expectations in terms of my own helper functions such as eq(), unwrap(), […]