Legacy code refactoring for award-winning product stability

The Promise of Virtual Try-On Technology
The Promise of Virtual Try-On Technology

Context

Kingschat, an award-winning communication platform, faced a lot of legacy code issues that were impacting product stability and user experience. At the beginning of 2024, we have launched a recovery plan targeting specific pain points.

Problem Identification and Consequences

The main issues identified in the recovery plan involved critical components like CI/CD pipeline failures, inconsistent codebases, and outdated Objective-C code slowing down development and causing functional inconsistencies. These challenges were leading to a sluggish and error-prone deployment process, impeding the platform's ability to introduce new features effectively and maintain its market-leading position.

Solution Implementation

  1. Refining CI/CD Processes:
    • We took charge of overhauling the CI/CD pipeline to ensure smooth operation. We managed to fix the process of making cuts, tagging, generating changelogs, setting versions, and creating release branches has been streamlined. This overhaul reduced manual release time significantly, improving from an unpredictable 30 minutes to two days, to just a few minutes.
  2. Code Consistency and Modernization:
    • We eliminated most unused code, outdated projects, and duplicated classes, paving the way for the introduction of new functionalities using the latest technologies without causing further complications.
  3. Standardizing Development Practices on iOS:
    • We established a standard for describing pull requests and commits. We also standardized the versions of tools used by the team.
  4. Transition from Objective-C to Swift:
    • New functionalities were developed in Swift, and several smaller classes were transitioned from Objective-C, modernizing the codebase and facilitating easier maintenance and updates.

Business and Product Gains

These focused improvements have substantially enhanced the platform's stability and development velocity in six months. Here are some specific achievements:

  • Increased Development Responsiveness: The iOS team now releases updates bi-weekly, each including significant user value, balancing client requirements with gradual legacy code phase-out. This regularity marks a stark improvement from the previous quarterly release schedule.
  • Improved Product Stability: The crash-free rate significantly improved from 65-70% to over 92.52%, with the latest updates fixing major crash issues, reflecting a dramatic enhancement in application stability.
  • Quality of Code and Architecture: Continuous refactoring and bug fixes have cleaned up the code repository, making it more organized and manageable. This proactive approach has reduced technical debt, allowing the team to focus on innovative and value-adding features.
  • Award-Winning Product Development: The efforts of the team were recognized with Web Excellence Awards for KingsPay and KingsConference in 2024, showcasing not only technical prowess but also exceptional design and implementation.

These advancements have not only elevated the technical standards of Kingchat but have also positively impacted business metrics, contributing to a more stable, robust, and innovative product.