Answers.Body: <p>Make the review actually useful: have them swap their code. When they'll realize that their future tasks depend on their colleague's performance (which is how job works), they'll appreciate the need to keep each other in line.</p>
  
  <p>Example:</p>
  
  <ol>
  <li>exercise 1: write code doing X.</li>
  <li>code review</li>
  <li>swap code with another student.</li>
  <li>exercise 2: expand given code to do Y.</li>
  </ol>
  
  <p>This will more closely resemble how actual team works.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T16:32:36.813Z
Answers.LastActivityDate: 2017-08-30T16:32:36.813Z
Answers.UserDisplayName: Agent_L
Answers.Body: <p>I think you've nailed the issue: some students will think that code reviews are just a way for the teacher to "ditch some work". You need to show them that code reviews are actually a best practice in the industry. After all, they are studying for the life, not for the school, right?</p>
  
  <p>I'd call in a guest lecturer. You probably know people who have worked in the non-academic world for quite some time. Ask around your friends and other contacts: I would assume most people would be honoured if they were asked to give a guest lecture. Also if they can't make it, maybe they can recommend someone else. </p>
  
  <p>The person absolutely doesn't need to be from any "fancy" company like Google or Apple, I think any local software shop will do provided that the guest has a credible enough (for the students!) CV, say, more than five years of practical experience. </p>
  
  <p>The students will find the lecture a refreshing break from the usual routines and will hear the facts from a third party who has no incentive on ditching any work anywhere. </p>
  
  <hr>
  
  <p>Finally, I thought about another method too: give them a homework assignment to do some actual code review in codereview.stackexchange.com! Let them pick the piece of code to review themselves (or pre- select a few nice tasks from which they can choose). </p>
  
  <p>It'd be great if they could post their reviews to the actual site, but you could also use your school's intranet or something. If you go with the actual site, consider whether you want to create everyone some random accounts  just for the course or if you'd rather encourage them to create their own personal Stack Exchange accounts.</p>
  
  <p>Either way, they get to review some actual code, and it's not from anyone that they know, so they don't need to hold back.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T21:14:07.987Z
Answers.LastActivityDate: 2017-08-30T00:09:18.453Z
Answers.LastEditDate: 2017-08-30T00:09:18.453Z
Answers.UserDisplayName: ZeroOne
Answers.Body: <p>Set a formative peer-reviewed assignment using an LMS.</p>
  
  <p>This is based mainly on part of an answer I suggested to a different but related question <a href="https://cseducators.stackexchange.com/questions/3408/how-can-i-effectively-manage-peer-evaluation-among-my-students/3415#3415">here</a>.</p>
  
  <h2>Coding mini-assignment- peer grading on Moodle</h2>
  
  <p>Given that photocopying code is a non-runner, and distributing files can be difficult, I set up a peer-graded Assignment on Moodle.  Each learner had to work on a <strong>mini-programming assignment</strong> and had two days to complete it and submit online.</p>
  
  <p>This assignment was of a very similar structure and marking scheme as an upcoming summative assignment.</p>
  
  <p>Firstly, getting this to work the first time on Moodle was very time consuming.  Even on the day, there were several delays in getting started.</p>
  
  <p>The <strong>grading rubric</strong> identified many elements such as use of "appropriate" names for variables and functions, header info, docstrings (Python), clear user prompts/instructions, working code, use of comments and so on.</p>
  
  <p>When peer-grading, it is possible to place a <strong>comment in each section</strong> to explain why mark(s) were lost, and each marker can place a final comment/general observations.</p>
  
  <h2>Benefits of Moodle Peer assessment</h2>
  
  <p>Learners are assigned the work of others to mark <strong>randomly</strong></p>
  
  <p><strong>Anonymity</strong> is an option in the setup</p>
  
  <p>Each learner was forced to <strong>really look</strong> at the <strong>grading scheme</strong>, which was provided from the outset.  Many lost marks for simple things that they should have included (e.g. header information).  This is important- that they realise <em>they can get <strong>some</strong> marks</em> even if the code doesn't work completely or partially.</p>
  
  <p>All got to see examples of <em>other learners approaches, structure, working and non-working code</em>.  Seeing <strong>mistakes</strong> others make should help them identify those that they make themselves.</p>
  
  <p>Teacher can <strong>review all more easily</strong> without looking through a lot of paper, i.e. the grades given and received by each learner, and the comments given and received.</p>
  
  <h2>Difficulties</h2>
  
  <p>I have to say, from a practical perspective, it ran about as smooth as a dragons tail (i.e. not at all smoothly) but this was likely due to my inexperience with using this in Moodle.  That said, it was better than paper.</p>
  
  <p>Some students failed to provide any feedback even when it was a requirement of the exercise.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T01:33:00.760Z
