Will

@will-lumley.bsky.social

Mainly a senior iOS engineer, but love to dabble in web development and robotics/embedded-systems in my spare time. Father to four amazing children, and husband to a beautiful wife. Checkout my stuff: https://lumley.io http://github.com/will-lumley/

what should not be a hot take at all: if you still think of Swift enums as "a list of named constants", you're leaving a lot on the table 👀 associated values, exhaustive switch statements, error modelling - new blog post covers all of it lumley.io/blogs/swift-... #Swift #iOSDev #programming

Enums. Swift's Secret Superpower.

Enums Are Swift’s Secret Superpower If you’ve come from a language like Java, C#, or even Objective-C, you might think you know what an enum is. A list of named constants. An integer with a pretty lab...

lumley.io

Last week ago I saw someone use e14n instead of enshittification and thought it was the funniest thing ever, a way to somehow make the term even shittier.

My old garage remote died, so instead of replacing it I turned the whole thing into a HomeKit-powered smart garage opener using an ESP32, a relay, and about $20 of parts. It’s fast, fully local (no cloud), and way more fun than buying a new remote. How I built it 👇 lumley.io/blogs/smart-...

How I Turned My Broken Garage Remote Into a HomeKit Garage Door for Under $22

A few weeks ago, my garage remote died. Completely. No LED, no click, no signs of life even after replacing the battery. Normally, this would be annoying enough, but my house relies heavily on HomeKit...

lumley.io

let's express gratitude to the amazing people who selflessly shared their priceless wisdom with us: @danielchooper.bsky.social, Jinkai, @useyourloaf.com, Tjeerd in 't Veen, @jacobstechtavern.com, Bruno Valente Pimentel, Alfonso Tarallo, @massicotte.org and @will-lumley.bsky.social

Fatbobman (东坡肘子)@fatbobman.com · 10mo ago

Fatbobman’s Swift Weekly #0107 is out! A Trip to the Apple Store for Repairs 🔥 Hot Reloading SwiftUI Apps 🔍 Mobile Testing Strategies 🤖 Automate with Swift Subprocess 🎢 AsyncCombine and more... weekly.fatbobman.com/p/fatbobman...

🚀 New blog post! AsyncCombine: Because Async Code Shouldn’t Be Ugly I brought back Combine’s sink, assign, and CombineLatest - but built powered by Swift Concurrency. Observing @Observable from another ViewModel shouldn’t be painful. Here’s how I fixed it 👉 lumley.io/blogs/async-...

AsyncCombine: Because Async Code Shouldn’t Be Ugly

When Swift first introduced Combine, I loved it. The syntax was expressive, pipelines were easy to follow, and @Published made state changes feel almost magical. But as Apple pushed us toward Swift Co...

lumley.io

With #swiftlang It's easy to forget that the diff between a point-free and pointed styles of function argument passing is not just syntactic but semantic. It's normal to consider these to be equivalent: 1. [1, 2].map(String.init) 2. [1, 2].map { String($0) } But we shouldn't forget that: 1/4

A problematic little #swiftlang pattern I often see is "unwrap-then-nullify" for optional values that hold some temp state. This oft comes up when dealing with local caches or scrollOffsets or in-flight tasks, etc. Forgetting to nullify a value to "reset" state is a common mistake. Use take method.

Hypothetically, imagine not knowing Swift Testing doesn't have a built-in timeout function, and then writing a bad unit test and pushing it, going to sleep, and then waking up and finding out you've used all your Github Action minutes for the month. On this second day of the month. Hypothetically.

Currently working on a Swift project that uses Combine, and because it the year of our lord 2024 I'm using Swift Testing to write my unit tests. But I was struggling with covering my Combine code with Swift Testing. Here's how I managed to solve the problem! lumley.io/blogs/swift-... #iOS #swift

How to Write Unit Tests for Combine Publishers in Swift Testing

Unit testing Combine publishers can feel like you’re wrestling with a slippery eel: asynchronous, stateful, and a bit chaotic if not handled correctly. But fear not! Today, I’ll walk you through how t...

lumley.io