16
\$\begingroup\$

I am new to this site, but love reviewing code and having my code reviewed.

One thing that is always difficult for me when I'm reviewing code is to determine whether some of the points I'm making are just my opinion or are objectively better.

I would prefer to make those points anyway, while noting that they might just be my opinion. Especially because not everything is equally subjective/objective and there wouldn't be much left if I would ban out all traces of opinion.

I can imagine though that those kind of comments can spark long discussions if there are no guidelines about how to handle them (e.g. the extreme case of tabs vs spaces).

I can't imagine this issue not being handled somewhere in another question on Meta or in the FAQ, but I couldn't find it, so I've taken the risk of posting a duplicate.

\$\endgroup\$
25
\$\begingroup\$

There are all kinds of problems that can be pointed out in a code review. Good answers point out

Even the occasional "soft" questions and questions that explicitly seek opinion are useful!

With so much important stuff to talk about, an answer that merely gives shallow or controversial advice such as "you're using the wrong brace style and indentation width" is likely to be outcompeted by a more insightful answer.

My advice is, it's fine to offer opinionated advice, but only as an afterthought following a solidly grounded critique.

\$\endgroup\$
  • \$\begingroup\$ Hehe, I wonder how much rep this post will gain you :P \$\endgroup\$ – ChrisWue Jan 24 '14 at 7:47
  • \$\begingroup\$ @ChrisWue Surprisingly little, until just now. (Thanks!) \$\endgroup\$ – 200_success Jan 24 '14 at 8:28
12
\$\begingroup\$

In Real Life there's a decision to be made: do you or don't you alter the code to accept the suggestion?

It's good to know which of your own comments you think are 'mere' opinions. It lets you distinguish between, "I require you to make this change before I sign off on this change" versus "I suggest you make this change if you think it's a good idea".

The distinction is less important here: the OP is never required to accept your suggestions, and so can simply ignore the suggestions which they don't accept, instead of arguing about them.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .