-4

You could consider this a followup on my previous question on comments to q/a. TL;DR: I asked whether it is good to refactor valuable comments into a question or answer. There and also in other related meta posts, the tenor was that it is indeed best practices to improve permanent content like q/a with the content of comments.


So I tried to include this comment and changed formatting and phrasing a bit to make it more readable. Knut's version:

additionally, the 3rd argument of map() is the array itself

My suggested edit:

The 3rd argument of map() is a reference to the whole array itself, so in this case myArray.


I'm still convinced that this helps the reader of the answer to understand it. It's adressing him, not "intended to address the author of the post" (quote of the reject reasoning, reference by me). Am I wrong?

Right now, I'm having 335 edit suggestions approved, and 68 edit suggestions rejected, which is about 17%. It might be half of my contribuion to SE and could still be considered fine-ish, but I definitely want to get way better than that.

4
  • Yeah, but "when I don't have full editing privileges" is exactly the "Pb"... You already got 670-Rep from your 335 Edits, you only have 300 (Approved) Edits to go...! // [If you need to compare, I have [20/21], the 1st one was a Tag Edit, that got 'Disapproved'... (I was a bit "too enthusiastic" 6 or 8 years ago, ah-ah...!)] // But honestly about your Qt (Question), pfff, simply wait until you get 2k-Rep and don't go "fighting" for every/any Edit that gets 'Disapproved'... High(er)-Rep-Users doing the Queue Reviews are really "doing their best", especially right now during "the Strike"...
    – chivracq
    Commented Jul 11, 2023 at 8:39
  • 1
    I'm not trying to discuss or critizise. I'm trying to understand what I might have done wrong. I also don't see anything wrong with gaining rep from edits. Reputation is a measure of trust you gained via your contributions. You can be a part of this platform in many ways. One of them is by answering, another is by improving other answers. The same is true for questions. If content and quality is the main goal for this site, something like the reputation here seems to be a fitting metric.
    – Cadoiz
    Commented Jul 11, 2023 at 11:53
  • 1
    Your example edit it what I would consider to not be substantial enough to warrant approval. Commented Jul 11, 2023 at 14:25
  • 1
    Yeah, but in this specific case, Thread already has 170k Views, that Answer is at +50 (and 5y old), the "OP" in your Edit Summary is a bit "confusing", it's a long Thread with 16 Answers, the Reviewers need to read the whole Thread to decide if your Edit is justified or not, and they need to be an SME (or at least have some expertise in the Tag)... Let some 2k+ User with expertise in the Tag do the Edit "organically one day", ... which just happened actually... (by 'KarlK' who answered this Qt).
    – chivracq
    Commented Jul 11, 2023 at 16:00

1 Answer 1

7

Your edit summary may have tripped up the reviewers

A "valueable comment by the OP" is something that many people will inherently expect is "intended to address the author". "The OP" generally means the person who wrote the question, who in this case is someone else. The comment instead came from the previous editor.

The previous editor did a poor job, but had the right idea

I'm of two minds about that edit. On the one hand, there definitely is an argument that it improves the answer (by using more hygienic scoping). On the other hand, it does so by making use of an optional third argument that the original answerer doesn't seem to have been aware of. This is arguably a different technique, and the one reject vote on that review definitely has merit.

On the third hand, I generally think the site is way too strict about "preserving intent" in edit reviews overall. The point of editing content is to improve it; if the primary problem with content is that it overlooks a simple, clear improvement, then in my view we should have that improvement, even if the author of the content wasn't aware of the potential. I think we've already seen arguments on Meta about adding brief explanations to code-only answers, and some people seem opposed to that on the grounds that the author should be able to express the "intent" that the code is self-evident and doesn't require explanation. I think that's just absurd, and counter-productive.

The only other way we can get that improvement is if someone else writes a completely different answer that looks almost the same but includes the improvement; I posit that this has serious negative consequences in the long run. The only benefit is preserving the sanctity of the competition for reputation among answerers, but this is not by any means the primary objective here. We know that because a) the tour describes Stack Overflow as a library, not as a marketplace of ideas; b) the reputation system creates horrible incentives that are antithetical to all the other goals of the site.

More important than any of that, however: it's really not a good idea to improve code in an answer and then use a comment to explain why the code is an improvement - especially if that "explanation" requires context to treat it as an explanation. Someone who comes across this post later just sees a code-only answer (which is a refinement of a previous code-only answer) that doesn't highlight the improvement in any way, and doesn't say why it's an improvement; plus a comment that points out a true fact about the function used in the code, but again without any actual explanatory power.

Your edit does not resolve this problem

The inserted text:

The 3rd argument of map() is a reference to the whole array itself, so in this case myArray.

does adequately recast the content of the comment. However, it does not explain why we should care. The code can equally well be written without using this argument (by explicitly referring to myArray, since the anonymous function will close over it).

Since that third argument isn't necessary, the only sensible reason to focus on it is to discuss its use as an alternative (and give a quick justification for why it is an improvement). That more or less requires showing the code both ways.

Oh, I just noticed one more thing. Please do not use inline-code formatting for ordinary programming jargon, except for keywords that would actually appear in the code. Here, while it happens that array was the name of the parameter used in the example code, it seems clear that you intended to use the word "array" to refer to the type, not to that parameter.

I fixed it

While I support the still ongoing strike, and am not planning to return to full curation capacity any time soon, I have decided that I will continue to read Meta and take a few actions prompted by Meta. Since I have unilateral editing privileges and a reasonable level of understanding of JavaScript (and the ability to verify the code with my browser console), I went ahead and edited to give a brief explanation of what the author's original version does (and how), restate the facts that the author gave about that version, and then show the improvement. Finally I flagged the previous editor's comment as "no longer necessary", since its information is now fully integrated in the edit. I also flagged Paul's comment the same way, because I think my brief explanation of the code heads off the objection that the val parameter is unused.

Hopefully everyone is happy now.

Addressing these situations more generally

If I had encountered this proposed edit myself while it was still in review (which would require me to be browsing the main site normally), I would most likely have chosen to accept and improve the edit. Even though my version requires significant rewriting, I think that your proposal was a step in the right direction (per the above), and that these should be encouraged even if the change is "small". I agree with your analysis in this Meta question: incorporating useful information from a comment generally shouldn't be problematic.

You must log in to answer this question.

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