PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/J.P. Morgan

Review concurrent code quality

Last updated: Apr 6, 2026

Quick Overview

This question evaluates skills in concurrent programming, code review judgment, and software design by focusing on misuse of volatile, thread-safety with shared mutable state, Single Responsibility Principle violations, and hard-coded configuration.

  • medium
  • J.P. Morgan
  • Software Engineering Fundamentals
  • Software Engineer

Review concurrent code quality

Company: J.P. Morgan

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

You are given a short code snippet during a pull-request review and asked to identify engineering issues and suggest improvements. The review focuses on the following topics: - incorrect or unnecessary use of `volatile` - thread-safety problems with shared mutable state - violations of the Single Responsibility Principle - hard-coded constants or configuration values in the code Explain what is wrong, why it is risky in production, and how you would refactor the code to make it safer, cleaner, and easier to maintain.

Quick Answer: This question evaluates skills in concurrent programming, code review judgment, and software design by focusing on misuse of volatile, thread-safety with shared mutable state, Single Responsibility Principle violations, and hard-coded configuration.

Related Interview Questions

  • Review a PR for thread-safe request handling - J.P. Morgan (medium)
  • Compute expected value of simple gambling games - J.P. Morgan (easy)
  • Explain C++ virtual dispatch and object lifetime - J.P. Morgan (medium)
J.P. Morgan logo
J.P. Morgan
Jan 29, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
2
0
Loading...

You are given a short code snippet during a pull-request review and asked to identify engineering issues and suggest improvements. The review focuses on the following topics:

  • incorrect or unnecessary use of volatile
  • thread-safety problems with shared mutable state
  • violations of the Single Responsibility Principle
  • hard-coded constants or configuration values in the code

Explain what is wrong, why it is risky in production, and how you would refactor the code to make it safer, cleaner, and easier to maintain.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More J.P. Morgan•More Software Engineer•J.P. Morgan Software Engineer•J.P. Morgan Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.