{"id":"code-col-js-peer-review-glow-grow","audience":"college","category":"coding","track":"coding","technique":"tone","title":"Give a lab partner Glow and Grow feedback on their JavaScript","free":false,"task":"Your class uses Glow and Grow peer review. Write exactly 3 numbered comments on your partner's code: '1. Glow (Line N): ...' naming one specific thing done well, then '2. Grow (Line N): ...?' and '3. Grow (Line N): ...?', each Grow phrased as a friendly question ending in '?'. Each comment under 20 words. No code blocks or rewritten code, under 90 words.","materialLabel":"Your partner's code (attached to your prompt automatically)","material":"// ratings.js - Lab 5, written by my partner Theo (WEB 220)\n\n 1  function averageRating(reviews) {\n 2    const total = reviews.map((r) => r.stars).reduce((a, b) => a + b);\n 3    return total / reviews.length;\n 4  }\n 5\n 6  function isTopRated(product) {\n 7    if (product.rating == \"5\") {\n 8      return true;\n 9    }\n10    return false;\n11  }\n12\n13  module.exports = { averageRating, isTopRated };\n\n// Theo's note: \"works on the 3 products in the sample data!\"\n//\n// What I noticed when I tried it:\n//   averageRating([])  -> TypeError: Reduce of empty array with no initial value\n//   isTopRated({ rating: \"5\" }) -> true   (rating came in as a string)\n//\n// Lab 5 peer review rules (from the syllabus):\n//   - comment on the code, not the person\n//   - Glow first, then Grows\n//   - Grows are questions, so your partner figures out the fix","rules":[{"type":"numberedItems","count":3},{"type":"codeBlocks","count":0},{"type":"maxProseWords","max":90}],"mistakes":[{"title":"Commands, not questions","why":"The AI writes 'Use === here', but your class wants questions so the partner finds the fix.","fix":"Say: \"Each Grow is a friendly question ending in '?'.\"","checks":["r2"]},{"title":"No Glow","why":"The AI goes straight to problems, which isn't how your class does reviews.","fix":"Add: \"Start with one Glow naming something specific, with its line.\"","checks":["r0"]},{"title":"Rewriting the code","why":"The AI pastes a fixed version, which defeats the point of peer review.","fix":"Add: \"No code blocks or rewritten code.\"","checks":["codeBlocks","r2"]},{"title":"Too many comments","why":"The AI lists every possible improvement.","fix":"Add: \"Exactly 3 numbered comments, under 20 words each: one Glow, two Grows (line 2 and line 7).\"","checks":["numberedItems","maxProseWords","r1"]}],"promptHints":[{"label":"Uses Glow and Grow","patterns":["glow","grow"]},{"label":"Asks for questions","patterns":["question","\\?"]},{"label":"Asks for line numbers","patterns":["line n","line number","\\(line"]},{"label":"Sets the number of comments","patterns":["\\b(3|three)\\b.{0,20}comment"]},{"label":"Rules out rewrites","patterns":["no (code|rewrite)","don'?t (fix|rewrite)"]}],"hint":"Peer review is about helping your partner learn. Tell the AI your class's format, that Grows are questions, and how many comments.","rubricLabels":["The comments are labeled Glow (Line N):, Grow (Line N): and Grow (Line N): in that order, and the Glow names a specific strength with its line number","One Grow asks about line 2 and an empty reviews array (reduce with no starting value), and the other asks about the loose == comparison on line 7","Both Grow comments are questions ending in '?', and no corrected code or exact fix is written out"]}