I have noticed the same thing. Personally I disagree with code edits, but I would like to know what others think..
Recently I have received many useful suggestions in comments, some of which have been wrong. For example on this question https://codegolf.stackexchange.com/a/26330/15599 this user https://codegolf.stackexchange.com/users/...
It is not ok to edit to golf an answer
if you are going to golf someone else's answer (this doesn't happen much, it is usual to see people leave a TIO link with the golfed version or a hint on what to do).
Users should not edit code by other users. Even if an edit seems correct, it might not work with the original computer. Golfers like to make nonportable assumptions which are not true with every platform, or with every version of a programming language.
Suppose I write sed(1) regular expression /[0-9][0-9]*/, matching one or more digits. Another user wants ...
I thought I might as well turn my comment into an answer:
If you really can't find enough to improve to add more than the two bytes for the space and the version number, just leave a comment. The author of the post as well as high-rep users don't have this 6-character limitation, and someone will likely take care of it.
Please do not make this type of edit.
Firstly, this is a matter of personal opinion. You shouldn't be editing posts for style. There is no benefit that can come from changing "color" to "colour;" that's solely a matter of personal usage, and there's no reason to change it from one person's particular usage to that of someone else. Similarly, swapping ...
I personally enjoy these syntax coloring edits. Several of my posts have been edited to include syntax coloring, and they became much more readable.
On a side note: before reading this post, I edited a large number of posts to include syntax coloring. Perhaps I should have done it at a smaller amount at a time.
I was about to write this as a comment, but to give it more relevance I'm writing this down here.
I actually appreciated it when he edited one of my answers; It made it more readable and understanding. It was a real eye-saver for anyone who wanted to give it a serious reading.
Since he's not bumping posts I don't think there's anything wrong with it. As ...
It is ok to edit to fix code formatting
If you are fixing formatting issues, for example multi-line code that isn't properly formatted:
s = "hello world..?"
s = "hello world..?"
or if you are fixing mathematical formulas/variable references that lacked formatting and thus blend in too much with the text, e.g.
you will receive ...
What can I do to avoid these kind of edits, apart from posting my complaint here?
Put them in the right order to begin with. ;)
I'm kidding, of course - you're free to put them in any order you like. If someone does that once or twice, I wouldn't worry about it and just reject/rollback the edit. If they insist on it, and either start a rollback war or keep ...
Technically speaking, you can, as one of the official reasons to edit an answer is to
▶ add related resources or links
That being said, here at Code Golf Stack Exchange, we're quite conservative about editing others' posts, and instead prefer leaving comments so the post author can decide what to do about it.
Note that in any case, until you reach 2000 ...
It is ok to edit to fix typos
If you are fixing minor typos or any other minor, self-contained, English-related issue that you won't change the meaning of the OP's sentences.
Consider pinging the OP if you feel tempted to change more than a couple of words, as matters of style, preferred spelling, etc are all subjective. (c.f. Mitchell Spector's comments ...
Ok, lets enumerate some points:
Initially when I saw java answers, the lack of syntax coloring really makes the code horrible. By editing them it becames a lot better.
Quickly realized that this is not only a problem of java answers. This is a general problem. The syntax coloring is a good thing, and if no one starts that no one does that. This is a reason ...
Correct me if I'm wrong, but how often do really old posts show up on the front page? Unless you keep editing them, not very often. So, now that the new decree has been set in place, let's just ignore the old posts and apply the policy to the new ones. I'm not saying that you're not allowed to edit a single post, but don't go looking through ...
But only if you don't bump many challenges. Note challenges rather than answers, feel free to bulk update all the answers to a challenge as that effectively only bumps one challenge once. It's one thing to have an old challenge near the top but a completely different story when it's dominated by them. This is our policy when doing major tag edits ...
There's nothing wrong with editing your answer a bunch of times. I've done that before, and other high rep users have done that before.
If anything, I think these answers are more impressive, since it shows the author is not just in it for the FGITW (fastest gun in the west), but that they're very competitive and keep coming back to the answer to shave off ...
If I have a solution in a different language, I would post a second answer. So would I do, if I have an answer in the same language, but involving a totally different algorithm/technology/way of doing things.
But that's just my opinion, and how I do things.
You might pick options 1 or 3. There isn't really a point in deleting an answer just because it's not ...
Yes, I think that would be a good idea. New users cannot comment on submissions and editing may seem like the obvious solution so a clear statement advising otherwise seems appropriate. If edits aren't allowed then why not get rid of that functionality?
Personally however, I find it more harmful for users to be submitting incorrect submissions, getting ...
It's not OK to add an explanation of the code
That should be left to the author. Explaining the code is a sensitive area. You can't be sure that your comments exactly reflect the author's intent. There may be subtleties you are missing when interpreting the code written by another.
Only moderators can edit revision history comments, including the comment for a rollback.
If you'd like to rollback with a custom comment, go into the revision history of the post and use the edit link on a specific revision:
This will bring you to the standard edit page (in which you can enter a custom comment), but containing the contents of the revision ...
While the whole community can edit all posts (or, at least, suggest it), most posts still have a single owner. Editing a post should be used to improve it in obvious ways that do not require the author's consent (fixing spelling mistakes, improving grammar, adding useful information such as a permalink or a leader board snippet), but never in ways that may ...
It is OK to correct the header of an answer
Correcting the score of an answer to match the challenge's scoring rules
Adding header markup to an answer whose header lacks it
Adding a bytecount to an answer that lacks one
If the rules of a challenge require some answers to be marked non-competing, adding that annotation to answers that lack it