AR8: Engineering standards and code review

Lesson 4 of 5 · reading 15–25 minutes; practice and project time is on the module page

Feedback that helps

🎯You'll be able to

Write review comments that are kind, specific and actionable, with a severity, a suggestion, praise where it's due and a clear decision.

🏠The everyday picture

A good cricket coach says "your front foot is landing outside off stump; try a shorter stride", not "that was terrible". The player knows what to change and still wants to come back tomorrow.

📘What it really is

📝A worked example

Input: line 10 of refunds.js, gateway.refund({ orderId, amount, token: REFUND_TOKEN });.

Steps:

  1. Poor: "Obviously wrong, you just forgot await."
  2. Better: "Severity: blocker. gateway.refund returns a promise that isn't awaited, so a failed refund is never seen and the function returns before the refund happens."
  3. Suggestion: "Add await and let the error reach the caller, or return a clear failure."
  4. Praise elsewhere: "Good to see a test arrive with the feature."

Expected output: a findings table with file, line, severity, rule, comment and suggestion, and a decision of Request changes.

🌍Where it's used

📝Case scenario

A new engineer's first three pull requests got blunt one-word comments ("No.", "Wrong."). They stopped asking questions and started hiding unfinished work. After the team adopted labelled, explained comments with praise where due, the same engineer's pull requests got smaller and better, and they began reviewing others.

🖱️Try it

Rewrite three harsh comments ("this is a mess", "why would you do this", "just use the logger") as kind, specific comments with a suggestion. Success: each names the problem, why it matters and what to do.

⚠️Common mistakes

🛠️For your project

Project 3's tests 8 and 9 read reviews/pr-41.md: the blockers found, suggestions, at least one praise, no harsh words, and the decision "Request changes".

✅Quick check

What makes a finding a blocker?

Show the answer

Merging it would put customers, money or data at risk, so it must change first.

Why include praise in a review?

Show the answer

It shows what to keep doing, and keeps people willing to ask for review.

← PreviousCode review
ProLearners Assist