Bottom-up unit testing

Unit tests promise the developers to allow refactoring, which is changing the implementation without modifying the behaviour of the code. Unfortunately, this often turns out to be the false promise in complex enough systems. The article will help you structure the tests to regain this benefit.…

How to approach TDD for the 1st time?

TDD is not an easy concept to begin with. Even though writing a unit-test is a rather obvious task, many developers restrain themselves from trying to build a new feature in a test-first approach. The article shows how to start doing TDD on a real-life usage scenario.…

Imperative shell, functional core

Imperative shell, functional core is one of the concepts that influenced my programming career the most. It perfectly formulates how to write clean, easily testable code and always keeps you wondering whether you did enough to extract the functional pieces. During my preparations for the Mobile Warsaw #62 talk I…

Practical functional programming in Swift

Recently, I came across a couple of real-world examples that illustrate functional programming usage in Swift. All those examples have a single thing in common - they have been initially written in an imperative manner, which made them harder to read and extend. The article provides an in-depth description of…

UIView providers for Swift unit testing

As you might already know, I deliberately chose not to use storyboards for my Swift code. Instead, I build all of the views programmatically and inject them through initializers into suitable controllers. Although this approach works really nice, it has drawbacks when it comes to unit testing. Imagine having a…