{"id":353,"date":"2011-10-12T08:06:11","date_gmt":"2011-10-12T08:06:11","guid":{"rendered":"http:\/\/madprogrammer76.wordpress.com\/?p=353"},"modified":"2011-10-12T08:06:11","modified_gmt":"2011-10-12T08:06:11","slug":"code-reviews","status":"publish","type":"post","link":"http:\/\/andrewpallant.ca\/wordpress\/code-reviews\/","title":{"rendered":"Code Reviews"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-359\" style=\"float:left;margin:5px;\" title=\"Scared\" src=\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\" alt=\"\" width=\"150\" height=\"111\" srcset=\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg 401w, http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared-300x223.jpg 300w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/>Developers often seem scared to allow another person to look at their code. \u00a0It is like they have a fear of someone stealing what they had done or that someone is looking over their shoulder. \u00a0Software developers and web developers often hold tight to their projects. \u00a0In almost every business work is proof read or reviewed. \u00a0 It is not because a lack of trust, but rather many eyes will catch mistakes.<\/p>\n<p><strong>Why do we do code reviews?<\/strong><strong><br \/>\n<\/strong>The reason for code reviews may be obvious, but since the resistance it needs to be mentioned. \u00a0Code reviews are primarily to catch logic mistakes, missing business rules and team coding standards.<\/p>\n<p>When a developer is so close to a project and looks at the same code for days, weeks or months, it is easy to invert logical expressions or entirely miss basic variable checks. \u00a0Assuming both purposely and by accident that routines return the perfect values is often the biggest mistake and we are suddenly surprised when a NULL value sneaks in.<\/p>\n<p>Often when we start a project we are handed pages and pages of business rules and requirements. \u00a0It is very easy to miss the small things and even the big things. \u00a0As easily it is to cross items off a list, it is just as easy to entirely miss one. \u00a0It is very viable to have a second set of eyes to review what we had just written. \u00a0Better to catch mistakes before the customer does.<\/p>\n<p>Lastly team coding standards; \u00a0they are standards that either the team lead or the team together decided they would follow. \u00a0These standards are to ensure that the team writes the code in the same structure and using the same variable naming convention. \u00a0Having coding standards allows the team to work together and have the ability to read each other\u2019s code. \u00a0It allows quick debug and editing by any team member. \u00a0Without these standards projects would be a wild wild west and would differ from team member to team member.<\/p>\n<p><strong>Types of Code Reviews<\/strong><\/p>\n<ol>\n<li>Team Code Reviews \u2013 Team members together would focus on a method or a group of methods. \u00a0The team together would offer suggestions and ideas to enhance the code for which they are reviewing. \u00a0It is not a time to rip the developer apart, but to offer constructive suggestions. \u00a0If a developer gets out of line, that person should be asked to leave the room. \u00a0A projector should be used if available; otherwise printing off the code or have each developer view it on their laptops are adequate methods as well. \u00a0The team lead should take a leadership role in this method guiding conversation and making notes to send out after the meeting.<\/li>\n<li>Colleague Code Reviews \u2013 These reviews should be done by a senior or a team lead person. \u00a0The senior can be greater or\u00a0equal in experience. \u00a0Same as a team review, everything should be done in a constructive manner. \u00a0If a senior developer is doing the review; the senior should be assigned by the team lead to prevent a biased review. \u00a0When the review is complete \u2013 the review should be covered in person with all developers involved.<\/li>\n<\/ol>\n<p><strong>Tips for the Reviewer<\/strong><\/p>\n<ol>\n<li>\u00a0Ask questions, do not make statements<\/li>\n<li>Do not be too critical, remember to praise<\/li>\n<li>Be sure you have your company coding standards available as a reference<\/li>\n<li>Keep the review on the code and not the coder. \u00a0 Do not make it personal<\/li>\n<li>Keep in mind that there is more than one way to do something<\/li>\n<\/ol>\n<p><strong>Tips for the Developer<\/strong><\/p>\n<ol>\n<li>Remember, you wrote the code, but the code is not you.<\/li>\n<li>Make a check list of things that are often found in the code reviews<\/li>\n<li>Be involved in the\u00a0maintenance\u00a0of the coding standards<\/li>\n<li>Always do your best and do not look for short cuts<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Developers often seem scared to allow another person to look at their code. \u00a0It is like they have a fear of someone stealing what they had done or that someone is looking over their shoulder. \u00a0Software developers and web developers often hold tight to their projects. \u00a0In almost every business work is proof read or &hellip; <a href=\"http:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Code Reviews<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,21,24],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Code Reviews - LDNDeveloper<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Code Reviews - LDNDeveloper\" \/>\r\n<meta property=\"og:description\" content=\"Developers often seem scared to allow another person to look at their code. \u00a0It is like they have a fear of someone stealing what they had done or that someone is looking over their shoulder. \u00a0Software developers and web developers often hold tight to their projects. \u00a0In almost every business work is proof read or &hellip; Continue reading Code Reviews\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\" \/>\r\n<meta property=\"og:site_name\" content=\"LDNDeveloper\" \/>\r\n<meta property=\"article:published_time\" content=\"2011-10-12T08:06:11+00:00\" \/>\r\n<meta property=\"og:image\" content=\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\" \/>\r\n<meta name=\"author\" content=\"andrewpallant\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@ldnDeveloper\" \/>\r\n<meta name=\"twitter:site\" content=\"@LdnDeveloper\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"andrewpallant\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\"},\"author\":{\"name\":\"andrewpallant\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\"},\"headline\":\"Code Reviews\",\"datePublished\":\"2011-10-12T08:06:11+00:00\",\"dateModified\":\"2011-10-12T08:06:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\"},\"wordCount\":637,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"image\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\",\"articleSection\":[\"Better Coding\",\"Contributing\",\"Developer\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\",\"name\":\"Code Reviews - LDNDeveloper\",\"isPartOf\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\",\"datePublished\":\"2011-10-12T08:06:11+00:00\",\"dateModified\":\"2011-10-12T08:06:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage\",\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\",\"contentUrl\":\"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/andrewpallant.ca\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code Reviews\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#website\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/\",\"name\":\"LDNDeveloper\",\"description\":\"Learning, Growing and Sharing.\",\"publisher\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84\",\"name\":\"ldnDeveloper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"contentUrl\":\"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg\",\"width\":512,\"height\":512,\"caption\":\"ldnDeveloper\"},\"logo\":{\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\"},\"description\":\"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf\",\"sameAs\":[\"http:\/\/www.andrewpallant.ca\",\"https:\/\/x.com\/LdnDeveloper\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97\",\"name\":\"andrewpallant\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/2.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/2.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"andrewpallant\"},\"url\":\"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Code Reviews - LDNDeveloper","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/","og_locale":"en_US","og_type":"article","og_title":"Code Reviews - LDNDeveloper","og_description":"Developers often seem scared to allow another person to look at their code. \u00a0It is like they have a fear of someone stealing what they had done or that someone is looking over their shoulder. \u00a0Software developers and web developers often hold tight to their projects. \u00a0In almost every business work is proof read or &hellip; Continue reading Code Reviews","og_url":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/","og_site_name":"LDNDeveloper","article_published_time":"2011-10-12T08:06:11+00:00","og_image":[{"url":"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150"}],"author":"andrewpallant","twitter_card":"summary_large_image","twitter_creator":"@ldnDeveloper","twitter_site":"@LdnDeveloper","twitter_misc":{"Written by":"andrewpallant","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#article","isPartOf":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/"},"author":{"name":"andrewpallant","@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97"},"headline":"Code Reviews","datePublished":"2011-10-12T08:06:11+00:00","dateModified":"2011-10-12T08:06:11+00:00","mainEntityOfPage":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/"},"wordCount":637,"commentCount":0,"publisher":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"image":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage"},"thumbnailUrl":"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150","articleSection":["Better Coding","Contributing","Developer"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/","url":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/","name":"Code Reviews - LDNDeveloper","isPartOf":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage"},"image":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage"},"thumbnailUrl":"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150","datePublished":"2011-10-12T08:06:11+00:00","dateModified":"2011-10-12T08:06:11+00:00","breadcrumb":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#primaryimage","url":"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150","contentUrl":"http:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2011\/10\/scared.jpg?w=150"},{"@type":"BreadcrumbList","@id":"https:\/\/andrewpallant.ca\/wordpress\/code-reviews\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/andrewpallant.ca\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Code Reviews"}]},{"@type":"WebSite","@id":"https:\/\/andrewpallant.ca\/wordpress\/#website","url":"https:\/\/andrewpallant.ca\/wordpress\/","name":"LDNDeveloper","description":"Learning, Growing and Sharing.","publisher":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/andrewpallant.ca\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/f6f5bb1ac3e0c5a54a8b5ce35fd67b84","name":"ldnDeveloper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","contentUrl":"https:\/\/andrewpallant.ca\/wordpress\/wp-content\/uploads\/2017\/05\/cropped-AAEAAQAAAAAAAAXQAAAAJDQxMGRlMzFjLWM4ODctNDk1NC05M2EyLWE1NDNhNTRiZjVlYw-2.jpg","width":512,"height":512,"caption":"ldnDeveloper"},"logo":{"@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/"},"description":"Andrew Pallant (@LdnDeveloper) has been a web, database and desktop developer for over 16 years. Andrew has worked on projects that ranged from factory automation to writing business applications. Most recently he has been heavily involved in various forms for ecommerce projects. Over the years Andrew has worn many hats: Project Manager, IT Manager, Lead Developer, Supervisor of Developers and many more - See more at: http:\/\/www.unlatched.com\/#sthash.8DiTkpKy.dpuf","sameAs":["http:\/\/www.andrewpallant.ca","https:\/\/x.com\/LdnDeveloper"]},{"@type":"Person","@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/0e7b5e71751000e8f66b17b69ef4ab97","name":"andrewpallant","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andrewpallant.ca\/wordpress\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"andrewpallant"},"url":"http:\/\/andrewpallant.ca\/wordpress\/author\/andrewpallant\/"}]}},"_links":{"self":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/353"}],"collection":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":0,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"wp:attachment":[{"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/andrewpallant.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}