DEV Community

Michael Z
Michael Z

Posted on • Originally published at michaelzanggl.com

2 1

Code reviews - Are you checking for this?

What do you look for when you review your peer's code? Is it that the new code is consistent with the existing codebase? Do you check for typos? Existence of tests? Correct formatting? Documentation? That the code logic is correct and easy to grasp?

While some of the above can be automated, these may all be important things to check in your daily code reviews.

And while developers love their code patterns and clean code, there is one aspect in code reviews that should be prioritized: The business requirements.

Take this piece of code for example:

const title = article.title
return containsProhibitedWord(title)
Enter fullscreen mode Exit fullscreen mode

Yes, suggesting that the variable "article.title" can be inlined is a good idea. But don’t let that distract you too much, as changing the syntax doesn’t fix the fact that the article body also needs to be checked.

That’s why it is important to not only review syntax and architecture, but also the actual implementation of the requirement.

Note that sometimes, it's after a refactor that you realize the inconsistency with the business requirements because the code is now easier to understand and follow.


This was an excerpt from my e-book Intent-Driven Development which will teach you how to simplify the day-to-day code you run into and the balance between over- and under-engineering. Get it over at https://michaelzanggl.com/intent.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more