<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=443149619225659&ev=PageView&noscript=1"> Making the Most of Code Reviews

We would like to email you valuable insights on software development and DevOps! (We promise not to stalk you or share your info)

 

Making the Most of Code Reviews

Making the Most of Code Reviews

Code review is used inside software companies as a process for examination of the code written by developers. It is performed by other colleagues before the code is sent upstream. A reviewer’s main purpose is to make sure the solution is clear, easy to understand and maintain.

The Reviewer

As the reviewer, here are some questions that should be considered during a code review:

  • Does the logic make sense? Is it over-engineered?
  • Is all the acceptance criteria taken into consideration in terms of logic for the specific block of code?
  • Are there duplicates that can be extracted into a single generic method?
  • Are there comments explaining complex logic?
  • Is the software framework used in the most efficient manner?
  • Are there any obvious performance challenges?
  • Has security been thought about?
  • Is there appropriate error handling and input validation?
  • Are appropriate unit tests written? 
  • Does it conform with the rest of the application, in terms of coding style, architecture, etc.?

We typically use comment threads in a pull request to write the comments and to approve the code. When the code reviewer presses submit and sends their feedback, you might assume that it’s a collaborative process where everyone is learning from each other. Sometimes, however, developers get offended or discouraged when receiving comments on a pull request.

The Developer

As the developer, here some best practices to follow when receiving a code review:

  • Ask the reviewer to clarify any messages that aren’t understood
  • If you don’t feel comfortable asking the reviewer, ask another colleague that you feel more comfortable with
  • Discuss any questions face-to-face or on a video call
  • If there is a disagreement on any code, keep an open dialogue to work toward a mutual agreement
  • Bring in mutually respected colleagues or a team leader to help resolve any disagreements on code review

The End Game

The reviewer and developer hold an equally critical role in developing clean code. Each developer is different with their personal style of writing code, so every team needs to have an united vision in both of terms of business, architecture or coding style. Likewise, the reviewer might hold their unique way of reviewing code and providing comments. Fostering the mindset of great teamwork and collaboration will inevitably allow both the reviewer and developer to work toward the common goal of building the best possible software, every time.

 

To read more about DevOps best practices, read our latest ebook, Succeeding with DevOps.

Looking for Devops Tools or Solutions?

Recent posts

7 Tech Trends for 2019
New Opportunity…or New Nightmare? A Developer’s Guide to Switching Technologies
Do You Really Need a Mobile App?
2018 in Review - Top 3 Blogs of the Year
The Path to Tech Entrepreneurship: An Interview with Carl Turner

 

Share this article

 

About the author

Oana started working in the IT industry really fast, right after finishing her first year of university, at the age of 19. Initially she worked as a test engineer, but after a year she made the transition to software development. Since then, she strives each day to write better code than the day before and enjoys working with the latest technologies. In her spare time, she enjoys doing triathlons, karate, trail running, and backcountry skiing, having already finished some Ironman 70.3 distance triathlons.
Ready to partner with an expert in custom software development? Learn about our fast, cost-effective approach to creating world-class software solutions.
301 N Main St, Winston Tower, Suite 2206
Winston-Salem
NC
27101
USA
Republicii 24
400015 Cluj
Romania

The Small Footprint Blog

Keeping up with the latest in custom software development? Visit Small Footprint's blog for expertise, insights and innovative software strategies.