3 ms·
Where I work: We encourage people to mark their comments on diffs as to whether it should be regarded as a blocker to being merged, or not a blocker. (Perhaps
by ac2u 7y ago
Where I work:
We encourage people to mark their comments on diffs as to whether it should be regarded as a blocker to being merged, or not a blocker. (Perhaps poster could ask the Senior to do this)
Blockers should be comments to correct:
- code which goes against either the spirit of the spec or the spec itself, in other words, wrong behaviour.
- something which could really harm performance in a meaningful way (back this up with benchmarks)
- code which could break something else (probably a sign of a missing test elsewhere)
Non blockers should be the subjective things that are the topic of OPs post, but it's the responsibility of the reviewer to make that clear.
The committer can then decide whether to implement or not.
We couple this with quarterly patterns and practices meetings where we can discuss any of the subjective things which come up over and over again as points of friction. If we can come to an agreement, great, if we can come up with a linter rule to enforce the decision automatically, even better. Then it's removed as a point of interpersonal friction.
There's a culture I push for in the company I work for and in the teams within.
It's to try and best as possible, to check your ego at the door and regard the code as 'the companies code' rather than 'your code'.
This is important to strive for in your Seniors just as much as less-senior developers. (Rank shouldn't be blindly used as barometer of the decision whether to hear out feedback or not).
When you keep focus on the culture, working practices start to emerge rather than trying to dictate them from the top down.
- simplyinfinity 7y agoRecently we've come to the same conclusion with my team. With one small distinction, we prefix all comments with tags [nit] : i would do this differently (opinion based) (for vs foeach for example ) [tip] : for future reference you can do this in x or y way, or you can use foo framework/language feature, but your way is OK to [blocker] : possible bug,performance,security business logic issues [Q(uestion)]: what is the reasoning behind this code ( could also indicate need for documentation) the nit & tip ones we don't force anyone to fix or even address, but all questions and blockers must be answered & resolved.
- Klathmon 7y agoI've also adopted almost exactly this in all code review comments anywhere. I try to make my intentions of the comment explicit, saying things like "this is a minor nitpick, but..." or "as a tip for future changes, this can be done like..."
- Jagat 7y agoIf the comments are non-blocking, I usually accept the diff and leave it to the submitter to do as they please with the review comments.
- justatdotin 7y agoyeah I like this workflow. If I make comments, but approve, it means I'm happy to accept it as is, but you could address these simple changes before merging if you like.