• 2024-08-13
How to unlock code flexibility applying S.O.L.I.D. Open-Closed Principle?

The Open-Closed Principle (OCP) represents the letter "O" in S.O.L.I.D. It teaches us to create software that is open to extension but closed to change, enhancing its maintainability and scalability. To be honest, the OCP is one of the most challenging S.O.L.I.D. principles to understand and apply in iOS projects.…

  • 2024-04-15
When is Single Responsibility Principle helping us write better code?

How many responsibilities should a class have? As many as it needs! This is a common joke, but the reality often is far less amusing... How often do we encounter… “challenging” code annotated with "Do not change!!!" comments? Software development isn't rocket science. There are a few basic rules that most…

  • 2023-11-10
Why mobile apps need a good abstraction?

Imagine you’ve just implemented a nice feature. Cleanly separated UI from business logic, added some unit tests, etc. Surely, code review would be a formality. Instead, this insufferable Senior Dev requested that you wrap one of the services with abstraction. Surely, you’ve read somewhere that you should operate on abstractions…

  • 2023-06-09
How to test UIKit & SwiftUI views? Explained with memes.

The benefits of having an exhaustive automated tests suite are obvious to anyone who ever worked on an app for more than a few months. We’ve all seen what lack of code maintenance might do: duplication, hidden side effects, convoluted business logic. A project codebase is like a garden -…

  • 2023-04-10
How to implement universal networking module in Swift (pt.1)

What’s the first service you usually implement in an app? It’s either networking or storage, right? And when it comes to networking, what are your choices? Most people either operate on URLSession directly, leveraging its multiple APIs, or add a 3rd party library like Alamofire.  But there is also a…

  • 2023-03-21
Why should you KISS your SwiftUI views? Explained with memes

If you've been a software developer for a while, you've likely heard about the Keep it Simple, Stupid (KISS) design principle. It suggests that our systems should be implemented in the simplest way possible across all application layers: persistence, services, business logic, and the UI. For all non-user facing app…

  • 2023-02-11
How to implement app analytics the right way

Picture this: You're finishing up an iOS app, and there's only one feature left to implement - the analytics. The client's marketing team has chosen a reputable framework that should be straightforward to integrate. They've even supplied a document detailing which user actions require tracking. It could take a day…