Roleplay Scenario
Scenario Overview
Your team is about to release a major feature, but the codebase is getting complex and harder to manage. You need to decide whether to focus on refactoring some parts of the code to make future work easier or to push the feature out now to meet market needs. The aim is to find a solution that works for both immediate and long-term goals without sacrificing quality or team morale.
Roles & Setup
Role A – Lead Engineer (You)
You’re noticing that the technical debt is starting to impact development speed.
Your goal: Push for some key refactoring that aligns with the release schedule.
Role B – Product Manager
You’re eager to get the new feature out but also care about the sustainability of the codebase.
Your goal: Find a compromise that meets both business and technical needs.
Role C – Junior Engineer (Optional)
You’re working with the current code and feeling the pain of its complexity.
Your goal: Share insights on the day-to-day challenges and support the decision-making process.
Suggested Openers
Lead Engineer:
- “I’ve noticed our codebase is getting a bit messy. Can we brainstorm how to address this before it snowballs?”
- “Before we push this release, I think it’s worth discussing some refactoring to make sure we’re not setting ourselves up for trouble later.”
Product Manager:
- “I’m open to discussing this. Let’s figure out a way to refactor without pushing back our release too much.”
- “I see where you’re coming from with the tech debt. Let’s find a way to tackle it without losing our momentum.”
Sample Roleplay in Action
Lead Engineer:
“I’ve been diving into our code lately, and it’s clear that if we don’t do some refactoring, it’s going to bite us later. I think we should focus on the API layer first since it’s pretty central to everything else.”
Product Manager:
“I get it. We’re definitely feeling the pressure to release, but I don’t want to ignore technical debt either. Can you break down what needs fixing right away and how it might affect our timeline?”
Lead Engineer:
“Sure thing. The big issue is the dependency management in our API. Fixing it could prevent future headaches and really smooth out upcoming projects. It might take us an extra week, but it’ll pay off down the road.”
Product Manager:
“That sounds reasonable. How about we tackle the API refactor now and shelve the other tasks for later? I can explain this plan to the stakeholders and why it’s smart.”
Junior Engineer (Optional):
“I’ve been running into some issues with the current setup, so refactoring would definitely help. I’m ready to jump in and tackle the high-priority parts.”
Lead Engineer:
“Great, let’s draft a plan. We’ll list out the refactoring tasks, adjust our timeline, and make sure everyone’s on the same page.”
Product Manager:
“Sounds good. I’ll handle the stakeholder communication and make sure everyone knows why we’re making these changes. Let’s stay aligned on how this impacts our future plans.”
Post-Scenario Tools
Curveball Mode (Optional)
Introduce one of these scenarios mid-roleplay to test adaptability:
- A stakeholder demands a quick explanation for any delays and insists on understanding the refactoring benefits.
- A critical bug related to the proposed refactoring area surfaces, needing immediate attention.
- The junior engineer discovers a small optimization that can be done quickly, offering some immediate relief.
Reflection Checklist
As the Lead Engineer:
- Did you clearly communicate the long-term benefits of refactoring?
- Did you involve the team in the decision-making process?
- Did you ensure a balance between immediate needs and future sustainability?
As the Product Manager:
- Did you weigh both business and technical perspectives?
- Did you facilitate a constructive dialogue and remain open to compromise?
- Did you prepare to communicate changes effectively to stakeholders?
Common Mistakes to Avoid
- Focusing solely on technical debt without considering business timelines.
- Overcommitting to refactoring and causing significant project delays.
- Making decisions in isolation without team input.
Pro Tip
Balancing refactoring with feature delivery is a key leadership skill. Engage your team, communicate transparently, and focus on shared goals to navigate these challenges successfully.