DEV Community

Discussion on: Effective COMMENTS on pull requests

Collapse
 
peaonunes profile image
Rafael Nunes • Edited

Nice post! Those are very good points.
At Airtasker we found Conventional Comments to be very useful.
The idea is that you set the expectation around the comment before the comment. So it avoids a lot of assumptions on both parts of the reviewing process.
Everyone states clearly the objective of the comment, but also its urgency.
Your examples could look like:

question: I do not quite understand how updateClientInfo() works, could you give an explanation? Do you think it worth a brief in code documentation?

suggestion (non-blocking): We've been having some trouble with this APPLE...

suggestion (non-blocking): What do you think we call this function isBufferAvailable()...

suggestion: When this function executes with pi = 3.14, it causes a stack overflow...

We do not follow it strictly, but just by using some of its concepts improved a lot the quality of our reviews and also the empathy on both sides.

Collapse
 
tan profile image
Tan

Thanks for sharing Rafael! I will definitely use this for future reference.