Matias Ergo Pro keyboard: long term review
Matias Ergo Pro keyboard: long term review
🍿 First Man: genuinely terrifying
Such a good read - no surprise there, the atmosphere & worlds he creates are utterly compelling, and there are a lot of ideas for our time bubbling close to the surface - but I was also totally gripped by the physicality of the writing. “Fantasy adventure in a boat” for people who’d never usually pick that genre. Philip Pullman - The Book of Dust.
hey Preview.app you’re drunk (sys prefs/keyboard/shortcuts/app shortcuts to change these and stop the twitching)
some great decals in Nassau but this guy’s is the best 🇧🇸👏
I have thoughts.
in the Bahamas, phone conversations always start with “hello, how are you? everything is well?” rather than a name or a reason for the call, which means you can be way into exchanging info about digestive health before either one of you realizes it’s a wrong number
My go-to Swift snippet over the last week. Super useful to pull dictionaries out of flat JSON structs, by passing in an array of keys and values as tuples:
let dict = Dictionary.init(uniqueKeysWithValues: someStruct.map {
($0.propertyOneAsKey, $0.propertyTwoAsValue)
})
A close second: the mapValues
method on dictionaries in all sorts of contexts, including removing keys with nil values. compactMapValues
will be introduced in Swift 5, but in the meantime this is readable:
let cleaned = filter { $0.value != nil }.mapValues { $0! }
This is a nice circuit for a quick cardio hit with resistance and the plank variations are no joke. I did the intermediate level with two 15lb dumbbells and was in a puddle by the end. 💪
If, like me, roughly 80% of your day is spent preparing toast and/or hot beverages, here are two things which will change your life and which I cannot believe it took me 39 years to discover:
Updated AccessControlKitty to handle variables inlined inside other variables, and starting the year off right by fixing a classic off-by-one error (XCSourceTextBuffer
is a half open range folks. Says it right there in 👏 the 👏 docs 👏 .)
Reminder: when debugging an Xcode sourcekit extension, change up the plugin bundle identifier if you’ve already installed a “finished” version of the app on the same mac, otherwise the plugin will fail to attach (more tips here)
I’m updating Steadfast for the new Series 4 watch complications:
I have travelled so, so much this autumn, which has been awesome obviously, but has now left me at the point where I can be found lovingly stroking my home washing machine with sheer gratitude. I have lately been entirely a consumer of food, rather than a provider. Some standouts:
Hiking at altitude and road trips have kinda stalled my squat progress 😅. Cannot wait to get back in the gym and start working again, but in the meantime I’ve been doing lots of ROMWOD after dinner, weights and bands at home when I can, and abs inspired by Queen Whitney. (Fitspo instas get a lot of flak, but her stuff is, as advertised, hot fire flames 🔥).
A mostly maintenance week in code – to be honest, I’m waiting for WWDC to see which of my app ideas might get sherlocked, before committing too much time into a new project. In the meantime, I’ve been doing things like:
ObjectIdentifier
type was totally new to me: Identifying objects in Swift — Swift by SundellIf you are ever faced with a jar of nut butter to use up, or like me, you fear you might go through the whole thing standing in front of the fridge with a spoon, you now know what to do: Ottolenghi’s tahini cookies in grams or in cups — I’ve made them with tahini, almond and cashew butters, and they are delicious whatever. You can also sub a little espresso powder or cocoa for flour if you like. I cook them for a bit longer than suggested though - 25 minutes until nicely browned.
Two recommendations and two self-plugs this week:
If you need to generate automatic wallpapers for test phones and watches, this article and utility from _David Smith will show you how Generating Testing Device Wallpapers - David Smith, Independent iOS Developer But if you just need to get some random text on a watch or iOS device, you could download my free app Steadfast. It’s super simple - it just lets you put a text phrase on a complication, including the extra large face, but it’s live updating so you don’t need to do the Share -> Watch Face dance. I use it for a sort of personal mantra — it can be quite nice for my tiny monkey brain to have that gentle reminder to keep a long-term goal in mind. But you could equally use it to display “Testing v2.4.3.45.345” or whatevs. There’s also a Swift easter egg 🦄💖.
I have been loving Swift Talk’s series on building a settings form library. And when I say loving, I mean following along in code, extending it and then having to take long adoring coffee breaks where I stare at the framework api thinking how beautiful it is 🤓. In the middle of all the refactoring I’ve been using my Xcode source code extension AccessControlKitty, which takes a selection of Swift code and changes the access level. So, for example, you could make a class public, including all its methods and variables, with one menu command (or keystroke). It’s pretty handy 😽.
Not much coding this week because I was in NYC for the week, going from three hours on a freezing building site in overcoat, hat and scarf on Monday, to Wednesday’s clothing-optional pavement melter. Packing difficulty level: extreme.
UIViewController
👏 does 👏 not 👏 need 👏 to 👏 fill 👏 the 👏 screen, and many more important reminders: Dave DeLong - A Better MVC - YouTubeEvery metadata or userInfo property is a compromise between correctness, completeness, and flexibility — an escape hatch for unthinkable use cases; a concession to one’s own hubris.
I wanted write a little Xcode extension that could change the access level of a selection – for example, make an internal class and all its properties and functions public just with a keystroke. I thought it would be handy for extracting code into separate modules. I sort of forgot that now I need to write a lexer and a parser and a syntax tree and, well, it’s a whole thing. Fun though.
Codable
.Shoutout to Mike Ash’s mini protocol for checking whether the type you’re dealing with is an optional with a nil value. Handy for generic functions when you’re not sure whether you’ve been passed a straight value, or a value wrapped in an optional:
private protocol OptionalP {
var isNil: Bool { get }
}
extension Optional: OptionalP {
var isNil: Bool { return self == nil }
}
switch aValueOfSomeType {
case let anOptional = aValueOfSomeType as? OptionalP where anOptional.isNil:
// ladies and gentlemen, this value is wrapped in an Optional and is nil
…
This protocol is from his implementation of type safe user defaults, worth checking out in itself, obviously.
I wake up about 45 minutes too early so I’ve started using @Headspace most mornings: it’s a hack to not wake my husband making coffee, and I add to a streak. (I worry it’s not meditation if you pass out, but a nice bloke tells me to just note the worry and move on…)
Pretty sure this will be my last iPad for a while. It’s always in a logitech keyboard case (I’m a 🦕 and need shortcuts), and the only app that isn’t genuinely a worse implementation of Mac/web is Zara’s shopping app. Which I should quit anyway (see 🦕).
Today’s swift & coffee: Ben Scheirman - quick thoughts on quality code, coordinators and mvC - really like the idea of extending the responder chain to get app events up and through “wrapper” VCs that shouldn’t have anything to do with the data in question. ☕️👩💻
Spent most of the morning trying to deploy a Hugo site on github with Wercker. Should have just thrown my wallet at squarespace. 🤦♀️