{"id":900,"date":"2009-10-28T13:59:11","date_gmt":"2009-10-28T18:59:11","guid":{"rendered":"http:\/\/mikeconley.ca\/blog\/?p=900"},"modified":"2023-12-20T16:25:18","modified_gmt":"2023-12-20T21:25:18","slug":"augmenting-code-review-tools-screen-age-and-retina-burn","status":"publish","type":"post","link":"https:\/\/mikeconley.ca\/blog\/2009\/10\/28\/augmenting-code-review-tools-screen-age-and-retina-burn\/","title":{"rendered":"Augmenting Code Review Tools:  Screen Age and Retina Burn&#8230;"},"content":{"rendered":"<p>Two more ideas to augment the code review process:<\/p>\n<h2>Screen Age<\/h2>\n<p>Imagine you&#8217;re reviewing a piece of code.\u00a0 There&#8217;s something like&#8230;500 lines to look at.\u00a0 So you&#8217;re scrolling through the diff, checking things here, checking things there&#8230;<\/p>\n<p>And in the background, the review software is recording which sections of the code you&#8217;re looking at.<\/p>\n<p>Hm.<\/p>\n<p>I wonder if it&#8217;d be a useful metric to know what portions of the code were being looked at the most during a review?\u00a0 I believe it&#8217;s possible (at least within Firefox) to determine the scroll position of a window.\u00a0 I believe it&#8217;s also possible to determine the dimensions of the entire diff page, and the offset coordinates of elements on that page.<\/p>\n<p>So shouldn&#8217;t it be possible to determine which elements were on the screen, and for how long?<\/p>\n<p>Imagine seeing a &#8220;heat map&#8221; over the diff, showing where the reviewer spent most of their time looking.<\/p>\n<p><a href=\"http:\/\/smartbear.com\/docs\/BestPracticesForPeerCodeReview.pdf\">Jason Cohen wrote<\/a> that code reviews should take at least 5 minutes, and at most 60-90 minutes.\u00a0 I wonder if collecting this information would help determine whether or not a review was performed carefully enough.<\/p>\n<p>Now, granted, there are plenty of ways to add noise to the data.\u00a0 If I&#8217;m doing a review, and stand up to go get a sandwich, and then my neighbour visits, etc&#8230;my computer sits there, gazing at those elements, and the data is more or less worthless&#8230;<\/p>\n<p>Which brings me to:<\/p>\n<h2>Retina Burn<\/h2>\n<p>Eye tracking is not a new technology.\u00a0 One of my roommates works at a lab where they do experiments with eye tracking tools.\u00a0 From what he tells me, the eye tracking gear in the lab is pretty expensive and heavy-weight.<\/p>\n<p>But check this out:<\/p>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/JPt1n0CK9jk&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1\" \/><param name=\"allowfullscreen\" value=\"true\" \/><\/object><\/p>\n<p>and this:<\/p>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/bySO5-rXoBw&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1\" \/><param name=\"allowfullscreen\" value=\"true\" \/><\/object><\/p>\n<p>and this:<\/p>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"344\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/z8dzUSv45p4&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1\" \/><param name=\"allowfullscreen\" value=\"true\" \/><\/object><\/p>\n<p>So it looks like a webcam and some clever software can do the eye tracking trick too.\u00a0 This stuff is probably far less accurate than what my roommate uses &#8211; but it&#8217;s lighter, and cheaper, and therefore more likely to find its way into homes.\u00a0 So it looks like the day is coming where I&#8217;ll eventually be able to use my eyes to control my mouse cursor.<\/p>\n<p>But, more interestingly, this more or less solves the problem with my Screen Age idea:\u00a0 <em>this technology can tell when you&#8217;re looking at the screen<\/em>.\u00a0 And it can give a pretty good guess about what area of the screen you&#8217;re looking at.<\/p>\n<p>I wonder if collecting this information from code reviewers would be useful &#8211; what exact parts of the code have they looked at?\u00a0 And for how long?\u00a0 What have they missed?\u00a0 What did they gloss over?<\/p>\n<p><strong>UPDATE:<\/strong> Karen Reid has also brought to my attention the possibility of using this technology to see how TAs grade assignments by tracking what they&#8217;re looking at.\u00a0 Hm&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two more ideas to augment the code review process: Screen Age Imagine you&#8217;re reviewing a piece of code.\u00a0 There&#8217;s something like&#8230;500 lines to look at.\u00a0 So you&#8217;re scrolling through the diff, checking things here, checking things there&#8230; And in the background, the review software is recording which sections of the code you&#8217;re looking at. Hm. [&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,5,79],"tags":[501,1218,554,555,556],"class_list":["post-900","post","type-post","status-publish","format-standard","hentry","category-code-reviews","category-computer-science","category-technology","tag-code-review","tag-code-reviews","tag-eye-tracking","tag-myeye","tag-openeye"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prmTy-ew","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/900","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=900"}],"version-history":[{"count":7,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/900\/revisions"}],"predecessor-version":[{"id":3209,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/900\/revisions\/3209"}],"wp:attachment":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/media?parent=900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/categories?post=900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/tags?post=900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}