5

I just made a very major edit to an answer - current version (my edit) | previous revision. My rationale for editing, instead of posting a separate answer, is that the code/extension in question is the same and that the previous version of the answer, among other things:

  • was extremely verbose, containing a code dump;
  • contained copied code that's old and quite possibly broken;
  • is no longer the best way of doing things as the code in question has been made into a jQuery extension available on GitHub.

Was my edit justified, or should it have been an answer all of its own?

8
  • 5
    Leave a comment for the user stating your intent along with a link to this discussion. The edit is justified for the first two reasons. For the third one, again, you should leave a message for the original answerer stating that "since the code is now a jQuery extension, I've updated your reply accordingly, bla bla blah, you can rollback to previous version if you think it as inappropriate."
    – hjpotter92
    Commented Dec 2, 2015 at 10:01
  • 16
    Pretty questionable, read this. I can't think of a good reason why this could not be another post. Commented Dec 2, 2015 at 10:42
  • 1
    @HansPassant If I make a new answer, it will end up at the bottom of the list with the default "sort by number of upvotes" ordering, so most people who get to that question will never see it and will just use the old/incorrect code from the higher-rated answer that I edited.
    – Ian Kemp
    Commented Dec 2, 2015 at 11:34
  • 3
    Posting a comment to direct a reader to the "modern solution" is fine. Commented Dec 2, 2015 at 11:45
  • @HansPassant A comment on the current answer, or an edit to it? Because again, a comment is likely to get lost/ignored.
    – Ian Kemp
    Commented Dec 2, 2015 at 11:49
  • 11
    You have very little faith in programmers that use jQuery, I recommend you try it and you might be surprised. Not immediately, answers may need to stew for a year or two, the Googlers don't vote that often. Commented Dec 2, 2015 at 11:55
  • 15
    I'd agree with @HansPassant that it should be another answer. One reason is if that library were to disappear off the face of the earth for any reason then your edit makes the answer useless. The previous answer however gave enough to be able to build a solution almost regardless because it detailed the key steps.
    – Ian
    Commented Dec 2, 2015 at 13:57
  • Side note: There's not really a way to "contact [you] if there's a problem", as you mentioned in your edit message. Commented Dec 2, 2015 at 23:24

2 Answers 2

28

I would avoid such massive edits as a matter of principle.

The issue is that unlike Wikipedia, content on Stack Overflow is directly attributed to a user (@Dakota here). When you edit another's user post, you are changing the tone/content of their discourse, and while the post is annotated with an "edited by", it is still expected that the author agrees with the post.

Edits such as fixing typos, grammaros, removing unnecessary greetings/thanks/... are mechanical cleanup which do not alter the content, which is fine.

On the other hand, such massive edits as this one which completely change the answer are much more questionable.

As a rule of thumb, ask yourself: will the author agree with the edit?

Unless the answer is a resounding Yes, then the edit is questionable.

This is different from: would I, as the author, agree with the edit?, you need to take into account that not everyone agrees on the same things (for example, code indentation). Thus, unless you know the author well, you need to assume it is the least agreeable one you can imagine.


In your situation?

First of all, a different answer is a new answer. Post it, and you'll even get the reputation from your hard work.

As you mentioned, there is the issue that it might be buried deep past other answers (that's an issue of sorting only by votes) and therefore be ignored in favor of the most voted (and incorrect/deprecated) answer. It's a risk. As all risks, it can be mitigated:

  • you can start, non-intrusively, by posting a comment below the current top-voted answer signaling that it is incorrect/deprecated and WHY, as well as linking to your new answer; it also gives a chance to the author to fix the answer
  • if there are many comments already under this answer, you can use a custom flag on any comment (or the answer) to ask a moderator to come and clean them up, so that your new comment is not lost in the noise; beware not to ask for removal of any interesting comment (such as limitations of the answer already signaled and not incorporated into the answer yet)
  • last, but not least, a banner can be added to the other answers (wikipedia style) signalling it as being out of date and potentially linking to an up-to-date question/answer

The case of the banner is rather interesting: anybody using Wikipedia is used to having these banners, and know they most likely come from editors/curators rather than coming from the author, so you can include them in another person's question/answer without as many "philosophical" questions. However, do note that courtesy dictates that you should first comment (give the author a chance to react), before using the banner hammer.

3
  • 2
    "The issue is that unlike Wikipedia, content on StackOverflow is directly attributed to a user" - unless its made a community wiki :) Upvote for this answer, principles are a good guiding force when using SO.
    – Gimby
    Commented Dec 2, 2015 at 14:38
  • 1
    @Gimby: Indeed, community wiki posts are an exception to the rule. Commented Dec 2, 2015 at 14:40
  • 1
    +1 for "a different answer is a new answer"
    – Dexygen
    Commented Dec 2, 2015 at 22:53
-4

No.

I would request that you avoid link-only answers when at all possible, even to an official fairly permanent site such as Github.

A pair of reasons directly for my particular case:

  1. My current office has a block in the firewall policy against Github, Apache, and certain other open-source sites. Providing code, even something old and out of date is better than nothing.
  2. Extensions, add-ons, utility programs can be suspect for bringing into an environment. All of my employers thus far have viewed open-source code as potentially malicious. Corporate sponsored open-source such as Apache's POI can usually be incorporated, but small single developer extensions are a non-starter.

For your own answers that you follow-up on later, I would suggest an edit to add the link to the github repo while leaving the original code block intact.

For other people's answers, add a comment or create your own answer to the question.

3
  • He's not the author of the answer in the first place, so editing someone else's answer to completely change it, or even to add your own separate answer to the end of it, is simply not appropriate at all. This guy wasn't editing his own answer to replace the code with a link to a github with the code, he was replacing someone else's answer with an entirely rewritten answer of his own, that happened to include a link to a github repo.
    – Servy
    Commented Dec 3, 2015 at 2:18
  • @Servy I hadn't noticed that, in which case shouldn't edit the answer at all and make a new answer or add as a comment. But that's an opinion.
    – DKATyler
    Commented Dec 3, 2015 at 16:36
  • That's not an opinion, that's the explicit SE policy for editing.
    – Servy
    Commented Dec 3, 2015 at 16:37

You must log in to answer this question.

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