InterviewStack.io LogoInterviewStack.io

Code Review and Working with Existing Codebases Questions

Reviewing others' code and navigating unfamiliar systems: giving and receiving actionable review feedback, spotting correctness and design issues, and reading and understanding large or legacy codebases before changing them. Covers collaborative coding norms, incremental change in shared repositories, and verifying changes against existing behavior. The team-facing side of day-to-day engineering.

EasyTechnical
67 practiced

Given this pandas snippet, walk through each line as you would to a junior data scientist and explain inputs, outputs, and intent:

python
df = df.drop_duplicates(subset=['user_id', 'event_date'])
df['event_date'] = pd.to_datetime(df['event_date'])
df = df[df['event_date'] >= '2023-01-01']

Explain potential pitfalls and one unit test to add.

MediumTechnical
65 practiced

You are reviewing a pull request that normalizes features with a manual loop. The diff shows a Python function that scales each column in a loop instead of vectorized operations. Provide constructive review comments focusing on performance, readability, edge cases, and test suggestions. Include a concrete code suggestion or alternative approach.

EasyTechnical
85 practiced

Describe your approach to code reviews in ML repositories where changes can affect reproducibility, experiment logs, and model artifacts. How do you structure a review checklist to catch issues that could cause silent model drift or irreproducible experiments?

MediumTechnical
61 practiced

Design a peer-review rubric for ETL or transformation pull requests that balances velocity and reliability. List 6-8 rubric items (for example, tests, readability, performance considerations) and explain how each item should be scored and enforced in the review process.

That is every published Code Review and Working with Existing Codebases question for Applied Scientist so far. Browse the other topics in this category, or practice this one interactively.