Sign in

Software Engineer — iOS @ Ruangguru

One of the most critical feature in Swift, Protocol :]

Photo by Med Badr Chemmaoui on Unsplash


Protocol and Protocol-Oriented programming are the important feature in Swift programming language. Imagine if we don’t have a protocol in Swift, we are facing many difficulties for building a scalable system. We can’t implement delegation pattern, we can’t make an abstraction, and our system is not easy to refactor and has a high vulnerability. So in this article, I want to have some a good refresh about protocol, how we can use it, and understanding how it actually work by knowing the difference between static dispatch and dynamic dispatch. …

Let’s back to basic, introducing Types & Mutation in Swift.

Photo by Henry Ascroft on Unsplash

Types in Swift

Type is group of properties and set of operations that we can perform on it. When we are try to create an app using Swift, we can use either Standard-Type or Custom-Type. Swift type system doing an activity called type checking where it will validate the properties and operations from type in order to make sure the app is behave correctly before we run the program. By doing type checking, we can perform some optimization to the compiler. …

Ah really? data structure again? well let me tell you about tree :]

Photo by Fabrice Villard on Unsplash

In the software engineering world, Tree is an important data structure and used in some cases:

  • Represent a hierarchical data relationship
  • Manage sorted data
  • Provide fast searching operation

Tree data structure has some variants depend on the problem that want to be solved. In this article, we will try to implement regular tree data structure using swift.


  • Node
    Similar to linked list, tree also made from several nodes. Node have properties like data and its children.
  • Parent and Child
    Tree data structure is top-down, represent a tree in…

Let’s rock another data structure in Swift. Queue!

Photo by Melanie Pongratz on Unsplash


Queue is an abstract data structure that represent queue in real world like the picture above. In computer science terminology, queue is FIFO (First in First out) which mean the first data that come in to the queue also will be the first data come out from the queue. You might need to use queue if you have to maintain the order of the data.

Basic Operations

First of all, let’s define basic protocol for queue here

There are two main operations in queue data structure which are enqueue and dequeue.

Another article about data structure in swift. Stack!

Photo by Iva Rajović on Unsplash


Stack is abstract data structure that have a similar representation with physical stack in a real world. You are recommended to use stack if you want to minimise access to the data. There are two main operation that stack used, which are push and pop. Push mean you add new data to top the stack and pop mean you remove the last data or the top of the stack. …

In this article, I want to give some recap from my learning about linked list data structure using Swift.

Photo by Nate Grant on Unsplash


A linked list basically is a collection of objects where each of them (usually called a node) has a reference to the next node. You can imagine a linked list like a chain. Here is the linked list representation:

Another article about clean architecture and using presenter as a business-logic handler in presentation layer.

Photo by Edho Pratama on Unsplash

Project Overview

I created simple application using Open Dota API as a data source. Feel free to visit my repository on github and just clone it. The project consist of several additional layer such as DI Container for managing dependencies, Router for handling navigation, and of course the network layer that support local cache using UserDefault. I used clean architecture approach for create separation layer between presentation, domain, and data. …

Testing core data? is it possible? let me tell you how to do it.

Photo by AltumCode on Unsplash

Testing is a crucial part in software development process. Testing has some useful benefits like get feedback quickly when developing app in the early phase, useful for other teammates when work together because it can act as a documentation, and save more time in the future for reducing production issue probabilities. In this article, I will try to introduce you how to implement unit testing for iOS project that using Core Data as a data persistence.

Configure Core Data Stack for Testing

Unit test must following FIRST principle:

  • F : Fast
    Fast mean…

VIP architecture basically consists of three main layers with unidirectional communication through each declared protocol.

Photo by David Grandmougin on Unsplash

Hi everyone, how it’s going today? I hope everything just going well for you guys and stay healthy in this current pandemic situation.
And yes it take a really long time to make me write an article again :] because I have pretty busy with my full time job right now as an iOS Engineer at one of education tech company in Indonesia. Sorry, just a little bit of show off.

So basically in this article, I want to write about how to build scalable…

Photo by Charles Deluvio on Unsplash

Hello everyone, how are you today? I hope everything goes well for you wherever you are. So basically I just learnt something new inUICollectionView on iOS 13. Have you ever seen the photo app on iPhone? It’s pretty complicated layout right?

We actually can build the complex layout such iPhone’s photo app using the old way UICollectionViewFlowLayout but in my opinion it will take a long time and need a bunch of codes. …

Tifo Audi Alif Putra

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store