Migrating Legacy Code: Lessons from David Stein’s Presentation at QCon AI New York 2025
David Stein, Principal AI Engineer at ServiceTitan, captivated attendees at the inaugural QCon AI New York 2025 with his presentation titled "Moving Mountains: Migrating Legacy Code in Weeks instead of Years." In a world where technological advancement often seems to come with the burden of legacy systems, Stein’s insights are both timely and essential.
The Challenge of Legacy Migration
Stein set the stage by likening large-scale migrations to the daunting task of moving mountains. Historically, these migrations have been lengthy processes, often taking quarters-of-a-year to years, accompanied by the inherent risks of rewriting vast amounts of code. While successful migrations can lead to profound benefits, the potential pitfalls demand careful navigation. Stein highlighted that many organizations face the dilemma of whether they are truly building what they need as they embark on these migrations.
A Case Study: ServiceTitan’s Internal Migration
At the heart of Stein’s presentation was an internal case study from ServiceTitan’s migration of legacy reporting datasets to a more modern metric platform built on DBT Labs MetricFlow. This impressive undertaking involved a reliance on production SQL databases and the handling of hundreds of metrics within a substantial monolithic application, characterized by extensive C# and complex SQL code. The timeline for such a comprehensive migration spanned quarters to years, showcasing the severity of the challenge.
Understanding the "False Summit"
One of the intriguing concepts introduced by Stein was the "false summit," a term that elucidates potential hazards in migration projects. These false summits can stall progress, leaving teams wondering if they are heading in the right direction. This often leads to a pause where developers question, "Are we truly building the right thing?"
The Principle of Acceleration
To tackle the complexities of migration, Stein introduced the Principle of Acceleration, which focuses on optimizing data flow for better performance. The presentation illustrated a shift from a traditional approach—which included decision points based on preliminary proof-of-concept evaluations—to a new method incorporating a validation step. This step employs a standardized set of tools to ensure readiness before the migration even begins.
Embracing the Assembly Line Pattern
Stein further explored the Assembly Line Pattern, a robust framework that facilitates the sequential and automated migration of applications. This pattern, widely recognized within Continuous Integration/Continuous Deployment (CI/CD) paradigms, comprises three essential steps:
- Decompose: Break down the "mountain" into manageable "pebbles."
- Standardize: Establish a "physics engine" for automated, instantaneous validation.
- Automate: Deploy agents that execute tasks with efficiency.
Streamlined Migration Process
Stein breakdown the migration process into five core tasks that ServiceTitan implemented: objective, plan, code, test, and release. Previously stretched over years, this framework has significantly accelerated migration timelines, allowing teams to successfully execute migrations within a matter of weeks.
Tackling Common Migration Challenges
Like any complex undertaking, migration projects come with their set of challenges. Stein outlined several common issues along with their corresponding solutions:
- Validation Logic Errors: If agents incorrectly perceive success, fixing the validation logic is crucial.
- Stalled Progress: When agents become stuck, adding context and subdividing tasks can help regain momentum.
- Incomplete Tasks: Engineers may need to intervene manually for tasks that prove too complex for automation.
- Changing Architectures: Sometimes, newfound architectural insights necessitate a complete rewrite of migration strategies, including goals and validations.
Agility in Architectural Changes
The shift to viewing migrations as manageable tasks rather than daunting mountains is nothing short of revolutionary. This newfound agility enables developers to ask innovative questions, such as:
- "Should we try platform X?"—With the answer being a resounding "Just do it and find out."
- "Is this new architecture actually better?"—Encouraging experimentation where teams can build both and compare.
- "Did we make the right call two years ago?"—Opening the door for re-migration to assess past decisions.
By demystifying and streamlining the migration process, Stein’s insights promise to reshape how organizations approach legacy code migration, paving the way for innovation and efficiency in software development.
Inspired by: Source



