📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

๐Ÿ“š Interview question

How do you run a technical debt register on a .NET team? What goes in each entry, how do you use cost of delay to prioritise the items, and how do you make the case to a product owner who only sees features?

Covers what a technical debt register is, the fields each entry needs (impact, interest, effort, owner), prioritising with cost of delay and WSJF, capacity models for paying debt down, and framing debt in business terms for product owners.

Mid-Level Theory Intermediate agile code-quality engineering-practice prioritisation stakeholder-management technical-debt

๐ŸŽฏ Key points

  • Register = backlog of known debt with impact, interest, effort, owner and evidence, not a wiki of complaints
  • Interest: the ongoing cost (slower delivery, incidents, on-call hours) the debt charges each sprint
  • Prioritise by cost of delay divided by effort (WSJF), and by where change happens (hotspots)
  • Evidence from delivery metrics: lead time, change-failure rate (DORA), incident count, hours lost
  • Pay down via a fixed capacity slice (e.g. 15-20%) and by fixing debt in the area you're already changing
  • Speak business: risk, delivery speed, cost, compliance; never 'the code is ugly'
  • Review the register monthly with the product owner, not just engineers; close items that no longer charge interest
  • Debt that blocks a roadmap feature goes into that feature's estimate

โฑ 30-second answer

A technical debt register is a prioritised backlog of known debt, where every entry records what it is, the interest it charges, the effort to fix, an owner and the evidence: lead time in that area, incident counts, hours lost.

  • Interest is the ongoing cost: extra days on every change in that area, incidents, on-call hours, audit risk.
  • I prioritise with cost of delay divided by effort (WSJF), focusing on debt in hotspots we change often. Debt in code nobody touches can wait.
  • I make the case to product owners in business terms, backed by that evidence: "Every pricing change takes five extra days and caused two incidents this quarter; three sprints of work removes that."
  • Paying down: a fixed capacity slice (15โ€“20%) plus fixing debt in areas we're already changing.

The trade-off: not all debt is worth paying. Track it, measure its interest, and pay the expensive debt first.

๐Ÿ—ฃ Full answer (senior)

How I would answer this in an interview

"I run a technical debt register as a real backlog, not a complaints page. Each entry has a short description, where it lives, the interest it's charging (the ongoing cost, like 'every change to tax rules takes three extra days' or 'caused two Sev-2 incidents this quarter'), an effort estimate to fix, a risk rating and an owner. Usually that's a work item type or a tag in Azure DevOps or Jira, so debt competes on the same board as features rather than living in a separate document nobody opens.

To prioritise, I use cost of delay: what does it cost us per sprint to leave this alone? Then I divide by effort, which is basically WSJF. That naturally pushes debt in hotspots, the files we change every sprint, to the top, and leaves ugly code that nobody touches at the bottom, because it isn't charging interest. I back entries with evidence: lead time for changes in that area, incident counts, change-failure rate, hours lost on on-call. Git history is useful here: a file with high churn and high complexity is where debt hurts most.

With product owners, I never say 'the code is messy'. I say 'adding a new payment provider currently takes about six weeks because the gateway code is tangled; after this work it's about two, and we have three providers on the roadmap'. I propose a standing capacity slice, often 15 to 20 percent, for the top register items, and I fold debt that blocks a roadmap feature into that feature's estimate. The mistake I see is treating debt as a moral issue and asking for a 'refactoring sprint'. Debt is a financial decision: pay off the expensive loans first."


What goes in a register entry