Answers.LastActivityDate: 2017-08-30T01:33:00.760Z
Answers.UserDisplayName: srattigan
Answers.Body: <p>You have an opportunity for several things here:</p>
  
  <ol>
  <li><p>You can make it a small-team effort rather than a whole-class thing. Say, a team of about 5. </p></li>
  <li><p>The team reviews everyone's code in sequence so all get to participate. Instead of a "code-review" it can be a "code-quality-workshop". </p></li>
  <li><p>The team has to write up the results of the review, with an addendum by the code's author about how the code was improved. (Writing is good.)</p></li>
  <li><p>A whole-class retrospective on the process and its effect. (Retrospectives are good.)</p></li>
  </ol>
  
  <p>If you have several groups working at once, you will need to wander around and participate in each group, giving pointers on process (rather than product). But you also need to do that if you have the whole class as the set of reviewers, of course. </p>
  
  <hr>
  
  <p>An alternative to code reviews, of course, is pair programming, where the need for reviews is lessened or eliminated. Two minds working together are stronger than than the two working separately it turns out when creating code. Code quality has been observed to improve and quantity (statistically speaking) doesn't go down by enough to overcome the quality issue. </p>
  
  <hr>
  
  <p>You may need to add a level of peer evaluation/review to this as well. Something like the following has worked for me over several years. In any group assignment, each member of the group also submits a peer review sheet. For a group of two (e.g. pair programming) I ask each participant to detail the most important contribution of their partner AND their own most important contribution. I don't ask who worked harder or ask them to make an evaluation. I ask them for the contributions. </p>
  
  <p>In a group of about five, I will ask each member to name the (say) three most important members of their group and to mention the key contribution of each. I tell them that they can include themself in the list of three. I also ask, separately for their own most important contribution. </p>
  
  <p>I let them know at the beginning of the course that this will happen and its parameters, so it isn't a surprise. </p>
  
  <p>Students see that they are supposed to contribute to a group and are not asked to speak ill of anyone. Keep the questions entirely positive. But you also learn a lot from what is <em>not</em> said and who is <em>not</em> included in the contributor list. </p>
  
  <p>If the project happens outside your view, you also learn things about individuals that you can not otherwise know. I've had students I thought were slacking who were praised by teammates for making the team work properly. </p>
  
  <p>These peer evaluations are not optional. </p>
  
  <p>This same idea was also discussed here: <a href="https://cseducators.stackexchange.com/a/2578/1293">https://cseducators.stackexchange.com/a/2578/1293</a></p>
  
  <hr>
  
  <p>Let me note that there may be cultural limitations here. In some cultures it may be odd to name oneself as a top contributor. In others it might be very natural. You can modify the scheme, of course, either requiring or forbidding naming oneself as one of the top people. Use your judgement here. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:39:08.923Z
