Khaled Elfakharany
Back to Work
contract

Senior macOS Developer

MainSail Holding LLC
Feb 2022 - Mar 2023 (13 months)
Remote
Team of 2
Overview

Khaled was brought in through Toptal to maintain and update NavStation MacENCx64, a marine navigation application originally written in the 1990s. The codebase presented unique challenges requiring expertise in C, Objective-C, Swift, and Python bridging. The CEO had personally acquired the company after the original software was discontinued because he used it on his private yacht. Khaled navigated severe legacy code constraints while implementing new features and keeping the application functional.

Why I Joined

Opportunity through Toptal to work on a uniquely challenging legacy codebase with complex multi-language requirements

Responsibilities
  • Performed archaeological code analysis on a 30-year-old codebase to understand undocumented functionality before making modifications
  • Fixed bugs and revived dormant features in legacy C code that had not been properly maintained since the 1990s
  • Implemented new features using Swift while maintaining compatibility with existing Objective-C bridging layers
  • Updated chart logs, dependency trees, and third-party libraries without breaking decades-old functionality
  • Bridged Python libraries into the macOS application to extend functionality without rewriting core components
  • Refactored Objective-C bridging code to enable modern Swift development within the legacy architecture
  • Managed the complex interoperability between C, Objective-C, Swift, and Python in a single application
Key Achievements
  • Successfully maintained a 30+ year old codebase that most developers would consider unmaintainable, keeping it functional for ongoing commercial use
  • Implemented C-to-Objective-C-to-Swift bridging patterns that enabled new feature development without destabilizing the legacy core
  • Integrated Python libraries into the macOS application, extending functionality while preserving the original architecture
  • Updated dependency trees and libraries across a multi-decade codebase without introducing breaking changes

Technology Stack

Primary Technologies
CObjective-CSwiftmacOS
Secondary Technologies
PythonXcodeInterface Builder
Infrastructure
macOS native frameworksApp Store Connect
Tools
GitXcode InstrumentsLLDB Debugger
Methodologies
Legacy Code MaintenanceIncremental ModernizationCode Archaeology
The Story

Situation

MainSail Holding LLC owned NavStation MacENCx64, a marine navigation application originally built in the 1990s. The CEO had personally acquired the company because he used this software on his yacht and loved it. However, the codebase had not been properly maintained for decades, creating severe technical debt and weekly challenges to keep it functional.

Task

Khaled was engaged through Toptal to maintain this legacy application, fix bugs, implement new features, and update dependencies while keeping the application stable for commercial users.

Action

Khaled approached the codebase like an archaeologist, carefully documenting undocumented functionality before making changes. He established bridging patterns between C, Objective-C, and Swift to enable modern development. He integrated Python libraries for extended functionality and methodically updated dependencies without breaking the delicate legacy architecture. Each week brought new technical puzzles requiring creative solutions.

Result

Over 13 months, Khaled kept the application functional and commercially viable. He successfully modernized portions of the codebase with Swift while maintaining the legacy C core. The application continued serving its user base of maritime enthusiasts and professionals.

Team Structure

Size: 2 people

Structure: Direct contractor relationship with company owner

Reported to: CEO (company owner)

0
Skills Developed

Skills Gained

Legacy Code ArchaeologyMulti-Language BridgingPython-macOS Integration

Skills Deepened

C ProgrammingObjective-CSwiftmacOS Development
Key Learnings
  • 💡How to navigate and modify severely outdated codebases without breaking existing functionality
  • 💡Techniques for bridging between four different programming languages in a single application
  • 💡The importance of understanding historical context when working with legacy systems