The Traits Of A Good Code Review

Search for a command to run...

Thank you Víctor García Rubio! It was my first article and also my first time performing a code review. Good experience! 😁
Many developers, no matter how hardworking, find themselves facing roadblocks in their careers. Whether you're just starting out or a seasoned software developer, navigating through these common hurdles is important. This article explores some habits...
AI has transformed how I work as a technical writer. Large tech companies are developing and sharpening these tools, but some of them are better than others depending on what you want to accomplish. T

I've been writing professionally for 3+ years, and on this personal blog for 5+ years. Throughout this time, I've built a large network made of developers, other technical writers, solutions engineers

I’ve been writing online for almost five years, with a professional focus on technical writing for over two years. If you struggle to create technical content that is easy to digest, this article is for you. Where do I start? If you don’t know where ...

LinkedIn is the only social networking site purposely built to help job seekers. Over the years, LinkedIn has evolved by offering two types of experiences: Job searching Content creation This article will describe how to maximize your LinkedIn fo...

In the last 12+ months as a technical writer, I've worked on several projects highlighting three technical writing elements. This article will introduce you to: Information Architecture Docs-as-code Content strategy Information Architecture (IA)...

I've recently started a new software engineering role and performed my first code review a few days ago.
A code review is an activity carried out by software engineers, consisting of checking someone else's code and looking out for any mistakes.
Once software engineers have finished coding (tests included), the next step is to submit their code for a code review.
When performing a code review, there are some aspects to consider to ensure that the code review is conducted successfully for you and your team members.
Is the code efficient both in terms of runtime and memory? Is the code secure? Code efficiency is essential because you want the code to be highly performant and reliable. For example, look for redundant code and ensure that errors and exceptions are handled consistently throughout the code.
Is the input validated correctly? Certain parameters can only accept specific inputs. For example, can you accept negative values?
This software design principle states that designs, solutions, systems, and products work best if they’re kept simple. It means we should favor simplicity over complexity and avoid complexity as much as possible.[Baeldung]
Is there any more straightforward solution to the problem? Keeping the code as simple as possible is a great software engineering practice. Look for multiple if statements, over-complicated patterns, complex loops, etc. Take any chance to make the code understandable and straightforward.
To achieve KISS:
Remove unused methods and instances.
Write readable code.
Is the code readable and well-formatted? The code should be written so whoever comes later can easily understand what is happening. Check if variables are named appropriately and eliminate unnecessary spaces and tabs.
Did the developer pick good names for everything? A good name is long enough to fully communicate what the item is or does, without being so long that it becomes hard to read.[What to look for in a code review]
Look at the pull request and ensure the code is always cleaner than before. See if you can use better programming concepts to improve the quality of the code. Even the slightest improvement can make a massive difference.
A code review is a collaborative task that benefits you and your team. Try to make it as constructive and pragmatic as possible. Give feedback to encourage improvement and explain why specific changes can benefit the code.
I hope you've found this helpful!