5

I tried twice (sorry, didn't see the first rejected edit) to edit an answer that had a small typo and a small "bug". The "bug" was that a parameter is passed to the function but never used in it.

However, they were rejected by the community :

https://stackoverflow.com/review/suggested-edits/2304606

https://stackoverflow.com/review/suggested-edits/2451513

I read that "Edits are meant to-

  • to fix grammatical or spelling mistakes
  • to clarify the meaning of a post without changing it
  • to correct minor mistakes or add addendums / updates as the post ages
  • to add related resources or hyperlinks

I believed this was what I attempted to do. I don't think my edit changed the content of the answer.

Any insight on what was wrong with the edit would be appreciated.

  • 6
    Functional edits to the code are often rejected by the community (but often accepted by the OP). The community can't guarantee that the OP wanted the code to do this so they reject – Richard Tingle Jul 9 '13 at 16:29
  • 9
    Situations like this are better handled by leaving a comment explaining what you think the code change should be. – user102937 Jul 9 '13 at 16:30
  • 5
    Declarative sentences end in one period. There is no space between the last word in a sentence and the punctuation mark. "sry" and "thx" are not words. Please take care of your own posts before trying to edit other people's answers. – Bill the Lizard Jul 9 '13 at 16:34
  • 1
    possible duplicate of How to handle corrections to answers? – Gilles 'SO- stop being evil' Jul 9 '13 at 16:41
  • 6
    @FabienTheSolutionRacine If you don't thing using appropriate spelling/grammar and a quality formal writing style is appropriate then you're going to have problems using the site, much more so if you plan to edit other's posts. If you plan to be sarcastic and combative when someone is trying to help you then you'll have that much more trouble here. – Servy Jul 9 '13 at 16:42
  • 1
    edit others' posts... ;) – Joe Jul 9 '13 at 16:43
  • 4
    Your English is excellent for a non-native. But abbreviations like "thx" are not welcome in this community - Im also sure whoever taught you English didnt teach you these sort of abbreviations. – Jamiec Jul 9 '13 at 16:46
  • 1
    WOW ! So constructive as answer...Thx for nothing ! All things considered, I have to admit, I do think that's funny. – Bill the Lizard Jul 9 '13 at 16:49
  • 3
    Fabien, you should understand that no one is here to attack you and that you should not take the posts personally. Almost everyone here is a volunteer, and many have committed considerable time and effort to making the community what it is today. Personal attacks and emotions don't really have a place; the commentors are merely trying to help you understand how the site works and to help you avoid pitfalls that will make your experience less enjoyable. – George Cummins Jul 9 '13 at 16:53
  • 2
    Despite your righteous indignation, we are trying to be helpful here. You wouldn't like it very much if we butchered your native language. – user102937 Jul 9 '13 at 16:55
  • 3
  • 3
    @Robert Oh dear lord. Say it ain't so. – George Cummins Jul 9 '13 at 16:57
  • 1
    @George Cummins I understand this. But answer like "Please take care of your own posts before trying to edit other people's answers." is a little bit rude and look like a "personnal attack" on what I'm trying to do. – solution4you Jul 9 '13 at 16:58
  • 1
    @Fabian, the post you were editing has lots of grammatical problems. Your edit changed the code, which as we say, isn't generally accepted. It didn't touch the grammatical errors. That's a problem - we'd prefer that suggested edits focus on cleanup, and handle most, if not all, of the problems present. – Michael Petrotta Jul 9 '13 at 17:02
  • 1
    @Fabien I understand why it feels that way, which is why I asked that you look at the bigger picture. Almost everyone involved (here on Meta more so than elsewhere) is trying to make sure that the site is as helpful as possible to as many people as possible. It is for that reason that personal responsibility was advocated. I am sorry if that feels like a personal attack, but I am sure that it wasn't meant in that way. The only goal is to make sure that all posts (yours, ours, and others) are as clear and helpful as possible within the site rules. – George Cummins Jul 9 '13 at 17:03
2

Functional edits to the code are often rejected by the community (but often accepted by the OP). The community can't guarantee that the OP wanted the code to do this so they reject since changing the function of the code (even to function better) is to change the original meaning of the post. Fixes that correct simple compiler errors etc are usually accepted however (eg a missing semi colon at the end of a line in java).

Generally code improvement should be a comment not an edit

1

Among other things, approving edits is done by people who often don't have any knowledge of the subject matter. It's much better to post answer changes that involve actual code (not just formatting) as comments, and encourage the original poster to modify the answer; otherwise it would be very hard for approvers to verify the edit (as if it's an edit to some C#, and the reviewer is a HTML/CSS guru, he/she may well have no idea if you need a semicolon there or not).

This is also true for questions, although to a lesser extent; it's somewhat more permissible to make a functional change to a question, as long as its intent is clarification. Code in questions still should not be changed (in particular as that's often the problem in the first place!) and those changes should be in comments or in an answer (if that's the problem with the OP's code).

You must log in to answer this question.

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