arifinfrds-blog
arifinfrds-blog
Arifin Firdaus
60 posts
Software Engineer 🧑‍💻
Don't wanna be here? Send us removal request.
arifinfrds-blog · 16 days ago
Text
Maintaining fast unit test feedback is crucial as an app and team grow over time. Without proper modularization, unit testing can become painfully slow. By structuring code into independent modules and utilizing macOS-based testing strategies, we can drastically improve test execution speed. This results in faster development, quicker bug fixes, and a smoother engineering experience. If you’re working on a growing iOS project, now is the time to start modularizing. Not only will it save you time today, but it will keep your project maintainable and efficient as your team and codebase scale. Start with one module, test the benefits, and see the difference! 🚀
Tumblr media
View On WordPress
0 notes
arifinfrds-blog · 3 months ago
Text
The Dependency Inversion Principle (DIP) is a fundamental concept in software development that helps create flexible and maintainable code. In this article, I'll explore its history, the problem of tight coupling, and different approaches to applying DIP in Swift.
0 notes
arifinfrds-blog · 4 months ago
Text
Understanding the Liskov Substitution Principle (LSP) in Swift
In this article, we'll explore how Liskov Subtitution Principle (LSP) works in Swift with practical examples, including a mock implementation for testing and a real implementation that loads data remotely. We will also discuss common pitfalls and best practices for ensuring LSP compliance in your Swift applications.
The Liskov Substitution Principle (LSP) is one of the five SOLID principles of object-oriented design. It states that: “Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program.” (Paraphrased from Barbara Liskov’s) Barbara Liskov, a pioneering computer scientist, introduced this principle in 1987 as part of her research on data…
0 notes
arifinfrds-blog · 4 months ago
Text
Open/Closed Principle (OCP) in Swift using Decorator Pattern
The Open/Closed Principle (OCP) is one of the fundamental principles of object-oriented design, forming part of the SOLID principles. The concept is simple: “Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.” This principle encourages building systems where new functionality can be added without altering existing code. This leads to more maintainable, scalable, and robust software. In this article, we will explore the Open/Closed Principle and how to apply it in Swift through examples, focusing on the Decorator Pattern to extend behavior without modifying the original code.
SOLID: Open Close Principle Overview The Open/Closed Principle (OCP) is one of the fundamental principles of object-oriented design, forming part of the SOLID principles. The concept is simple: “Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.” This principle encourages building systems where new functionality can be added without…
0 notes
arifinfrds-blog · 4 months ago
Text
SOLID : Single Responsibility Principle (SRP)
The Single Responsibility Principle (SRP) is one of the SOLID principles in software design. Checkout the SRP explained in this articl
What is SRP? The Single Responsibility Principle (SRP) is one of the SOLID principles in software design. It states that a component should have only one reason to change. In other words, a class, struct, or any components, should have a single purpose and should not be modified for multiple reasons. Consider the following Swift struct: struct RemotePhrase: Decodable { let chinese: String let…
0 notes
arifinfrds-blog · 5 months ago
Text
Clean Architecture: A Blueprint for Scalable and Maintainable Software
Clean Architecture is a design approach for building flexible, maintainable, and testable apps by keeping concerns separate and well-defined. Let's deep dive in in this article!
Clean Architecture is a software design philosophy that helps developers build flexible, maintainable, testable, and scalable applications. It emphasizes separation of concerns, ensuring that different parts of the application have clear responsibilities and do not mix unrelated logic. Think of it like designing a beautiful city with a well-planned infrastructure—roads, districts, utilities, and…
0 notes
arifinfrds-blog · 6 months ago
Text
Simplifying Logic with Swift: From if-else to switch Pattern Matching
Switch pattern matching improves readability by replacing if-else statements with clear logic. Check this article if you’re interested in refactoring with switch patterns!
When working with conditional logic in Swift, you often encounter scenarios that require checking multiple conditions. Traditionally, developers rely on if-else statements for such tasks. However, Swift’s powerful switch statement with pattern matching offers a cleaner and more elegant way to handle these situations. In this article, we’ll demonstrate how to transition from a…
0 notes
arifinfrds-blog · 6 months ago
Text
Detecting and Fixing UI Hangs in iOS Applications
1 note · View note
arifinfrds-blog · 6 months ago
Text
Understanding the Decorator Pattern in Swift: A Practical Example
Overview Design patterns are a cornerstone of software development, providing reusable solutions to common problems. The Decorator Pattern is a structural design pattern that allows you to dynamically add new behavior to objects without altering their structure. It follows the Open/Closed Principle, which states that a class should be open for extension but closed for modification. In this…
0 notes
arifinfrds-blog · 2 years ago
Text
WordPress Scheduled Post: "#4 Part 4.1- iOS - TDD - Random Character App - Swift - Enable the Power of TDD to Refactor MVVM to State based MVVM"
Sometimes we want to manage State in ViewModel easier. Instead of having multiple observed properties, we can have single state property that is observed by the View. We will learn how to safely refactor our ViewModel using TDD using State based MVVM.
Sometimes we want to manage State in ViewModel easier. Instead of having multiple observed properties, we can have single state property that is observed by the View. In this video, we will learn how to safely refactor our ViewModel using TDD using State based ViewModel variation. Let’s dive in into the second part of 4th video, State base MVVM with TDD! #testdrivendevelopment #tdd #tddios…
Tumblr media
View On WordPress
0 notes
arifinfrds-blog · 2 years ago
Text
4 Part 4 - iOS - TDD - Random Character App - MVVM ViewModel
In this video, we will learn how we can build our ViewModel component using Test Driven Development approach! Let's dive in into the 4th part, MVVM with TDD!
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! In this video, we will learn how we can build our ViewModel component using Test Driven Development approach! Let’s dive in into the 4th part, MVVM with…
youtube
View On WordPress
0 notes
arifinfrds-blog · 2 years ago
Text
#3 Part 3 - iOS - TDD - Random Character App - The Power of Tests on During Refactoring
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 that by doing it with the tests. Let’s dive in into the third…
youtube
View On WordPress
0 notes
arifinfrds-blog · 2 years ago
Text
#2 Part 2 - iOS - TDD - Random Character App - TDD Networking with Moya (Continue)
Let's dive in into the 2nd part, the Test Drive Networking layer. We will learn to test our networking decoding logic in the unit level, with TDD so we can completely cover the JSON parsing scenario! #testdrivendevelopment #iosdevelopment #arifinfrds
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! Let’s dive in into the second part, the Test Drive Networking layer. We will learn on how to test our networking decoding logic in the unit level, using TDD so that we can…
youtube
View On WordPress
0 notes
arifinfrds-blog · 2 years ago
Text
#1 Part 1 iOS - TDD - Random Character App - Project Setup and TDD Networking
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!
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! Let’s dive in into the first part, the Project Setup and some error handling TDD Networking. We will learn on how to setup simple base project for Test Driven Development and…
youtube
View On WordPress
0 notes
arifinfrds-blog · 2 years ago
Text
#9 Swift - TDD + Find Pivot Index
This time, let’s solve another Leetcode problem, Find Pivot Index, using Test Driven Development! In this video, I will show you how we can solve this problem starting from O(n^2) to more optimize O(n) time complexity, using Test Driven Development as our main development strategy. GitHub repository https://github.com/arifinfrds/ LeetCode:…
youtube
View On WordPress
1 note · View note
arifinfrds-blog · 2 years ago
Photo
Tumblr media
Leetcode - Find Pivot Index #findpivotindex #tdd #testdrivendevelopment #swiftprogramming #dsa #datastructuresandalgorithms #arifinfrds #leetcode #leetcodesolution #programmer #softwaredeveloper #softwareengineering https://www.instagram.com/p/CqHeFgev7_T/?igshid=NGJjMDIxMWI=
0 notes
arifinfrds-blog · 2 years ago
Photo
Tumblr media
Leetcode - Find Pivot Index #findpivotindex #tdd #testdrivendevelopment #swiftprogramming #dsa #datastructuresandalgorithms #arifinfrds #leetcode #leetcodesolution #programmer #softwaredeveloper #softwareengineer https://www.instagram.com/p/CqHd-60PfPX/?igshid=NGJjMDIxMWI=
0 notes