Loose coupling and the law of Demeter

When you’re designing a new component for your codebase, you will usually only think of the component itself, and the objects that it interacts with directly. If you’re designing a component that authenticates a user, you will typically only consider objects directly related to the authentication flow. You’ll take into Read more…

Sequencing tasks with DispatchGroup

When you’re building apps, there are times when you need to perform certain tasks before executing the next task. Imagine a scenario where you need to make a couple of API calls to a webserver to retrieve information before you can begin processing the information that’s fetched by all preceding Read more…

Breaking an app up into modules

As apps grow larger and larger, their complexity tends to increase too. And quite often, the problems you’re solving become more specific and niche over time as well. If you’re working on an app like this, it’s likely that at some point, you will notice that there are parts of Read more…

Responsibly crashing your apps

As developers, we are often told that we should avoid crashing our apps at all costs. It’s why we are told that we shouldn’t force unwrap our optionals, that we should avoid unowned references and that we should never use try! in production code. In today’s article, I would like Read more…