In this answer, the author decided to add a suggestion from the comments. The interesting part is that he just added his whole code again (but this time doing the minor change fix from the comments), leaving two almost exactly code blocks of text.

I have reasons to believe this is wrong, I am sure nobody likes to play "spot the differences" between two blocks of code. This is clearly wrong and reflects an incorrect way of properly using the edit feature.

I hesitated on taking action based only on my own judgment since the answer has 67 votes and have been exposed 75,717 times to visitors from all around the world. I honestly don't think I am capable of taking the correct (and important) decision here alone.

What should be done in these cases?

  • I may be missing something, but I really don't see what's wrong here. – yannis Aug 11 '12 at 23:21
  • Are you saying that the result is hard to read? Then yes, I agree. It's just the same 12 lines of code block twice, with only a difference in line 7. I think that's a nice example for When is “EDIT”/“UPDATE” appropriate in a post? But then I don't know either if both snippets are supposed to work, or if the 1st is actually wrong... (Or, like I thought when reading your post without viewing the linked answer: are you saying that the author should not have included the comment at all?) – Arjan Aug 11 '12 at 23:31
  • 1
    In this specific example, it was easy to leave a comment for the author (always notified) and one specific commenter (also notified when using @). (I did that now.) – Arjan Aug 11 '12 at 23:39
  • I'd +1, but I'm out of votes for the day :( – jmort253 Aug 11 '12 at 23:59
  • @jmort253 You posted that comment exactly 30 seconds before the new UTC day ;) You have lots of votes now... – yannis Aug 12 '12 at 0:06
  • @YannisRizos - lol. Why did I think that would be 6pm my time. Whoohoo! I'm back! +1 +1 +1 – jmort253 Aug 12 '12 at 0:17

The point of editing is to improve a post. If there are typos, then we should fix the typo. In this case, the poster pasted a new version below the old version, with just one small subtle change.

Considering Stack Exchange maintains a list of old revisions, if anyone needed to see what the correction was, he or she can merely look at the revision history.

This is noise, and the correct action would be to remove the first block. Conciseness is one of the main attributes that make this Q&A format such a success.

With that said, I like your approach of consulting meta for edge cases where you're unsure of when or how to take action. Good luck! :)

  • 1
    but what if the second block is wrong?, he don't seem to have fully tested it "I think Adam is right". – ajax333221 Aug 12 '12 at 3:43
  • Hmmm, I see your point now. The edit was made 2 years after the original post. Additionally, another year and a half has passed with both snippets. It has 67 upvotes. We can't see when the upvotes were applied, but I think it's safe to assume they were spread out since Jan 2009. Maybe an edit explaining that the other snippet was added 2 years later would be appropriate, so others don't get confused and try to "fix" it. I hope this helps, as this is truly a unique situation... – jmort253 Aug 12 '12 at 4:11
  • As an aside, one can in fact see when the votes were cast. It seems that only about +10/-1 were cast before the change? (Sometimes the API can be useful, but not so much in this case.) – Arjan Aug 12 '12 at 8:12
  • 1
    If someone feels like testing the code to see which works, that would help decide what to do... Really, that's what editing is all about and where technical expertise sometimes comes into play when situations like this arise. – jmort253 Aug 12 '12 at 19:33
  • @Arjan et al. I can confirm that the revision to the code is correct. Using offsetParent can yield incorrect figures in some edge cases. I removed the first code block and tidied the answer a little. – Andy E Feb 8 '13 at 19:00

You must log in to answer this question.

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