Question 1
Large-scale refactor strategy
You inherit a large, messy codebase that’s slowing the team down. How do you approach refactoring it without halting feature development?
Answer outline
Start with the highest-pain areas — slow iteration, crash-prone code, tangled dependencies, hard-to-test flows. Establish baselines first so you can judge whether the refactor is working.
Work incrementally alongside feature development rather than pausing the roadmap. The best time to improve an area is when the team is already touching it.
The goal is clearer boundaries and better testability, not a full rewrite. Leave each area better than you found it — reduce risk, clarify ownership, and improve incrementally.
Principles
- Start with high-pain, high-leverage areas — not aesthetics or code style.
- Refactor incrementally alongside features — never pause the roadmap for a big-bang rewrite.
- Avoid full rewrites — long timelines, lost context, and the same problems often resurface.
- Create boundaries first — separate networking, persistence, and view model concerns before cleaning internals.
- Measure before and after so the refactor has a clear definition of done.