Technical Debt Management and Refactoring Questions
Identifying, prioritizing, and paying down technical debt sustainably. Covers recognizing debt, making the case to invest in it, refactoring safely behind tests, and balancing debt reduction against feature velocity. Includes keeping a codebase maintainable over the long term.
How would you detect architecture-level technical debt, such as cyclic dependencies, inappropriate abstraction layers, or misplaced ownership, using static analysis and dependency graphs? Propose specific checks and tolerances (what counts as acceptable versus unacceptable), and explain which direction each of these signals moves in as debt worsens: developer velocity or cycle time, bug and incident rate, test coverage, cyclomatic complexity, build and deploy time, and mean time to recovery.
Explain technical debt using the principal-and-interest loan analogy, then distinguish intentional (strategic) debt from accidental (unintentional) debt. For each, give one concrete example of how it accumulates and name which stakeholder group typically introduces or first notices it.
Design a decision framework for when maintaining an obsolete internal library is no longer worth the effort of learning or continuing to update. Include a cost-benefit analysis, migration-effort estimates, a risk assessment covering incidents and security, the learning cost for engineers, and a phased deprecation strategy with rollback plans.
Write a Python function compute_debt_score(modules) that accepts a list of module metric dictionaries, for example {'module': 'auth', 'bug_rate': 2.3, 'test_coverage': 0.65, 'build_time_seconds': 420, 'cyclomatic_complexity': 12.5, 'incident_count': 3}, and returns a normalized score from 0 to 100 per module, where a higher score means more technical debt. Describe your normalization strategy and weight choices, and show a small example input with its expected output.
Describe concrete CI/CD practices and pipeline checks you would implement to prevent technical debt from accumulating in the first place. Give examples of tests, build-time checks, and deployment safety nets, and explain how you would balance feedback speed against reliability.
Unlock Full Question Bank
Get access to all 20 Technical Debt Management and Refactoring interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.