Ios posts

Mistakes as a self-taught developer

Admitting your mistakes is the first step to solving them. Explore the mistakes I made as a self-taught developer, and optimise your performance with strategies.

Prune nested Swift Package dependencies

Subtle tip for SPM projects: Only import the package libraries you need for each target to reduce final binary size and optimise build times.

Cleanly check if an Index is valid with Swift

Use generic extensions, modules and the Swift stdlib for efficient and reusable index checks. Also useful for library vendors looking to expose a minified API.

How to write a recursive Either enum with Swift

How to write a recursive Either enum with Swift written using generic associated values. Stretch the limits of a strict, statically typed and mostly imperative language!

Strategies for take-home coding tests

Coding ability improves through consistent and deliberate coding. The way to ace a coding test is to take care in details even when not being assessed.

Why you shouldn't be using print()

Explore the new Logger class for useful, privacy-friendly, scalable logging in Swift apps. Understand why Apple promotes unified logging over print for production apps.