Skip to Content

Review Speed

Let’s look at how to balance thoroughness with speed in code reviews. We’ll show you a simple example and explain why the feedback matters.

The Scenario

A developer has submitted a large PR with many changes. The code works but could be split into smaller, more manageable chunks.

updateUser.ts
// Before // A large PR with many unrelated changes function updateUserProfile(userId: string, data: any) { // Update user profile const user = db.getUser(userId) user.name = data.name user.email = data.email user.address = data.address user.phone = data.phone user.preferences = data.preferences db.updateUser(user) // Update user settings const settings = db.getUserSettings(userId) settings.notifications = data.notifications settings.privacy = data.privacy db.updateUserSettings(settings) // Update user preferences const preferences = db.getUserPreferences(userId) preferences.theme = data.theme preferences.language = data.language db.updateUserPreferences(preferences) }

PR Comment

Choose the comment that you think is the most constructive and helpful.

// After // PR 1: Update user profile function updateUserProfile(userId: string, data: UserProfileData) { const user = db.getUser(userId) user.name = data.name user.email = data.email user.address = data.address user.phone = data.phone db.updateUser(user) } // PR 2: Update user settings function updateUserSettings(userId: string, data: UserSettingsData) { const settings = db.getUserSettings(userId) settings.notifications = data.notifications settings.privacy = data.privacy db.updateUserSettings(settings) } // PR 3: Update user preferences function updateUserPreferences(userId: string, data: UserPreferencesData) { const preferences = db.getUserPreferences(userId) preferences.theme = data.theme preferences.language = data.language db.updateUserPreferences(preferences) }

Click here to learn more

Improvements

1. Review Efficiency

  • Smaller, focused changes
  • Faster review process
  • Easier to understand changes

2. Code Quality

  • Better error detection
  • Easier to test
  • Clearer responsibility

3. Team Collaboration

  • Faster feedback cycle
  • Easier to merge changes
  • Better code integration

Tips

1. Start Positive

  • Acknowledge the working code
  • Show you understand the current approach
  • Example: “Great work on the user updates!“

2. Explain the Benefits

  • Why do smaller PRs matter?
  • How do they help?
  • Example: “This makes the review process faster”

3. Be Specific

  • Suggest concrete improvements
  • Explain why they matter
  • Example: “Breaking this into smaller PRs helps with review efficiency”

4. Keep It Friendly

  • Focus on improvement, not criticism
  • Use encouraging language
  • Example: “Thanks for considering review efficiency!”

Common Pitfalls to Avoid

1. Being Too Critical

  • ❌ “This PR is too big. Fix it.”
  • ✅ “Good work! Here’s how we can make the review process more efficient.”

2. Not Explaining Why

  • ❌ “Split this into smaller PRs.”
  • ✅ “Breaking this into smaller PRs helps with review speed and quality.”

3. Ignoring the Positive

  • ❌ “This needs to be smaller.”
  • ✅ “Great work! Here’s how we can make the review process even more efficient.”

Remember: The goal is to help your teammate write better code while maintaining a positive and collaborative environment!

Last updated on
PR DescriptionsException Handling