1

Editing questions, apparently a lot of contributors improve readability of code samples, not only correcting whitespace. Their edits make use of their domain knowledge. E.g. upper and lower case in Apex and SOQL like here:

enter image description here

While I agree it improves readability, I tend to dislike such measures. (I'm currently skipping such cases.) It makes it more likely to introduce errors. It is often inconsistent.

In addition to that the proofreader changes the code necessarily without explanation, if she/he changes the code at all. The original author might not understand this change.

On the other hand I've modified cited code myself. E.g. I've added "S" at the beginning of a code example, because due to copy/paste sloppiness it started "tring s = 'something'".

Where do you draw the line?

2
  • I think you left out a word or two in this sentence: "It also makes the original author looking at code, which is altered without explanation." Or I'm just not understanding what you are trying to say about the original author.
    – Moonpie
    Oct 26, 2022 at 12:34
  • 1
    @Moonpie, I've replaced this sentence by a clearer paragraph. Oct 26, 2022 at 14:59

1 Answer 1

5

I've never consulted anyone, nor seen an SFSE "standard," so I just take it on a case-by-case basis.

I, myself, do like those measures, so if I came across your example while reviewing, I would "accept the challenge" and would look at it very closely - in order to make sure that it did not seem to introduce any errors as you mentioned. If it did not, then I would approve it.

But there are other types/categories of edits about which I feel similar to the way you feel about this type/category. When I come across those, I do what you are doing with this one: Skip. That way someone who has been doing this longer or feels more comfortable making a decision can approve or reject.

So I think you are doing the right thing - if you don't know where the line is, skip it, and let others make that call.

The good thing is, the author can always post a comment asking about an edit, or just roll it back if they think it made significant changes to their original intent.

You must log in to answer this question.

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