DEV Community

Discussion on: 10 Lessons Learned Conducting Code Reviews

Collapse
 
craignicol profile image
Craig Nicol (he/him)

I've always believed in having my code reviewed by my team. If they can question that, it keeps me on my toes in all decisions, because I should be reviewing every important decision with the same rigour.

I think it's also important to make the comments clear and actionable. "This logic is vague" doesn't really tell me what to do to improve it. There's an opportunity to provide an example "would it be clearer like this ..." or suggest a straightforward enhancement "nested ternary expressions are hard to follow. This would be clearer if..."

Collapse
 
jnschrag profile image
Jacque Schrag

I completely agree! Providing clear comments that are actionable is a must. We can't expect others to read our minds, and they obviously don't think it's vague/confusing/etc. because they wrote it and submitted it. I've found that I have started to write clearer code since starting reviews because I get called out on things like that, so now when I write it, I'm thinking about if others would be able to understand it from the get-go.