Answers.Text: The only problem with you're first idea is that if the majority of the class doesn't want to do the task then you have 2 solutions: 1) You make groups where you put motivated students and let unmotivated students fail or 2) Let them make groups and possibly see the usual 5 people group: 1 working + 4 watching
Answers.UserDisplayName: Safirah
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:42:06.990Z
Answers.Text: But the pair programming idea might do the trick, although it must be an assignment done in the classrom, I've seen countless "pair group assignments" where one of them doesn't even know what the first line of code does
Answers.UserDisplayName: Safirah
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:42:10.603Z
Answers.Text: Certainly I would form the groups in a case like this, even if I randomize it.  You can also use group peer evaluation to goad the ones tempted to slack. You have incentives you can use. Don't neglect them.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:49:23.427Z
Answers.Text: I don't want to seem annoying xD, but students usually defend each other.
Answers.UserDisplayName: Safirah
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T15:03:38.613Z
Answers.Text: My answer was updated to give more ideas about how to to about peer evaluation. It is a bit subtle, but isn't difficult.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T21:58:12.497Z
Answers.Text: More of an addendum to this answer (plus, I'm new here, hello!)  How about introducing unit tests.  Members of pairs must be able to pass their partner's tests as well as their own.  It encourages the collusion and teamwork you seek without looking like you're palming your work off on them.  Those unit tests can also be included in the grading perhaps?
Answers.UserDisplayName: James Snell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T22:01:40.677Z
Answers.Text: Re:"But you also learn a lot from what is not said and who is not included in the contributor list".  Like for instance, you learn who is friends with who and who is popular versus not popular?  I'd agree that you may be surprised that people say positive things about someone you didn't realize was doing well because many kids are introverted and don't necessarily stand out in the crowd. However, their work does stand out when given the chance. Conversely, I don't think you can come to the reverse conclusion with any degree of reliability;You may as well flip a coin versus using the reviews.
Answers.UserDisplayName: Dunk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:32:57.867Z
Answers.LastActivityDate: 2017-08-29T15:55:01.630Z
Answers.LastEditDate: 2017-08-29T15:55:01.630Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>Have you considered something like a Refactoring Kata? </p>
  
  <p>A Refactoring Kata is a project that works exactly as described and passes a given set of unit tests, but is written for the express purpose of being abysmal code. </p>
  
  <p>Giving the students horrible code written by someone other than their peers could help people who may think they are being "mean"/not wanting to make another student feel bad. Taking away that human element and splitting it up into a group project may motivate more students to participate more actively and learn how to be critical without "pulling punches" per se. Students could also compare how their peers solved problems differently than themselves.</p>
  
  <p>I did this at a job rather than in an academic setting, but I think it definitely could have applications. This was a refactoring kata we did specifically to teach the team the strategy design pattern. It is one of the most popular Katas, GildedRose. </p>
  
  <p><a href="https://github.com/emilybache/GildedRose-Refactoring-Kata" rel="noreferrer">https://github.com/emilybache/GildedRose-Refactoring-Kata</a></p>
  
  <p>It is a good way to see what Katas are all about, and gives a good example structure for creating your own Katas. I see something similar was suggested in another answer, and I concur that creating a Kata that fits your curriculum is most likely the way to go here if you have the time and resources.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T15:02:13.470Z
Answers.LastActivityDate: 2017-08-29T15:02:13.470Z
Answers.UserDisplayName: RageCage
Answers.Body: <p>Some ideas:</p>
  
  <ol>
  <li><p>Show them that you're serious: grade the student's code reviews -- initially based on effort, then later based on correctness. </p>
  
  <p>This will definitely be a lot more work for you, but it does make sure that everybody is practicing and kills accusations that you're trying to avoid work. You may want to deliberately invent poor and buggy code samples to give to students if you're going to take this route (as opposed to having them grade each other's work). You should probably do this carefully to avoid overloading both you and your students.</p></li>
  <li><p>Incentivize code reviewing somehow. </p>
  
  <p>For example, one idea is to offer students the opportunity to code review each other's work before they submit it -- you then proceed to grade their code fairly harshly. Students are then incentivized to take code reviewing seriously because it's a way to help mutually ensure they get a higher grade. (After all, in humanities classes, you proofread each other's essays -- why not proofread each other's code as well?)</p>
  
  <p>Another idea is to tie it into regrades: if students want a regrade of a past assignment, they also need to conduct code reviews related to that assignment (and probably a retrospective). However, this would probably only really feel worth it if your assignments were on the harder end of the scale/you grade strictly.</p></li>
  <li><p>Set up situations to make code reviewing happen organically.</p>
  
  <p>For example, give group projects/pair projects. Tell them that you'll be grading them not only on correctness, but based on how sound their project's design is/how well they follow your in-class style guide. Students will then naturally be incentivized to at least check their partner's work.</p></li>
  <li><p>Incorporate code reviews into your exams.</p>
  
  <p>Give them short, invented code samples, and ask them to identify all of the style and correctness errors they can find. </p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:57:54.740Z
Answers.LastActivityDate: 2017-08-29T14:57:54.740Z
Answers.UserDisplayName: Michael0x2a
Answers.Body: <blockquote>
    <p>some students see code review as a burden and a new way teachers have found to "ditch some work"</p>
  </blockquote>
  
  <p>There's an easy way to teach them to do code review without thinking that you're ditching work: ask them to review some code which <em>you</em> wrote for the express purpose (or, if you have some suitable code from the previous year's homework, use that). This can be set as homework. For what it's worth, I have had to identify errors in code printouts both in exams and in job interviews, so this isn't an original idea.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:52:40.253Z
Answers.Text: Hahaha students thinking I'm ditching work is the last of my problems! ;) But your solution is very helpful! And a interesting twist from @RageCage solution
Answers.UserDisplayName: Safirah
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T14:48:41.847Z
Answers.LastActivityDate: 2017-08-29T14:48:41.847Z
Answers.UserDisplayName: Peter Taylor
Answers.Body: <p>Why not create a multi stage project for them?</p>
  
  <p>They all code up something for stage 1. You then give out each students stage 1 to another student and ask them to complete stage 2 using the code that they received.</p>
  
  <p>Next the completed stage 1 and 2 work is given to another student to complete a stage 3 (they are then reviewing, extending and understanding another 2 students work). This will help them learn to work with other students code and they are learning from each other. An example of such a project may be a multi page form, submission and validation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T15:18:29.350Z
Answers.Text: This is an awesome suggestion and also a great way to show importance of clear code and good comments
Answers.UserDisplayName: Safirah
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T14:56:53.877Z
Answers.LastActivityDate: 2017-08-30T15:35:11.693Z
Answers.LastEditDate: 2017-08-30T15:35:11.693Z
Answers.UserDisplayName: Samantha Eastwood
Answers.Body: <p>Providing the class with pre-chosen code, for the specific purpose of teaching quality control skills and methods (of which review is a component) will help to ensure the code is suitable for teaching the points required, and does actually contain review points where you can provide notes and grades fairly. </p>
  
  <p>Asking students to peer review may mean some get easier or harder code to review than others, and some get code poorly suited to review lessons.</p>
  
  <p>Teaching the class the importance and focus on QC and quality production methods, puts review in a context - they <strong>will</strong> need this knowledge professionally as almost all software businesses do operate some form of QC and/or review. Simple as that.</p>
  
  <p>By giving them code you have chosen, you can be sure that whether individually or in groups, they have a target number of important and secondary review points to identify, which may motivate them to look harder. The rationale is, if you have to find and review 10 major points in a block of code, as part of a review, you might spent extra time taxing yourself to find the last 3 items, compared to an open-ended count. You'll probably remember them better as well.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T21:37:40.237Z
Answers.Text: This is a fair point, but there is a counterpoint: someone trained in *always* finding errors in code may change things for the sake of change when on the job.  An even more important ability, I would argue, is the **ability to recognize flawless code that does not need modification.**
Answers.UserDisplayName: Wildcard
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-30T10:30:08.243Z
Answers.Text: Fair point, but not one in the OP. Also I don't agree. *Any* professional of merit will have received some training in recognising serious faults, routine faults, and unimportant poor practice - and *also* when a fault matters and when it doesn't from a product perspective. I don't think you can say "don't specifically train them to see faults (even in their own or similar work), or they will find fault with everything" (which is basically the concern you give).  I don't know any educational or skill training body that would agree.
Answers.UserDisplayName: Stilez
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-29T17:05:21.360Z
Answers.LastActivityDate: 2017-08-29T17:05:21.360Z
Answers.UserDisplayName: Stilez
Body: <p>Code review is crucial to student's academic and professional lives, yet some students see code review as a burden and a new way teachers have found to "ditch some work".</p>
  
  <p>By experience, code review works better if the majority of the class is into it, yet this is becoming more and more rare.</p>
  
  <p>What strategies do you have to motivate students to review each other? </p>
  
  <p>Sidenote 1: I've seen some teachers ask the class to write some code and ask a student to showcase and the rest of the class would review it, it did not work very well, because it was always the same 4/5 students participating.</p>
  
  <p>Sidenote 2: I'm dealing with high school and college students</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-29T17:38:24.387Z
Comments.Text: It would be a huge help if students could look over each other's code on projects to help each other out before handing them in. Unfortunately, the (very appropriate) culture in schools that treats cheating and plagiarism very strictly makes this difficult to do.
Comments.UserDisplayName: Kevin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-29T21:52:11.667Z
Comments.Text: Your findings are not unique to students. The workforce is exactly the same way. Some developers believe strongly in code reviews and do a good job while others look at them as yet another task they don't have time for and barely do a review if they do one at all. If you find that silver-bullet that gets everyone excited and motivated to do code reviews then you will be able to leave your teaching job and make a lot of money consulting. IME, neither the carrot nor the stick has much impact in changing behavior regarding code reviews one way or the other over the long-run.
Comments.UserDisplayName: Dunk
Tags: <secondary-education><collaboration>
Title: How can we motivate students to review each other's code?
ThreadText: # How can we motivate students to review each other's code?
  
  (Asked by: username_0 on 2017-08-29)
  
  Code review is crucial to student's academic and professional lives, yet some students see code review as a burden and a new way teachers have found to "ditch some work".
  
  By experience, code review works better if the majority of the class is into it, yet this is becoming more and more rare.
  
  What strategies do you have to motivate students to review each other?
  
  Sidenote 1: I've seen some teachers ask the class to write some code and ask a student to showcase and the rest of the class would review it, it did not work very well, because it was always the same 4/5 students participating.
  
  Sidenote 2: I'm dealing with high school and college students
  
  **Tags:** secondary-education, collaboration
  
  > **Comments:**
  > **username_1**: It would be a huge help if students could look over each other's code on projects to help each other out before handing them in. Unfortunately, the (very appropriate) culture in schools that treats cheating and plagiarism very strictly makes this difficult to do.  
  > **username_2**: Your findings are not unique to students. The workforce is exactly the same way. Some developers believe strongly in code reviews and do a good job while others look at them as yet another task they don't have time for and barely do a review if they do one at all. If you find that silver-bullet that gets everyone excited and motivated to do code reviews then you will be able to leave your teaching job and make a lot of money consulting. IME, neither the carrot nor the stick has much impact in changing behavior regarding code reviews one way or the other over the long-run.  
  
  ---
  
  ## 9 answers
  
  ### Answer by username_6 on 2017-08-29. Score: 16 | Accepted answer
  
  You have an opportunity for several things here:
  
  1. You can make it a small-team effort rather than a whole-class thing. Say, a team of about 5.
  2. The team reviews everyone's code in sequence so all get to participate. Instead of a "code-review" it can be a "code-quality-workshop".
  3. The team has to write up the results of the review, with an addendum by the code's author about how the code was improved. (Writing is good.)
  4. A whole-class retrospective on the process and its effect. (Retrospectives are good.)
  
  If you have several groups working at once, you will need to wander around and participate in each group, giving pointers on process (rather than product). But you also need to do that if you have the whole class as the set of reviewers, of course.
  
  ---
  
  An alternative to code reviews, of course, is pair programming, where the need for reviews is lessened or eliminated. Two minds working together are stronger than than the two working separately it turns out when creating code. Code quality has been observed to improve and quantity (statistically speaking) doesn't go down by enough to overcome the quality issue.
  
  ---
  
  You may need to add a level of peer evaluation/review to this as well. Something like the following has worked for me over several years. In any group assignment, each member of the group also submits a peer review sheet. For a group of two (e.g. pair programming) I ask each participant to detail the most important contribution of their partner AND their own most important contribution. I don't ask who worked harder or ask them to make an evaluation. I ask them for the contributions.
  
  In a group of about five, I will ask each member to name the (say) three most important members of their group and to mention the key contribution of each. I tell them that they can include themself in the list of three. I also ask, separately for their own most important contribution.
  
  I let them know at the beginning of the course that this will happen and its parameters, so it isn't a surprise.
  
  Students see that they are supposed to contribute to a group and are not asked to speak ill of anyone. Keep the questions entirely positive. But you also learn a lot from what is *not* said and who is *not* included in the contributor list.
  
  If the project happens outside your view, you also learn things about individuals that you can not otherwise know. I've had students I thought were slacking who were praised by teammates for making the team work properly.
  
  These peer evaluations are not optional.
  
  This same idea was also discussed here: <https://cseducators.stackexchange.com/a/2578/1293>
  
  ---
  
  Let me note that there may be cultural limitations here. In some cultures it may be odd to name oneself as a top contributor. In others it might be very natural. You can modify the scheme, of course, either requiring or forbidding naming oneself as one of the top people. Use your judgement here.
  
  > **Comments:**
  > **username_0**: The only problem with you're first idea is that if the majority of the class doesn't want to do the task then you have 2 solutions: 1) You make groups where you put motivated students and let unmotivated students fail or 2) Let them make groups and possibly see the usual 5 people group: 1 working + 4 watching  
  > **username_0**: But the pair programming idea might do the trick, although it must be an assignment done in the classrom, I've seen countless "pair group assignments" where one of them doesn't even know what the first line of code does  
  > **username_6**: Certainly I would form the groups in a case like this, even if I randomize it.  You can also use group peer evaluation to goad the ones tempted to slack. You have incentives you can use. Don't neglect them.  
  > **username_0**: I don't want to seem annoying xD, but students usually defend each other.  
  > **username_6**: My answer was updated to give more ideas about how to to about peer evaluation. It is a bit subtle, but isn't difficult.  
  > **username_7**: More of an addendum to this answer (plus, I'm new here, hello!)  How about introducing unit tests.  Members of pairs must be able to pass their partner's tests as well as their own.  It encourages the collusion and teamwork you seek without looking like you're palming your work off on them.  Those unit tests can also be included in the grading perhaps?  
  > **username_2**: Re:"But you also learn a lot from what is not said and who is not included in the contributor list".  Like for instance, you learn who is friends with who and who is popular versus not popular?  I'd agree that you may be surprised that people say positive things about someone you didn't realize was doing well because many kids are introverted and don't necessarily stand out in the crowd. However, their work does stand out when given the chance. Conversely, I don't think you can come to the reverse conclusion with any degree of reliability;You may as well flip a coin versus using the reviews.  
  
  ---
  
  ### Answer by username_8 on 2017-08-29. Score: 9
  
  Have you considered something like a Refactoring Kata?
  
  A Refactoring Kata is a project that works exactly as described and passes a given set of unit tests, but is written for the express purpose of being abysmal code.
  
  Giving the students horrible code written by someone other than their peers could help people who may think they are being "mean"/not wanting to make another student feel bad. Taking away that human element and splitting it up into a group project may motivate more students to participate more actively and learn how to be critical without "pulling punches" per se. Students could also compare how their peers solved problems differently than themselves.
  
  I did this at a job rather than in an academic setting, but I think it definitely could have applications. This was a refactoring kata we did specifically to teach the team the strategy design pattern. It is one of the most popular Katas, GildedRose.
  
  <https://github.com/emilybache/GildedRose-Refactoring-Kata>
  
  It is a good way to see what Katas are all about, and gives a good example structure for creating your own Katas. I see something similar was suggested in another answer, and I concur that creating a Kata that fits your curriculum is most likely the way to go here if you have the time and resources.
  
  
  ---
  
  ### Answer by username_9 on 2017-08-29. Score: 9
  
  Some ideas:
  
  1. Show them that you're serious: grade the student's code reviews -- initially based on effort, then later based on correctness.
  
     This will definitely be a lot more work for you, but it does make sure that everybody is practicing and kills accusations that you're trying to avoid work. You may want to deliberately invent poor and buggy code samples to give to students if you're going to take this route (as opposed to having them grade each other's work). You should probably do this carefully to avoid overloading both you and your students.
  2. Incentivize code reviewing somehow.
  
     For example, one idea is to offer students the opportunity to code review each other's work before they submit it -- you then proceed to grade their code fairly harshly. Students are then incentivized to take code reviewing seriously because it's a way to help mutually ensure they get a higher grade. (After all, in humanities classes, you proofread each other's essays -- why not proofread each other's code as well?)
  
     Another idea is to tie it into regrades: if students want a regrade of a past assignment, they also need to conduct code reviews related to that assignment (and probably a retrospective). However, this would probably only really feel worth it if your assignments were on the harder end of the scale/you grade strictly.
  3. Set up situations to make code reviewing happen organically.
  
     For example, give group projects/pair projects. Tell them that you'll be grading them not only on correctness, but based on how sound their project's design is/how well they follow your in-class style guide. Students will then naturally be incentivized to at least check their partner's work.
  4. Incorporate code reviews into your exams.
  
     Give them short, invented code samples, and ask them to identify all of the style and correctness errors they can find.
  
  
  ---
  
  ### Answer by username_10 on 2017-08-29. Score: 7
  
  > some students see code review as a burden and a new way teachers have found to "ditch some work"
  
  There's an easy way to teach them to do code review without thinking that you're ditching work: ask them to review some code which *you* wrote for the express purpose (or, if you have some suitable code from the previous year's homework, use that). This can be set as homework. For what it's worth, I have had to identify errors in code printouts both in exams and in job interviews, so this isn't an original idea.
  
  > **Comments:**
  > **username_0**: Hahaha students thinking I'm ditching work is the last of my problems! ;) But your solution is very helpful! And a interesting twist from @username_8 solution  
  
  ---
  
  ### Answer by username_11 on 2017-08-30. Score: 4
  
  Why not create a multi stage project for them?
  
  They all code up something for stage 1. You then give out each students stage 1 to another student and ask them to complete stage 2 using the code that they received.
  
  Next the completed stage 1 and 2 work is given to another student to complete a stage 3 (they are then reviewing, extending and understanding another 2 students work). This will help them learn to work with other students code and they are learning from each other. An example of such a project may be a multi page form, submission and validation.
  
  > **Comments:**
  > **username_0**: This is an awesome suggestion and also a great way to show importance of clear code and good comments  
  
  ---
  
  ### Answer by username_12 on 2017-08-29. Score: 3
  
  Providing the class with pre-chosen code, for the specific purpose of teaching quality control skills and methods (of which review is a component) will help to ensure the code is suitable for teaching the points required, and does actually contain review points where you can provide notes and grades fairly.
  
  Asking students to peer review may mean some get easier or harder code to review than others, and some get code poorly suited to review lessons.
  
  Teaching the class the importance and focus on QC and quality production methods, puts review in a context - they **will** need this knowledge professionally as almost all software businesses do operate some form of QC and/or review. Simple as that.
  
  By giving them code you have chosen, you can be sure that whether individually or in groups, they have a target number of important and secondary review points to identify, which may motivate them to look harder. The rationale is, if you have to find and review 10 major points in a block of code, as part of a review, you might spent extra time taxing yourself to find the last 3 items, compared to an open-ended count. You'll probably remember them better as well.
  
  > **Comments:**
  > **username_13**: This is a fair point, but there is a counterpoint: someone trained in *always* finding errors in code may change things for the sake of change when on the job.  An even more important ability, I would argue, is the **ability to recognize flawless code that does not need modification.**  
  > **username_12**: Fair point, but not one in the OP. Also I don't agree. *Any* professional of merit will have received some training in recognising serious faults, routine faults, and unimportant poor practice - and *also* when a fault matters and when it doesn't from a product perspective. I don't think you can say "don't specifically train them to see faults (even in their own or similar work), or they will find fault with everything" (which is basically the concern you give).  I don't know any educational or skill training body that would agree.  
  
  ---
  
  ### Answer by username_3 on 2017-08-30. Score: 1
  
  Make the review actually useful: have them swap their code. When they'll realize that their future tasks depend on their colleague's performance (which is how job works), they'll appreciate the need to keep each other in line.
  
  Example:
  
  1. exercise 1: write code doing X.
  2. code review
  3. swap code with another student.
  4. exercise 2: expand given code to do Y.
  
  This will more closely resemble how actual team works.
  
  
  ---
  
  ### Answer by username_4 on 2017-08-29. Score: 1
  
  I think you've nailed the issue: some students will think that code reviews are just a way for the teacher to "ditch some work". You need to show them that code reviews are actually a best practice in the industry. After all, they are studying for the life, not for the school, right?
  
  I'd call in a guest lecturer. You probably know people who have worked in the non-academic world for quite some time. Ask around your friends and other contacts: I would assume most people would be honoured if they were asked to give a guest lecture. Also if they can't make it, maybe they can recommend someone else.
  
  The person absolutely doesn't need to be from any "fancy" company like Google or Apple, I think any local software shop will do provided that the guest has a credible enough (for the students!) CV, say, more than five years of practical experience.
  
  The students will find the lecture a refreshing break from the usual routines and will hear the facts from a third party who has no incentive on ditching any work anywhere.
  
  ---
  
  Finally, I thought about another method too: give them a homework assignment to do some actual code review in codereview.stackexchange.com! Let them pick the piece of code to review themselves (or pre- select a few nice tasks from which they can choose).
  
  It'd be great if they could post their reviews to the actual site, but you could also use your school's intranet or something. If you go with the actual site, consider whether you want to create everyone some random accounts just for the course or if you'd rather encourage them to create their own personal Stack Exchange accounts.
  
  Either way, they get to review some actual code, and it's not from anyone that they know, so they don't need to hold back.
  
  
  ---
  
  ### Answer by username_5 on 2017-08-30. Score: 1
  
  Set a formative peer-reviewed assignment using an LMS.
  
  This is based mainly on part of an answer I suggested to a different but related question [here](https://cseducators.stackexchange.com/questions/3408/how-can-i-effectively-manage-peer-evaluation-among-my-students/3415#3415).
  
  ## Coding mini-assignment- peer grading on Moodle
  
  Given that photocopying code is a non-runner, and distributing files can be difficult, I set up a peer-graded Assignment on Moodle. Each learner had to work on a **mini-programming assignment** and had two days to complete it and submit online.
  
  This assignment was of a very similar structure and marking scheme as an upcoming summative assignment.
  
  Firstly, getting this to work the first time on Moodle was very time consuming. Even on the day, there were several delays in getting started.
  
  The **grading rubric** identified many elements such as use of "appropriate" names for variables and functions, header info, docstrings (Python), clear user prompts/instructions, working code, use of comments and so on.
  
  When peer-grading, it is possible to place a **comment in each section** to explain why mark(s) were lost, and each marker can place a final comment/general observations.
  
  ## Benefits of Moodle Peer assessment
  
  Learners are assigned the work of others to mark **randomly**
  
  **Anonymity** is an option in the setup
  
  Each learner was forced to **really look** at the **grading scheme**, which was provided from the outset. Many lost marks for simple things that they should have included (e.g. header information). This is important- that they realise *they can get **some** marks* even if the code doesn't work completely or partially.
  
  All got to see examples of *other learners approaches, structure, working and non-working code*. Seeing **mistakes** others make should help them identify those that they make themselves.
  
  Teacher can **review all more easily** without looking through a lot of paper, i.e. the grades given and received by each learner, and the comments given and received.
  
  ## Difficulties
  
  I have to say, from a practical perspective, it ran about as smooth as a dragons tail (i.e. not at all smoothly) but this was likely due to my inexperience with using this in Moodle. That said, it was better than paper.
  
  Some students failed to provide any feedback even when it was a requirement of the exercise.
  
  
  ---
  
  