{"id":706,"date":"2009-09-13T15:27:47","date_gmt":"2009-09-13T20:27:47","guid":{"rendered":"http:\/\/mikeconley.ca\/blog\/?p=706"},"modified":"2023-12-20T16:25:19","modified_gmt":"2023-12-20T21:25:19","slug":"do-peer-code-reviews-seem-incompatible-with-the-traditional-classroom","status":"publish","type":"post","link":"https:\/\/mikeconley.ca\/blog\/2009\/09\/13\/do-peer-code-reviews-seem-incompatible-with-the-traditional-classroom\/","title":{"rendered":"Do Peer Code Reviews Seem Incompatible With The Traditional Classroom?"},"content":{"rendered":"<p>I recently wrote a post asking the question &#8220;why aren&#8217;t code reviews part of every undergraduate computer science curriculum?&#8221;, <a href=\"http:\/\/blogs.sun.com\/gregg\/\">Gregg Sporar<\/a> <a href=\"http:\/\/mikeconley.ca\/blog\/2009\/09\/09\/code-reviews\/#comments\">responded<\/a> by saying<\/p>\n<blockquote><p>I don\u2019t know of many professors who are really &#8220;into&#8221; code review.<\/p><\/blockquote>\n<p>This is so strange.<\/p>\n<p>You would think that a process that <a href=\"http:\/\/www.mfagan.com\/ibmfagan.pdf\">provably helps reduce code defects earlier in development<\/a> would be right up there in intro programming courses, along with &#8220;use a debugger instead of sprinkling print statements everywhere&#8221;.<\/p>\n<p>So, what gives?<\/p>\n<p>Well, one thought is that perhaps these courses are structured so that peer code review would completely undermine the ability to evaluate students correctly.  I&#8217;ve been in plenty of classes where I&#8217;ve been instructed never to show my code to anyone else.  We can vaguely discuss issues on the course bulletin board, but absolutely no code can be discussed directly.  For these assignments, team work, plagiarism, and cooperative learning is a big no-no.<\/p>\n<p>At first glance, it&#8217;s perfectly understandable:\u00a0 it seems like the only way to fairly evaluate the abilities of each individual student.  But still, it seems like that particular teaching model is really missing out on a huge opportunity to give their students valuable feedback.<\/p>\n<p>I have to make some corrections, though.  I haven&#8217;t been completely honest.  I&#8217;ve made it seem like I&#8217;ve never had <em>any <\/em>code review done in my courses at UofT, and that&#8217;s not entirely true.  Quick examples: in CSC180, I did pair-programming with another student &#8211; <a href=\"http:\/\/smartbear.com\/white-paper.php?content=docs\/articles\/Four-Kinds-Of-Review.html&amp;pageToken=codecollab-docs\">and pair-programming is certainly a type of peer code review<\/a>.  In CSC301, my team would rigorously review the diffs of each other&#8217;s repository commits, looking for flaws, and emailing back and forth defect reports.  We weren&#8217;t explicitly instructed to do this, but it certainly seemed like a good idea at the time for the success of the project.<\/p>\n<p><a href=\"http:\/\/www.cs.cmu.edu\/~aldrich\/courses\/413\/assignments\/asst10.pdf\">But it&#8217;s nothing like this<\/a>.\u00a0 Look at it this assignment from Carnegie Mellon.\u00a0 What a great idea for an assignment!\u00a0 How come this type of assignment seems so rare?<\/p>\n<p>Back when I was an Electrical and Computer Engineering undergrad, one of my professors once told me that &#8220;great programmers write great code because they <em>read <\/em>great code&#8221;.\u00a0 I think this is something that was missing in my formal education: <strong>how to read, review, analyze, and critique code.<\/strong> And above all, what beautiful, elegant code looks like!<\/p>\n<p>In my academic Drama classes,\u00a0 we poured over tons of famous, landmark plays.\u00a0 And of course we tore them apart, boiling them down, analyzing them, critiquing and debating, arguing our pants off&#8230;\u00a0 <em>I got good at reading them<\/em>.\u00a0 My critical evaluation skills in this area are pretty sharp.\u00a0 I can tell when I&#8217;m reading something <em>really well done<\/em>.\u00a0 And, because of this, given some practice, I could probably write something half-decent if I put my mind to it.<\/p>\n<p>So I think that&#8217;s something I&#8217;m missing from my computer science education.\u00a0 Perhaps there&#8217;s a good reason for it&#8217;s absence &#8211; but if there is, I don&#8217;t know it.\u00a0 Instructor moderated peer code reviews, or (even better!) code reviews of industry software&#8230;that sounds juicy.\u00a0 That sounds useful.\u00a0 That sounds like valuable feedback and instruction.<\/p>\n<p>It&#8217;s too bad it never happened.<\/p>\n<p>Anyhow, I haven&#8217;t answered my question yet.\u00a0 I still need to finish my review of <a href=\"http:\/\/smartbear.com\/docs\/book\/code-review-cisco-case-study.pdf\">Smart Bear&#8217;s Cisco study<\/a>.\u00a0 I&#8217;ve also found a case study where code peer reviews were used as part of an introductory computer programming course &#8211; I&#8217;m interested to see what they found out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently wrote a post asking the question &#8220;why aren&#8217;t code reviews part of every undergraduate computer science curriculum?&#8221;, Gregg Sporar responded by saying I don\u2019t know of many professors who are really &#8220;into&#8221; code review. This is so strange. You would think that a process that provably helps reduce code defects earlier in development [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[454],"tags":[1218,465,466,464],"class_list":["post-706","post","type-post","status-publish","format-standard","hentry","category-code-reviews","tag-code-reviews","tag-feedback","tag-pair-programming","tag-plagiarism"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prmTy-bo","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":5,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":715,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions\/715"}],"wp:attachment":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/tags?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}