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.

MediumTechnical
0 practiced
During a production incident you find a refactor introduced a silent regression that was not covered by tests. Walk through the incident response and post-incident review steps you would take, focusing on code-level fixes, test improvements, deployment rollbacks, and actions to reduce similar regressions in the future.
HardTechnical
0 practiced
Design a decorator/wrapper in Java or Python that instruments an existing function to emit timing and error metrics without changing callers. Explain your API, how you'd ensure low overhead, and how you'd write tests that validate telemetry correctness and minimal performance regression.
MediumSystem Design
0 practiced
Design a backward-compatible migration plan for a legacy service exposing a REST API used by many internal clients. Requirements: support 100k RPS, multiple client versions, zero major downtime, and a 6-month deprecation window. Describe code-level adapters, versioning strategy, deployment plan, and testing approach.
EasyTechnical
0 practiced
What is Interface Segregation Principle (ISP) and how would you apply it to a long-lived SRE agent that exposes a single large RPC interface used by many teams? Propose how to split interfaces and the migration approach to minimize client breaks.
EasyTechnical
0 practiced
You manage a backlog of technical debt across multiple low-priority SRE services and have limited engineering time. Describe a framework to prioritize which technical debt to address first, including measurable criteria and how to present the trade-offs to product and platform stakeholders.

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.