IT Japanese · コードレビューで先輩からの指摘事項を受け止める

Receiving Feedback Constructively in a Code Review

A senior engineer points out several optimization opportunities in your pull request, including an N+1 query issue in a loop and variable naming. You listen attentively, express gratitude, and discuss the plan for adjustments.

Other (S)

Nguyen, I looked over the pull request for the order list API. I left a few comments, could you take a look?

Me

Thank you. I have checked the comments.

Other (S)

There is a place inside the loop where queries are executed every iteration, causing an N+1 query problem.

Me

Thank you for pointing that out. I had overlooked the performance degradation that would occur when data volume increases.

Other (S)

Try refactoring it to fetch all data in a single batch and map it in memory.

Me

Understood. I will fix that along with the variable naming feedback today, and then request your review once more.

Other (S)

Got it. I'll be waiting for the updated version.

Key Patterns

  • I had overlooked ~ (Admitting you missed an issue identified by the reviewer)
  • Thank you for pointing that out (Expressing gratitude for feedback or caught defects)
  • Please review once more (Politely asking for a re-review after applying fixes)

Source

Authored by GoMe