Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Sameer
Sameer

Posted on

Discuss : What is A Code Review? (PR)

Since so many days a Topic is in my mind. I would like to know, what is a code review for you?

  • Syntax and code quality check

  • Business logic check

  • Both

How much important is each topic?

How a usual code review looks like for you?

Please share your views and thoughts!

Top comments(4)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
cubikca profile image
Brian Richardson
I am a cloud application architect with 10 years' experience in software development in several languages, including Perl, Java and C#. I'm an Irishman living in Calgary, Canada. GitHub on @cubikca.
  • Location
    Calgary, Canada
  • Education
    BSc. Computing and Info Systems, Athabasca University
  • Work
    IT Architect at Olympia Financial Group Inc.
  • Joined

PR review is a peer review. The reviewer ensures that the proposed diff addresses all requests in the story, and looks for code that doesn't belong to the story. They also desk-check it for any obvious errors. This is one end of the spectrum.

On the other end, I've also suffered through "team" code reviews, which can occasionally be useful, but mostly are uncomfortable experiences that don't encourage two-way communication and are an inefficient use of time.

The purpose of code reviews in our organization is as a general control. A developer cannot deploy without peer review, and this is enforced by Azure DevOps - you cannot publish to master without PR, and PR cannot complete without approval. While the idea of a team sharing session where ideas about coding are shared seems appealing, it doesn't seem to work that way in practice. Daily standups seem to be a more effective method of team communication.

CollapseExpand
 
cricketsamya profile image
Sameer
Senior Software Engineer with 10+ years of Java Stack Experience.
  • Location
    Berlin, Germany
  • Education
    University of Applied Sciences, Hof
  • Work
    I work with JVM
  • Joined

I agree! But my question is more like, what is more important when Peer review is done? Business Logic (Here we assume UNIT Tests and Integrations Testing had already checked the logic with Amazing tests?) or Anti-Patterns, Design flows etc?

And what if the Reviewer how asks for changes has no knowledge about logic?

CollapseExpand
 
cubikca profile image
Brian Richardson
I am a cloud application architect with 10 years' experience in software development in several languages, including Perl, Java and C#. I'm an Irishman living in Calgary, Canada. GitHub on @cubikca.
  • Location
    Calgary, Canada
  • Education
    BSc. Computing and Info Systems, Athabasca University
  • Work
    IT Architect at Olympia Financial Group Inc.
  • Joined

I don't think there's any specific criteria that I check off when I review code, no more than when I help someone edit their business documents. Feedback from a code review might range from "please fix your indentation" to "I think this design doesn't work very well because...", or even "this is not the best library to use to do that". And of course "I think this feature is missing" or even "this code has a bug".

I guess if I had to pick something though, business logic is more important. While technical details like the ones I mention above are important, what I'm really looking for is whether the code solves the problem in the story. Stories rarely address technical details like what library to use or what application architecture to align with, so while I would comment on the library and architecture, the review is much more focused on the business logic.

Thread Thread
 
cricketsamya profile image
Sameer
Senior Software Engineer with 10+ years of Java Stack Experience.
  • Location
    Berlin, Germany
  • Education
    University of Applied Sciences, Hof
  • Work
    I work with JVM
  • Joined

Thanks a lot for your inputs! I completely agree!!

I always end up with some reviewers, with whom code indentation is more important than the business logic.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Senior Software Engineer with 10+ years of Java Stack Experience.
  • Location
    Berlin, Germany
  • Education
    University of Applied Sciences, Hof
  • Work
    I work with JVM
  • Joined

More fromSameer

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp