Code Review is Critical
Code review is an important part of software engineering. It provides the opportunity to improve the code base, learn something new, and practice giving and receiving feedback.
A Clean Code Base Is A Happy Code Base
As a software developer, your number one priority is to add to the application in a positive way. If you were authoring a book, you would have others read it before going to publication, in order to prevent misspellings and ensure a cohesive train of thought. Code review is your opportunity for another developer to help you prevent errors from reaching production. The goal is to produce a solutions that works, is easy to understand, and is easy to maintain in the future.
Learn Something
Software development is a complex mix of art and science with many possible solutions to any single challenge. Code review affords the opportunity for someone with a different background to provide their perspective on your solution. The reviewer may know a special language construct, an existing function in the application, or something about the business case, that enhances your solution making it cleaner or more robust. You can't know everything but this is your opportunity to learn something.
Feedback: The Good, The Bad, The Ugly
Giving and receiving feedback is an important skill. Code reviews give software engineers an opportunity to master this skill.
Giving a Review
As the reviewer, you must ensure this code change improves the code base. You must not crush the hopes and dreams of the code's developer. To achieve this balance you will need to mentor the developer by being empathetic, asking thought-provoking questions, and explaining your reasoning.
Receiving a Review
When you take ownership of the code you create it can be difficult to have someone else criticize your work. To get the most out of a code review, listen, keep an open mind, and look for opportunities to improve your knowledge and skills as a programmer.
Learn More About Code Reviews
- How to Make Your Code Reviewer Fall in Love with You
- Google Engineering's Code Review Developer Guide
- Good Code Reviews, Better Code Reviews by Gergely Orosz
- The Engineering Manager's Guide To The Code Review Process (Pluralsight)
- Code Review — The Ultimate Guide (freeCodeCamp)
- Expectations, Outcomes, and Challenges of Modern Code Review (Microsoft Research)
Dan, thanks for sharing!
Helpful perspective, Dan!