World map

 

BM: Baca dalam Bahasa Melayu

World 5: Teamwork

Kind, useful code review

You will learn: how to comment, suggest, approve or ask for changes, kindly.

The problem

Mei asks you to review her code. You spot a problem. How do you say it without hurting her? Kind and useful, or needs work?

Swipe right for good, left for needs work. Or use the buttons.

1 / 4

This is wrong. Redo it.

This is wrong. Redo it.

Watch

A code review: Reading a teammate's changes before they join main, then commenting, approving or asking for changes. ends with one of three choices: comment, approve or request changes. Sort each review.

Drag a card into a box. Or tap the card, then tap the box.

        Try it

        Mei typed “Wellcome”. A suggested change: A review comment that shows the exact new line. The author can apply it with one click. shows the exact fix. Mei can apply it with one click. Suggest the fix on that line.

        Practice repo — not a real website
        kelab-kod / club-site
        Add a welcome banner #31
        Open mei wants to merge banner into main
        index.html
        @@ -0,0 +1,2 @@

        Predict

        You request changes. The branch rule needs one approval. Can Mei merge now?

        Pick one answer.

        Try it

        Mei applied your suggestion. Check Files changed. Happy? Then approve it.

        Practice repo — not a real website
        kelab-kod / club-site
        Add a welcome banner #31
        Open mei wants to merge banner into main
        1. mei

          Adds a big welcome line to the home page.

        2. You asked for changes

          Small typo in the title. See my suggestion.

        3. mei

          Fixed with your suggestion. Thanks!

        Checks
        • Passed test
        How to merge
        Merging is blocked
        • A reviewer asked for changes. Fix those first.
        Your review

        Check

        Put a good review in order. First step at the top.

        First step at the top. Put these in order. Use the arrows, or drag.

        • Leave comments on lines
        • Read the PR description
        • Submit: comment, approve or request changes
        • Look through Files changed

        You did it!

        You can now give code reviews that are kind and useful.

        Go deeper (optional)

        On the real site, you can start a review and add many line comments. They all go out together when you submit. After fixing things, the author can ask you to review again. Some repos drop old approvals when new commits arrive. Golden rule: review the code, never the coder.