In this new series, we will be learning how we can use Test Driven Development on a networking based iOS project app, and in this case, we will fetch random character from `rickandmortyapi` and display it to the screen! Refactoring is actually changing the implementation without changing the behavior. In this video, we can achieve … Continue reading #3 Part 3 – iOS – TDD – Random Character App – The Power of Tests on During Refactoring
#5 Swift – TDD + Nearest Palindromic
Hi everyone, this is my very first video in 2023 and this video is about how we can use Test Driven Development to solve Nearest Palindromic algorithm Problem! We can use TDD to solve very small unit of logic, then we can keep refactor our code so that it can works in integration. #testdrivendevelopment #nearestpalindromic … Continue reading #5 Swift – TDD + Nearest Palindromic
Test Double : Spy
In the previous article, we've already talk about Test Double in general. In this article, we will talk about one of test double, called Spy. Testing a component can be helped with another collaborator component with predefined behavior and collecting information. This is called spying. 💡 Spies are stubs that also record some information based on how they were … Continue reading Test Double : Spy
Cleaning AppDelegate or SceneDelegate Using ViewControllerFactory
Factory Design Pattern Illustration Overview AppDelegate or SceneDelegate is the main file that we as iOS developers know to configure, inject, or instantiate a global instance or frameworks. This place become essential, especially because it is actually the starting point of our app. Because it knows so many things, like configuring the frameworks, handling push … Continue reading Cleaning AppDelegate or SceneDelegate Using ViewControllerFactory
Compose Your UseCases to Create New Functionality using Composite Reuse Principle
On the previous article, we already learn about how to create a UseCase. In this article, we are going to learn how we can composes use case and create new one that has different functionality, using Composite Reuse Principle. Let's visit the previous article example. The previous example, we have a LoadTransactionsUseCase protocol to get a general picture … Continue reading Compose Your UseCases to Create New Functionality using Composite Reuse Principle
Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }
What is compactMapValues { $0 } ? compactMapValues {} can be really helps when we are dealing with optional values inside a dictionary. Readability is also important, especially amongs the developers. compactMapValues is one of the great language feature of Swift. "Returns a new dictionary containing only the key-value pairs that have non-nil values as the … Continue reading Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }
Converting Use Case Specs into Code (Part 2)
💡Your Code tell the what the app can do Photo by Oskar Yildiz on Unsplash Last article, we already learn how to create a use case specs. In this article, we will learn how to convert a use case specs to the code. I will bring the previous use case specs below : Load Transactions … Continue reading Converting Use Case Specs into Code (Part 2)
Clean Code Series — Method
Take Care of Your Code! Simple. Clean. Introduction Methods can be very useful in programming. They are making our code looks better, if we use it the right way. But some programmers don’t really pay attention to method (the clean way). They just keep doing a lot of stuff in one method. In this article, I … Continue reading Clean Code Series — Method