20
$\begingroup$

Can someone suggest why this suggested edit was rejected?

It was rejected by two reviewers with the same reason:

This edit does not make the post even a little bit easier to read, easier to find, more accurate or more accessible. Changes are either completely superfluous or actively harm readability.

I have occasionally had edits rejected by reviewers who seem to simply reject most of what they see. But neither of these reviewers reject often.

I have read through this post, but failed to see how this edit failed those criteria.

So, that leaves me wondering, where I went wrong here, since the code in the post, as currently indented, is just wrong. It will not function. I see this particular formatting error often as Python is picky, and how to indent code in post the editor does not seem to be intuitive to many new users.

Since I have editing privileges on the sites I am most active on, I generally don't think twice about editing these sorts of things on fresh posts. Should I revisit that on CV? Is there something else specific to this site I am unaware of?

$\endgroup$
6
  • $\begingroup$ I wasn't one of the rejecters but if I was to review it, I might well have been tempted to reject (and would then have chosen the same reason). I don't think the change to the code indenting helps in any substantive way, it looks more like a stylistic preference. Setting that aside, what's left seems to be too small for an edit, and perhaps could even be seen as more of the same stylistic preference. $\endgroup$
    – Glen_b
    Jan 23, 2018 at 6:03
  • 16
    $\begingroup$ @Glen_b, But it is not stylistic. Python cares about indenting. So the lack of indent means that the code is wrong. Anyways thanks for the response, I will assume you a statistically representative sample of those hang out here. I assumed it was likely due to the lack of Python Knowledge, and since we are all doing the best we can, and none of us knows everything, it is what it is. If no else responds and says I was egregiously wrong, I will keep editing things I look at that need it, when I wander by... Cheers. $\endgroup$ Jan 23, 2018 at 6:19
  • 2
    $\begingroup$ Yes, this is a great point; I didn't even notice that it was Python code to be honest; while I'm aware that Python cares about indenting I didn't pick up that this is what it was from a quick look. $\endgroup$
    – Glen_b
    Jan 23, 2018 at 7:16
  • 9
    $\begingroup$ IMHO this was a good edit and it was rejected wrongly. Mistakes happen I guess. Thanks for your efforts! $\endgroup$
    – amoeba
    Jan 23, 2018 at 7:58
  • 6
    $\begingroup$ I quite often fix code indenting even in curly bracket languages to improve readability. I don't think it's a valid stylistic choice to not indent code correctly. I'm a bit surprised this puts me in the minority, but so it goes. $\endgroup$ Jan 23, 2018 at 21:17
  • 1
    $\begingroup$ The particular question is still unchanged and with the erroneous Python code. I would be happy to redo the suggested edit but maybe (I don't know) a person with more rights, or an administrator, can approve the previously rejected suggested edit (that would be more clean I guess). $\endgroup$ Jan 25, 2018 at 12:51

1 Answer 1

20
$\begingroup$

Some code formatting changes can appear to be purely stylistic in nature, and reviewers may well reject them for this.

Sometimes the improvement is obvious (for example if code hadn't been correctly put into a code block) and the edit is likely to go through, but changes in indentation generally look stylistic and we tend to leave purely stylistic decisions to the original author's discretion - hence a rejection is likely.

However, you can't expect that an edit to a piece of Python code will be read by a Python expert. In fact, even though the most common language used on Cross Validated is R, several of our most regular reviewers are not R users - so in that case, I don't think there is a single language where it is safe to assume that code edits are going to be read by someone fluent in the language!

This is somewhere I think it would pay to be more assertive in your edit comment. I always read the suggested edit in conjunction with the comment. You put:

Comment: indent code so shows correctly

The "correctly" is suggestive that the change is more than stylistic but I think you could have emphasised more the consequences of the code remaining in its current state. Note that some people hold strong views about indentation and style guidelines to the point at which they view other indentations as "incorrect", which isn't the kind of conflict that edit reviewers want to get involved in. I think you need to make it clearer that the displayed indentation was affecting the code's functionality, for example:

Comment: displayed indentation won't work in Python

(I invite other people to edit this suggested comment, or propose alternatives, to make the point more clearly.)

$\endgroup$
2
  • 17
    $\begingroup$ +1 These are the right recommendations. We ought to emphasize that reviewers are under no obligation to make decisions: the "Skip" button is always available. Leave the decisions to people who understand what's going on. $\endgroup$
    – whuber Mod
    Jan 23, 2018 at 16:32
  • 3
    $\begingroup$ Great Advice, and a Great Answer. THanks for taking the time to write this up. I will endeavor to add better explanations when doing suggested edits..... $\endgroup$ Jan 23, 2018 at 16:37

You must log in to answer this question.

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