InterviewStack.io LogoInterviewStack.io

Maintainability and Legacy Code Questions

Covers strategies and principles for evolving codebases safely and keeping them easy to understand and change over time. Topics include design principles such as Single Responsibility, Open Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion, removing duplication, establishing appropriate abstraction boundaries, separation of concerns, identifying and remediating code smells, incremental refactoring approaches, regression risk mitigation via tests and feature toggles, backward compatibility and migration strategies, and prioritizing technical debt reduction. Interviewers assess the candidate ability to plan pragmatic refactors, minimize risk during change, and improve long term health of a codebase.

HardSystem Design
64 practiced
Design a safe migration path to change the canonical ID format used across services and databases from integer to UUID. Cover dual-write strategies, ID mapping storage, API compatibility, indexing and performance concerns, external integrations, rollbacks, and how you'd verify end-to-end integrity.
HardTechnical
62 practiced
Design a staged migration approach to move backend services from Ruby to Go to improve performance and maintainability. Include how you ensure interoperability between old and new services, data consistency, deployment strategy, teams' ramp-up, and how you cut over without downtime.
EasyTechnical
87 practiced
Define "technical debt" in language suitable for non-technical stakeholders. List three measurable indicators you would use to quantify technical debt in a codebase, how you would collect those metrics (tools/process), and one way to convert those indicators into business impact.
MediumTechnical
131 practiced
Design a zero-downtime schema migration to add a new required column to a heavily-written production relational table. Cover steps such as schema change strategy, backfill plan, code changes to read/write both representations, feature flags, throttling, and rollback considerations.
HardSystem Design
64 practiced
Design a robust rollback strategy for a deployment that includes database schema changes and API behavior changes. The strategy must ensure data integrity, prevent data loss, and support safe re-deploys. Describe pre-deploy safeguards, migration phases, verification checks, and automated rollback triggers.

Unlock Full Question Bank

Get access to hundreds of Maintainability and Legacy Code interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.