← JPMorgan Chase Interview Insights

JPMorgan Chase·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

JP Morgan software engineer interview with a code review exercise. One question, pretty focused on spotting multiple classes of bugs in a pull request. Not a typical LeetCode session, which I wasn't expecting.

Questions Asked (1)

Q1

You're given a pull request to review. Find and explain code quality and correctness issues across these areas: hard-coded values that should be config, Single Responsibility Principle violations, concurrency bugs, and inappropriate use of global or shared mutable state. For each issue, propose a concrete fix.

Technical Trade-offsSystem DesignRoot Cause Analysis
Author's notes

This was broader than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by scanning the PR for the four specified issue categories, then for each issue explain the risk it introduces and propose a concrete, minimal fix. Prioritize issues by severity (e.g., concurrency bugs first) and tie your feedback to maintainability, correctness, and production safety.

Pro tip: Frame each issue as a question or suggestion rather than a blunt criticism, and always offer a specific alternative—this shows collaboration and deep technical judgment, which is highly valued in code review at JP Morgan.

1. Scan for hard-coded values

Identify literals like URLs, timeouts, credentials, or magic numbers that should be externalized. Explain the risk of environment-specific failures and propose moving them to config files or environment variables.

2. Check Single Responsibility Principle

Look for classes or methods doing multiple unrelated things (e.g., parsing, business logic, and I/O). Suggest splitting them into focused components with clear interfaces.

3. Analyze concurrency and shared state

Inspect for race conditions, unsynchronized access to shared mutable state, and inappropriate use of globals. Propose thread-safe alternatives like immutability, local variables, or proper locking.

4. Propose concrete fixes and prioritize

For each issue, give a specific code-level fix and rank by severity. Emphasize correctness and production impact over style preferences.

Key Points to Mention

  • Hard-coded values: use configuration management (e.g., Spring @Value, environment variables) and avoid magic numbers.
  • SRP violations: extract separate classes for parsing, validation, and persistence; use dependency injection.
  • Concurrency bugs: identify race conditions, use synchronized blocks or java.util.concurrent utilities, and prefer immutable objects.
  • Global mutable state: replace with dependency injection or thread-local storage; avoid static mutable fields.
  • Testing and observability: suggest adding unit tests for concurrency and config-driven behavior.
  • Trade-offs: acknowledge that some fixes may add complexity, but justify them with long-term maintainability and safety.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.