Field Example
Title Pricing rules hard-coded across OrderService and QuoteService
Location Orders.Application/Pricing/*
Interest +3 days per pricing change; 2 incidents in Q3 from inconsistent rules
Effort ~8 days (extract a PricingPolicy, add characterisation tests)
Risk if ignored Wrong prices charged; ACCC consumer law exposure
Owner / status [name], Ready
Evidence Lead time chart, incident links

Prioritising with cost of delay

Item Cost of delay (per sprint) Effort (days) Score (CoD รท effort) Order
Pricing duplication 6 dev-days + incident risk 8 High 1
Old EF Core 6 project 1 dev-day; out of support 5 Medium 2
Ugly report module, untouched for 2 years ~0 15 Low Park

Ways to pay debt down

Model When it fits Watch out for
Capacity slice (15โ€“20%) Steady, ongoing debt Slice quietly taken back for features
Boy Scout rule (fix as you go) Small debt in code you're already changing Scope creep in feature PRs
Debt in the feature estimate Debt blocks a roadmap item Honest estimates, not padding
Dedicated project Large, high-risk debt (framework upgrade) Needs a business case and milestones

Production example

On an invoicing system, the register showed that the tax-rule module was involved in 40% of production incidents over six months and added about three days to every rule change. We put a business case to the product owner using those numbers, spent two sprints at 30% capacity extracting and testing it, and incidents in that area dropped from five per quarter to one, while rule changes went from a week to about two days.

๐Ÿ” What the interviewer is checking

Checks whether the candidate treats technical debt as a managed, evidence-based trade-off and can communicate it to non-engineers.

Green flags

  • Describes register fields including interest and evidence
  • Prioritises by cost of delay and hotspots, not aesthetics
  • Translates debt into business impact for product owners
  • Has a realistic paydown model (capacity slice, fix as you go)

Red flags

  • "We need a rewrite" as the default answer
  • Debt tracked only in people's heads or TODO comments
  • Can't explain why one debt item matters more than another

๐Ÿ“š Learn in depth

1. The debt metaphor, properly

Ward Cunningham's metaphor: shipping code that doesn't match your current understanding is like borrowing. The principal is the effort to fix it; the interest is the extra effort every future change costs. Martin Fowler's quadrant adds intent:

              Reckless                 Prudent
Deliberate   "No time for design"      "Ship now, refactor after launch"
Inadvertent  "What's layering?"        "Now we know how it should have been"

Prudent, deliberate debt is a valid business choice, as long as it's recorded and repaid.

2. Why interest matters more than principal

Debt in code that never changes charges no interest. Debt in a module touched every sprint charges it continuously. So prioritise by where change happens.

3. Finding hotspots from history

Combine change frequency with complexity (Adam Tornhill's approach, tools like CodeScene):

git log --since=12.months --name-only --pretty=format: -- '*.cs' \
  | sort | uniq -c | sort -rn | head -20

Cross that list with cyclomatic complexity (Visual Studio code metrics or SonarQube). High churn plus high complexity is the debt that hurts.

4. Cost of delay and WSJF

Cost of delay (Don Reinertsen) is the value lost per unit of time by not doing something. Weighted Shortest Job First ranks work by cost of delay divided by duration, which lets debt and features compete on one scale.

5. Evidence a product owner accepts

Metric Source
Lead time for changes in an area Azure DevOps / Jira cycle time by component
Change-failure rate Deployments vs rollbacks or hotfixes (DORA)
Incidents linked to a module Incident tracker, post-incident reviews
On-call hours PagerDuty / Opsgenie
Support status Microsoft lifecycle (e.g. .NET 8 LTS support ends November 2026)

6. Keeping the register healthy

Review monthly with the tech lead and product owner. Close items that no longer charge interest (the module was deleted). Merge duplicates. Link items to ADR consequences that accepted the debt in the first place.

Try it yourself

  1. Run the git log hotspot command on your repo and pick the top three files.
  2. Write register entries for them, with interest expressed in days or incidents.
  3. Score them with cost of delay divided by effort and compare with your gut ranking.
  4. Check which of your projects target an out-of-support .NET version.
  5. Draft a three-sentence business case for the top item, without the words 'clean' or 'messy'.

๐Ÿ’ป Code

A typical register item, before and after: pricing rules duplicated in two services, then extracted into one tested policy.

// Before: the same discount rule copied into two services. Every change must be made twice;
// in Q3 they drifted and quotes disagreed with invoices.
namespace Orders.Application;

public sealed class QuoteService
{
    public decimal Price(Order order) =>
        order.Lines.Sum(l => l.Net) * (order.Customer.IsWholesale ? 0.85m : 1.0m);
}

public sealed class InvoiceService
{
    public decimal Price(Order order) =>
        order.Lines.Sum(l => l.Net) * (order.Customer.IsWholesale ? 0.88m : 1.0m); // drifted
}
// After: one policy, one test suite, injected where needed.
namespace Orders.Application.Pricing;

public interface IPricingPolicy
{
    decimal Price(Order order);
}

public sealed class PricingPolicy : IPricingPolicy
{
    private const decimal WholesaleRate = 0.85m;

    public decimal Price(Order order)
    {
        var net = order.Lines.Sum(l => l.Net);
        return order.Customer.IsWholesale ? net * WholesaleRate : net;
    }
}

public sealed class QuoteService(IPricingPolicy pricing)
{
    public decimal Price(Order order) => pricing.Price(order);
}

public sealed class InvoiceService(IPricingPolicy pricing)
{
    public decimal Price(Order order) => pricing.Price(order);
}

// Program.cs
// builder.Services.AddSingleton<IPricingPolicy, PricingPolicy>();

The register entry as a work item:

{
  "type": "Tech Debt",
  "title": "Pricing rules duplicated in QuoteService and InvoiceService",
  "interest": "+3 dev-days per pricing change; 2 incidents in Q3",
  "effortDays": 8,
  "risk": "High - customers charged a different price from the quote",
  "owner": "[name]"
}

โš  Common mistakes

  • Mistake: Keeping the register in a wiki page separate from the backlog. Why it is wrong: Debt never competes with features and gets forgotten. Instead: Make debt a work item type on the same board, with the same prioritisation.
  • Mistake: Prioritising by how ugly the code is. Why it is wrong: Ugly code nobody touches charges no interest. Instead: Prioritise by cost of delay, weighted towards hotspots with high churn.
  • Mistake: Arguing in engineering terms ("it's not SOLID"). Why it is wrong: Product owners can't weigh it against features. Instead: Translate to delivery time, incidents, risk and cost.
  • Mistake: Asking for a big 'refactoring sprint'. Why it is wrong: It's hard to justify, often gets cancelled, and the debt grows back. Instead: Use a steady capacity slice plus fixing debt as you change code.
  • Mistake: Entries with no evidence. Why it is wrong: They read as opinion and get deprioritised. Instead: Attach lead-time data, incident links or support end dates.
  • Mistake: Never closing items. Why it is wrong: The register becomes a graveyard and loses credibility. Instead: Review monthly and close what no longer matters.

๐Ÿ› Senior insight: trade-offs

Technical debt is a portfolio decision, not a cleanliness score. The senior skill is choosing which debt to carry deliberately, recording it (often as the consequences of an ADR), and paying it down where interest is highest. Senior engineers also protect the capacity slice: when it's quietly reallocated to features for three sprints in a row, that's a conversation with the product owner, backed by the numbers.

Two things make the register work long term. First, stakeholders own it with engineering: the product owner attends the monthly review, sees the interest figures next to feature value, and helps rank items, so debt work isn't something engineers sneak in. Continuous delivery helps here, because small, frequent, flagged releases let debt be paid in slices alongside features instead of in risky big-bang projects, and DORA metrics show whether it worked. Second, seniors coach the team: I show juniors how to write an entry with evidence instead of a complaint, how to spot a hotspot in git history, and when the Boy Scout rule is enough, so debt identification doesn't depend on one person.

Option When it fits Cost When not to
Carry the debt Low interest, code rarely changes Nothing now It's in a hotspot or a security risk
Fix as you go Small, local debt Slightly larger PRs Large structural debt
Capacity slice Steady stream of medium debt 15โ€“20% of sprint Team is in a hard launch window
Funded project Framework upgrade, out-of-support runtime Weeks; needs a case Benefits can't be measured

Measure it: lead time and incident counts per area before and after, so the next business case comes with a track record.

๐Ÿ”— Follow-ups the interviewer may ask

  1. When: Candidate talks about getting time from stakeholders to pay down debt. Why: Checks the senior, behavioural side: influencing stakeholders and handling pushback.
    How to answer

    Technical debt is the future cost of a shortcut, and the interest is the extra effort or risk it adds every time we work near it. I make it visible in a debt register with each item's impact, how often we pay its interest (change frequency, incidents, delays) and a rough cost to fix. I prioritise by interest, not by how ugly the code is: debt in a hotspot that slows every feature beats a messy module nobody touches. I get time by explaining it in business terms (lead time, incident risk, cost), by reserving a steady share of capacity, and by pairing debt fixes with features that touch the same area.

  2. When: Candidate mentions logging smells found in review as technical debt. Why: Checks how they decide in a code review what to fix now and what to register.
    How to answer

    I'd read it for risk first, style last. Ranked:

    1. Correctness/security: an email sent before SaveChangesAsync (customer told they're signed up when the save can fail), and personal information (email, date of birth) logged and exported unmasked, a Privacy Act issue.
    2. Wrong data: loyalty points calculated with duplicated, slightly different logic in two methods.
    3. Design smells: god class (four responsibilities), long method, primitive obsession (string email, Guid IDs), feature envy on Customer, dead code.

    My rule: block on anything the PR introduces or touches that is a correctness or privacy risk; suggest small fixes in lines the PR changes; log as debt pre-existing structural smells with a ticket that says what they cost. The trade-off is merging safe code today without turning one PR into a rewrite.

๐Ÿ›  Real-world problems: how you handle them

Tax-rule module behind most invoicing incidents
Situation
An invoicing platform for [number] Australian business customers on .NET [version] and Azure SQL. The tax-rule module had grown through years of quick fixes, and every BAS season brought rule changes.
Signals
Rule changes estimated at a week each; [number] Sev-2 incidents in six months traced to the module; developers avoiding tickets in that area; the product owner frustrated that 'simple' tax changes were slow.
Investigation
Linked incidents to files through post-incident reviews; ran a git churn analysis and SonarQube complexity report, which put the tax module at the top of both; pulled cycle time for tax-related work items from Azure DevOps.
Resolution
Wrote a register entry with the evidence and a business case: two sprints at 30% capacity to add characterisation tests and extract rules into a tested policy class. Did it in small PRs behind a feature flag, comparing old and new results in production before switching.
Prevention
Added the module to a hotspot dashboard reviewed monthly; agreed a standing 15% debt slice; added an architecture test preventing tax logic outside the policy.

How to tell it (STAR)

**S:** At [company], our tax-rule module was behind most invoicing incidents and every rule change took about a week. **T:** I needed the product owner to fund fixing it, competing with roadmap features. **A:** I gathered evidence: incidents linked to the module, git churn and complexity, and cycle time for tax work. I put it in the debt register with interest in days and incidents, and pitched it as faster BAS-season changes and fewer billing errors. We did it in small, flagged PRs and compared outputs in production before switching. **R:** Incidents in that area dropped from [number] to [number] a quarter, and rule changes went from about a week to [number] days.

โ†ฉ Usually asked after

More in Engineering Practice

Last updated 23 Nov 2026.

๐ŸŒ Sangam's Webring

โช Previous ๐Ÿ  Main Next โฉ
๐Ÿ’ฌ Chat with me