{"id":1408,"date":"2019-03-29T08:57:05","date_gmt":"2019-03-29T14:57:05","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1408"},"modified":"2019-03-29T08:57:05","modified_gmt":"2019-03-29T14:57:05","slug":"code-reviews-benefits-and-counterindications","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/code-reviews-benefits-and-counterindications\/","title":{"rendered":"Code reviews: Benefits and Counterindications"},"content":{"rendered":"<p>Microsoft has a <a href=\"https:\/\/queue.acm.org\/detail.cfm?id=3292420\">long article in ACM Queue<\/a> on what people think they&#8217;re getting out of code reviews, what they&#8217;re actually getting, as well as a list of benefits a code review tool should provide.<\/p>\n<p>My main takeaways:<\/p>\n<ul>\n<li>Requiring two sign-offs is too many for low-risk changes such as renaming internal (not API) methods or local variables &#8212; only need one reviewer<\/li>\n<li>Tag the files\/changes that are at the heart of the change<\/li>\n<li>Small reviews get better feedback. More than 20 files, and a code review isn&#8217;t going to provide much, if any, value.<\/li>\n<li>If code reviews are important, doing reviews should be tracked and rewarded, just like anything else that has value.<\/li>\n<li>Reviews tend to focus on: comments about maintainability, documentation, alternative solutions, validation, and API usage<\/li>\n<li>Reviews only identify bugs ~15% of the time, so some other form of validation is important<\/li>\n<li>A good code review tool can help greatly by recommending reviewers &#8212; lightening the burden and getting knowledgeable people involved<\/li>\n<li>Show entire file to give reviewers context<\/li>\n<li>There&#8217;s no one-size-fits-all solution for code reviews &#8212; i.e. each team and code base has different needs and different culture.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft has a long article in ACM Queue on what people think they&#8217;re getting out of code reviews, what they&#8217;re actually getting, as well as a list of benefits a code review tool should provide. My main takeaways: Requiring two sign-offs is too many for low-risk changes such as renaming internal (not API) methods or &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/code-reviews-benefits-and-counterindications\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Code reviews: Benefits and Counterindications&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17],"tags":[],"class_list":["post-1408","post","type-post","status-publish","format-standard","hentry","category-programming","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1408"}],"version-history":[{"count":3,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1408\/revisions"}],"predecessor-version":[{"id":1412,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1408\/revisions\/1412"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}