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

📚 Interview question

How would you find the parts of a large codebase where code smells actually cost the team the most?

Junior Theory Beginner

🎯 Key points

  • Change frequency from git log per file
  • Complexity from code metrics or cognitive complexity
  • Hotspot = high change rate x high complexity
  • Cross-check with defect data, duplication and architecture violations
  • Weigh against the roadmap: cold code a planned feature will touch moves up
  • Fix hotspots first; log cold-code smells as debt instead of ignoring them

⏱ 30-second answer

Combine change frequency from git history with complexity. Count commits per file (git log --name-only), and measure complexity with code metrics or SonarQube cognitive complexity. Files that are both frequently changed and complex are hotspots; they are where smells slow delivery and cause defects. Tools such as CodeScene automate this, but a spreadsheet of the top 20 files works. Cross-check with the bug tracker and add other debt signals such as duplicated blocks and architecture rule violations. Then weigh it against the roadmap: cold code that a planned feature will soon touch moves up the list, while cold code nobody plans to change can wait in the debt register rather than be ignored for ever.

🔍 What the interviewer is checking

Checks that they can measure hotspots instead of guessing

↩ Usually asked after

More in Code Smells

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me