Log inBook a Demo
Hiring
Intermediate

Back-End Engineer (Python): Refactor Legacy Module

Time available:45 minutes
|
Available in
+8
ByAnthropos
This simulation was archived and cannot be started
Your mission in this simulation
1
The challenge

You must collaborate with the original module author to modernize a critical, outdated Python component.

2
The issue

The legacy code is complex, poorly documented, and prone to errors, causing costly service disruptions and maintenance headaches.

★
Your goal

Your goal is to improve maintainability and clarity through safe, incremental refactoring—while earning your collaborator’s trust and approval.

Your Role

Senior Python Engineer@ Relay Technologies

You are a Senior Python Engineer at Relay Technologies, a fast-growing enterprise software provider.

Other participants

Mikaela LindströmSoftware Engineer, Module Author

Context

Relay Technologies is a rapidly expanding tech startup focused on delivering software solutions that streamline business operations for enterprise clients across industries like healthcare, logistics, and retail. The company’s flagship analytics platforms and workflow tools are known for improving efficiency, with features such as real-time shipment tracking and predictive analytics. Relay’s technical foundation relies on technologies like Flask, PostgreSQL, and Docker. However, a legacy Python module—central to critical services—has become increasingly difficult to maintain due to tightly coupled code, reliance on global variables, and minimal documentation. This technical debt has led to maintenance challenges, occasional service disruptions, and increased pressure to improve the module’s stability and maintainability without risking existing operations.

The legacy Python module is a bottleneck, with deeply nested logic, widespread use of global variables, and almost no inline documentation. These issues make updates risky and troubleshooting time-consuming. Recent incidents have caused service delays and financial penalties, highlighting the urgent need for targeted improvements. The original author of the module, who values stability and incremental change, is cautious about any modifications that could impact system behavior.

You step into the role of a Senior Python Engineer tasked with modernizing this legacy module. Your main collaborator is the module’s original author, who brings deep institutional knowledge but is protective of her design choices. Your mission unfolds in two phases: first, engage in a focused real-time chat to uncover critical use cases, dependencies, and pain points, and define a mutually acceptable scope for incremental refactoring. Next, use the shared code editor to propose and implement targeted improvements—such as breaking down large functions, clarifying variable names, and adding documentation—while preserving the module’s behavior. Throughout, you must address your collaborator’s concerns, justify your decisions, and incorporate her feedback to ensure both technical and collaborative success.

  • Collaborate with the module’s author through real-time chat to clarify requirements and agree on a safe refactor scope.
  • Edit the legacy Python module in the shared editor, focusing on maintainability improvements without altering functionality.
  • Respond to feedback and questions from your collaborator, ensuring all changes are reviewed and approved.
  • Demonstrate strong Python and technical problem-solving skills while building trust and maintaining a constructive dialogue.

Evaluated Skills

PythonTechnical Problem-Solving

Helpful for

Senior Python EngineerSoftware EngineerTechnical Lead