Fullstack CourseLearn by building
Back to week 4

Topic

Code review & feedback

Definition

Code review is a structured process where a change author submits a bounded diff for another person to evaluate against correctness, security, readability, and architecture before it merges, and constructive feedback frames issues as specific, actionable observations rather than judgments of the author.

In simpler words

Review is someone else checking a change against real criteria before it ships, and giving or receiving feedback well makes that process actually useful.

Use the same checklist mindset from this week when reviewing a teammate Nest PR — migrations, guards, DTOs, and contracts.

After this you can

  • Write a PR description that helps a reviewer verify a change quickly
  • Give specific, actionable review comments instead of vague ones
  • Distinguish a blocking issue from a stylistic preference
  • Respond to review feedback without treating it as personal

Making a PR reviewable

Definition

A reviewable pull request describes intent, scope, and verification steps clearly enough that a reviewer can assess correctness without re-deriving the author reasoning from the diff alone.

In simpler words

Tell the reviewer what changed, why, and how it was checked, instead of making them reverse-engineer intent from raw code.

A good description states the problem, the approach, what was explicitly left out of scope, and how it was verified, including which requests or tests were run.

Small, single-purpose PRs get reviewed faster and more carefully than large ones.

PR description shape

## What
Add priority enum with a filter query param.

## Why
Support triage sorting.

## Verified
- Migration applied and rolled back cleanly
- POST/GET tested via Postman as member and admin
- OpenAPI reflects the new field

A reviewer can verify claims instead of guessing intent.

Giving and receiving feedback

Definition

Actionable feedback identifies a location, states a concrete consequence, and suggests a direction; receiving feedback well treats comments as evaluation of the code, not the author.

In simpler words

Say what is wrong, where, and why it matters — then respond to the technical point.

Label blocking issues (bugs, auth holes, missing migrations) vs non-blocking preferences.

Ask clarifying questions instead of guessing tone.

Keep in mind

  • Write the PR description a reviewer needs, not the one that is fastest to type.
  • Point at a specific line, name the consequence, and suggest a direction.
  • Label feedback as blocking or non-blocking so authors can prioritize.

Test

Check your understanding

At least 10 questions — mix of concept, syntax, practical, and logic. Score ≥80% (enforced by the API) to save progress.

Checking your session…

15 questions · concept 5 · syntax 3 · practical 4 · logic 3

1. What should reviews prioritize?
Concept
2. Why call out missing guards?
Syntax
3. Why review migrations carefully?
Practical
4. What makes feedback actionable?
Logic
5. Is compile-only approval enough?
Concept
6. Should you rewrite the author’s PR entirely?
Practical
7. What is mass assignment risk in review?
Syntax
8. Why mention vague errors?
Logic
9. What evidence helps a security comment?
Concept
10. Which review habit is worst?
Practical
11. What should a reviewer require here?
Conceptadvanced
.where("t.title = '" + q + "'")
12. What is the most important review comment on this route?
Syntaxadvanced
@Delete(':id')
remove(@Param('id') id: string) {
  return this.svc.remove(id);
}
13. How do you make this feedback actionable?
Practicalintermediate
// review comment: "this is wrong"
14. Why block this migration in review?
Logicadvanced
await q.query('ALTER TABLE users DROP COLUMN email');
15. What review concern does dto: any raise here?
Conceptintermediate
update(@Body() dto: any) {
  return this.repo.update(id, dto);
}

Checking your session…