36

The reopen votes queue brought this post to my attention, which has a very interesting edit history. The following edits, for example, seem very much like a conversation:

Edit by OP

I feel confused is because that, as the doc said, "In particular, there is no way to specify that input operands get modified without also specifying them as output operands.", which is certainly opposite to the example on that tutorial.

Edit by another user

(Editor's note: correct, tutorials on the Internet are not always tested and sometimes have bad code, unfortunately.)

My understanding for using the edit button is to improve a post and definitely not to use it as a chat. Thus, I have voted to leave the question closed. However, is there something more I could do, or should I do something at all, in this special case?

P.S. What intrigues me most is that the other user has a high reputation score and many badges, including gold ones, and was the one who closed the question.

8
  • 17
    Peter Cordes has a unfortunate habit of commenting on posts via "editor's note" like that., but neither edit really affects whether the question should be reopened. I'm not sure it ever really was a duplicate, but if you don't think it should be reopened then there's not much point in fixing the problems in the question unless you're going to change it so it can be reopened.
    – Ross Ridge
    Commented Nov 28, 2020 at 18:02
  • 1
    I don't think Peter was trying to have a chat in the question and I don't think the OP was trying to respond. I like RossRidge hang out in a number of these related tags but I know from experience with Peter he seems to put editors notes in and also tries to narrow down to a particular problem so that he can close questions as a duplicate of others. In the assembly tag there has been a move (and I have done it) to mark questions as a duplicate of related questions (but necessarily exact duplicates) that should solve a problem. We have a ton of canonical Q&A to draw upon in that tag. Commented Nov 28, 2020 at 22:58
  • 1
    I wouldn't reopen this question because I would be inclined to close it as the duplicate of stackoverflow.com/questions/48381184/… . The answer to that duplicate is a solution that the OP can use to amend their code to solve their problem. The operands are a bit different but the reason for the failure is the same and the solution is similar. The editor notes (which I don't like to do myself) are there to let future readers know that beyond the stated problem there are other issues with the inline assembly. Commented Nov 28, 2020 at 23:09
  • 1
    The one disagreement I would have with Peter is amending the OP original code by adding the memory clobber. That in itself is fixing a problem the OP doesn't know about (and thus the editors note about it). I personally would not have made such an edit to the question and would disagree with Peter making such a material change to the original code. That should have been left to the comments. Commented Nov 28, 2020 at 23:21
  • 2
    @MichaelPetch: I would normally just leave a comment about unrelated bugs, but GNU C inline asm has proven hard enough for people to get right that bad examples are dangerous. Removing them from Stack Overflow is important enough to bend the rules by fixing bugs other than the one being asked about, or in other cases adding a comment right in the code block. Your description of my edits/notes as "narrowing the question" is good; yes that's the goal, and to make it more useful for future readers instead of a forest of confusion. The other alternative would be to just remove whole paragraphs Commented Nov 28, 2020 at 23:33
  • 2
    @PeterCordes : I hear you about inline asm. I look at those questions now & I see the problem the OP is aware of and all the ones they aren't. If I want to properly answer the question (if not a dupe) I would be inclined to write an answer that points out all the other flaws & links to other answers. Same thing with how do I call the C library functions from assembly code and then you have to explain why their stack usage violates the ABI. I think recently we tried to prod someone who gave an answer to fix the other problems so others didn't copy and paste their code thinking it was good code. Commented Nov 29, 2020 at 0:14
  • 1
    @MichaelPetch: Yup, exactly. (BTW, you're referring to this answer. It's now somewhat decent, acknowledging the issue but not explaining exactly why that code sequence combined with the buggy code in the question (that clobbers EBP) is safe in that respect...) asm has too many pitfalls for every question about one thing (that happens to have other bugs) to justify a custom answer instead of a duplicate + optionally addressing the other problems that weren't being asked about. Commented Nov 29, 2020 at 0:22
  • 3
    @MichaelPetch: Some people annoyingly decided to reopen the linked question, 2 of whom have zero [assembly] questions or answers, so are just making a mess in tags they don't contribute to. It needs to get closed again, if you'd care to do the honours. Commented Nov 29, 2020 at 12:49

2 Answers 2

6

A question is a question, not a chat between the author and editors. It is hard to read a text when you think that it is a question, written by only one person, about one concrete problem, and instead you get a conversation of two or probably more people discussing too much aspects of the problem. At least this leads to falling into category "Needs more focus".

If you are such an editor you have several options:

  • Leave a comment. The simplest tools used by everyone. Visible for every person who comes across the question.
  • Make a chat. You will be able to discuss all issues with the author without cluttering the comments section.
  • Leave an answer. Requires you to solve most of the issues to make the answer complete, may bring you rep, not available if the question is closed.

Doing edits with (Editor's note) parts is not an option. It destroys question's structure, making it unreadable for future readers.

If you see such an edit and really want to make something about it, edit the question and drop every (Editor's note) section and everything that is a reply to these sections and doesn't contain any information related to the original question.

12
  • 1
    Can you support your assertion that future readers really would have significant trouble reading / following a question with such edits? Or is that just a statement you're putting up for the community to agree / disagree with via votes? It seems like hyperbole to me. It would be better for questions not to have misleading wrong tangents in the first place, and correcting those inline is something I only do for [inline-assembly] for reasons stated in my answer. Commented Nov 29, 2020 at 18:45
  • 7
    @PeterCordes I am a future reader and I have trouble reading the question you edited. Yes, other future readers can agree or disagree with this statement via votes.
    – sanyassh
    Commented Nov 29, 2020 at 19:29
  • Do you have any experience at all with GNU C inline asm? If not, even the original version of the question (before the first editor's note) is also going to be a challenge. Commented Nov 29, 2020 at 19:33
  • 4
    @PeterCordes No. But the issue discussed on meta is not about asm, it is about how questions on SO should look and what SO users should do.
    – sanyassh
    Commented Nov 29, 2020 at 19:39
  • Actually, looking at the history again, the initial version is pretty short. But the only future value the question has is from the OP's 2nd edit, where they link an old tutorial that maybe used to be valid with ancient GCC, but isn't anymore. Commented Nov 29, 2020 at 19:39
  • If you know nothing about inline asm, then you're not the target audience for the edit. If you knew some basics, I think you'd find the edits actually useful, even though it's not SO's conventional way to present information. As I said in my answer, I very rarely do this outside of inline-assembly questions, and this specific question was not one of my better efforts. I think some of my "editor's note" edits have worked out much better, less distracting for future readers. (I still try to avoid it when there's a better option.) Commented Nov 29, 2020 at 19:44
  • 1
    @PeterCordes okay, you do it only for [inline-assembly] tag. I am a pythoneer. May I do the same for [python] tag? May [language] programmers do this for questions related to their programming languages? If so, we will end up with all of the questions consisting of such (Editor's note) sections and replies to them. It is not a good way to go.
    – sanyassh
    Commented Nov 29, 2020 at 20:35
  • 1
    Does the [python] language have Undefined Behaviour that makes it impossible to verify correctness via testing? Is it widely regarded as very hard to use safely, to the point where some of the language designers recommend not using it at all (gcc.gnu.org/wiki/DontUseInlineAsm)? My experience has been that most inline-asm beginners have misunderstandings that are actually dangerous, leading to hidden bugs that testing won't catch. I guess you could say the same about functions in safe languages that will only fail for certain corner cases, but I still think it's different. Commented Nov 29, 2020 at 21:00
  • 2
    Still, I will try to refrain from turning future questions into inline-asm tutorials. My edits on the linked question were excessive. Commented Nov 29, 2020 at 21:06
  • 3
    @PeterCordes I know something about inline asm and I find your edits make reading the original poster's question more difficult. I also find your condescending comments here unhelpful. There are countless examples of bad code in questions that could lead future readers astray in every tag.
    – Ross Ridge
    Commented Nov 30, 2020 at 3:39
  • @RossRidge: Yeah, that's a fair point. I do have to agree that the question is a mess in its current state, despite my best intentions, and the first revision was actually much better (except for the missing "memory" clobber). Probably just editing that revision to link the ancient tutorial the code came from would be best, if we want SO to have a response to that tutorial at all. Other than mentioning that buggy / obsolete tutorial, the question has no future value. Commented Nov 30, 2020 at 4:02
  • 1
    @RossRidge I still feel like there can be a place for "editor's note" edits, even if this wasn't such a place. I think trying to defend this (while other people are only looking at this question) has led to some argument at cross purposes. Or maybe I'm just deluding myself that more people would agree with me if I could make a better case. (Also mixed with wanting to defend my actions at the time, when people make it sound like what I did was obviously wrong, so I'm arguing in multiple directions. Stamping out wrong info about inline asm anywhere on SO is also a separate personal mission...) Commented Nov 30, 2020 at 4:08
21

My notes are primarily intended for future readers of the question, not the author. I try to find other ways to clean up questions because I know it's not great, but sometimes it seems less bad than the alternatives. (E.g. removing large swaths of stuff the original poster wrote because it's totally misleading and will send other beginners down the wrong track as they read this question and try to figure out if their problem is the same as this.)

The note you quoted was one of 3 I edited into that question. The first 2 were substantially more useful; I wouldn't have edited to add that last one if I wasn't already leaving my fingerprints on the question with the first two. In hindsight I agree that one about bad tutorials could and maybe should have been a comment instead. Only the OP had fallen into the trap of believing everything they read on the Internet (including the official docs and a random wrong tutorial), not necessarily future readers; simply marking as a duplicate should make it clear to everyone else that the tutorial was wrong. OTOH, there's some reason to reassure future readers that it's truly a duplicate.

I'm not claiming my judgement on edits is perfect, just best-effort attempts to improve questions (and answers). Since any post can always be improved later by others, or by me after helpful feedback like this, perfection isn't necessary. I'm pretty sure when I submitted that edit, I knew it wasn't great to be leaving this many notes, but I didn't have any better ideas and didn't want to take forever figuring out what to do. (I already have dozens of tabs of half-finished answers that I've been meaning to get back to, but sometimes "good enough" is ok, especially for a totally confused question based on one person's specific version of common misconceptions / misunderstandings that I expected to have low but many non-zero future value.)


Re: (editor's note) in general: Stack Overflow aims to be a collection of useful Q&As for the benefit of future readers.

Let me try to explain why I leave such notes in general. The one you quoted is not a representative example of them, it's a case where I mostly failed.

As @MichaelPetch described, my goal here was narrowing the question to just the one the OP explicitly asked about, to make it clear that it was just a duplicate. Assembly language especially has too many pitfalls for every question about one thing (but that happens to have other bugs) to justify a custom answer instead of a duplicate + optionally addressing the other problems that weren't being asked about.

If a question about one thing has other unrelated bugs in its example, or raises other unfounded concerns (especially about an often-misunderstood subject like GNU C inline asm), future readers will be likely be misled if they don't go digging through the comments if that's the only place such things are addressed. SO posts are supposed to be useful without the comments, in the long term.

(Or do we want to decide that comments are not ephemeral 2nd-class citizens, and are sufficient for leaving corrections to unrelated mistakes in duplicate questions that are supposed to be "useful signposts"? Because that seems worse)


GNU C inline asm is hard, and wrong examples should be exterminated

(Or at least commented on, within the same code block, to make sure anyone seeing them doesn't pick up a misconception about the subject.)

Experience has shown that GNU C inline asm is one of the most frequently misunderstood things in C / assembly. It's very easy for an asm() statement to happen to work given one set of surrounding code. If you understand asm statements, it's often easy to construct a case that reveals the bug, but without that knowledge it could go undetected for a long time until some surrounding code and/or new compiler version happen to trip over it in someone's real use-case. (Some people even fail to comprehend this fact, and will vehemently argue their code is correct because it works. Anyone who understands the concept of undefined behaviour will know that's wrong, and that constraints that don't correctly describe the asm template are a special case of UB.)

In cases where I would normally just leave a comment about unrelated bugs, I edit when it's related to GNU C inline asm, even if it's just to add a // comment about something being unsafe. (And typically I'd go into more detail in a comment under the post, unless I'm editing an answer then sometimes the explanation can go into the answer if the bug was present in the question.)

Avoiding wrong code in fragments that might actually get copy/pasted is a good policy in general, but for inline asm I go even further. Every inline asm statement with wrong constraints is a dangerous example, even in questions (where there's less expectation that code should be correct).

(There are good examples in https://stackoverflow.com/tags/inline-assembly/info)

For things other than inline asm, I'd normally just look for more duplicates for the other unmentioned bugs, and leave comments about them.

19
  • 11
    I see your point. Sometimes, when I see a blatant coding misconception, I can barely resist the urge to reach for the red pen. However, (and this is my point, so I make it bold to stand out) no matter how wrong the code in the question is, the edit should not fix it, nor review it in-place. The answer is the right place to do this. The comments are indeed 2-nd class citizens, as you say, but a comprehensive answer is perfect for the future reference and to fulfill the goal of SO.
    – scopchanov
    Commented Nov 29, 2020 at 3:33
  • 3
    @scopchanov: Duplicating the same answers repeatedly is not what SO is about. Nor is it about combining answers to separate but common bugs into unique answers to every question with multiple bugs. As discussed on Should I hammer a question by using multiple different canonicals?, the one thing we should not do is just answer about all the separate duplicate questions. I remain convinced that tweaking the question to remove or patch up things it didn't intend to ask about is the better approach, narrowing it to the one Q the OP intended. Commented Nov 29, 2020 at 3:41
  • @scopchanov: As I said in this answer, normally I'd just find multiple duplicates for bad questions with multiple bugs. But sometimes (especially when they're not really bad questions, or when the danger of misleading anyone who ever sees it is large) it seems appropriate to also or instead keep the question on track with some edits. Narrowing so it can be a duplicate of one question is an improvement. The other way to do that would be, as I said, to just rewrite or delete a lot of the question, but that's less useful and more intrusive for the OP, so this strikes a balance. Commented Nov 29, 2020 at 3:44
  • @scopchanov: Do you really want to post an answer to the question you linked? What would you say in it that isn't already explained in detail elsewhere? Or would you just summarize a couple links to other Q&As. Commented Nov 29, 2020 at 3:47
  • 1
    I mean in general, the place in not in-line, but in the answer. If the question is closed, as this one, there is already an indication, that something is wrong with it.
    – scopchanov
    Commented Nov 29, 2020 at 3:50
  • Tthere is no accepted answer to the question, you have cited, but the highest voted answer says - close it if you can or flag it. There is no mention of in-place review.
    – scopchanov
    Commented Nov 29, 2020 at 3:54
  • @scopchanov: I didn't claim my link supported editing notes into it, just that it highly discouraged your first suggestion of posting an answer. Re: closed questions: yes but closing as a duplicate implies that it's just the same problem, not also other problems. And as I argued in this answer, eradicating wrong inline-asm examples is something of a crusade that I think is justified because so many people are so easily misled by anything they read about it, and/or their intuition. Commented Nov 29, 2020 at 3:57
  • 1
    @scopchanov: Since the OP got their answer from the question already, perhaps the best thing to do is just delete it and remove the possible source of confusion. I haven't yet voted to delete, but someone has. One reason to keep it is that it explicitly confirms a specific tutorial is buggy, though. People searching after having problems with that tutorial might benefit from keeping it. (And directly benefit from the editor's note.) Commented Nov 29, 2020 at 3:59
  • "I already have dozens of tabs of half-finished answers that I've been meaning to get back to" I remember once asking meta for a better mechanism to organize things like this, I think it would be really valuable in helping answerers and encourage more and better answers.
    – Alex
    Commented Nov 29, 2020 at 11:01
  • 1
    @Alex: I'd love some mechanism where I could post a partial answer that someone else could copy-edit / build on / finish if they were so inclined. I sometimes copy/paste edits and half-written answers into text files so I don't lose them on a browser restart in case it fails to restore textboxes, but that make it even easier to never get back to them. Commented Nov 29, 2020 at 11:11
  • "optionally addressing the other problems that weren't being asked about" That's something I really despise. If we can trim down all problems in a piece to ask a novel interesting question, we should do so! Having a hub of links with a question linking to multiple duplicates makes no sense.
    – Braiam
    Commented Nov 29, 2020 at 15:18
  • 1
    "Stack Overflow aims to be a collection of useful Q&As for the benefit of future readers." That is true, but it is not Wikipedia. It is no one's place to come marching in and modify past history to make SO a better encyclopedia. In my view the entire philosophy here represents a mistaken view of what edits are for. The SO evolution mechanism is votes (cream rises), not edits.
    – matt
    Commented Nov 29, 2020 at 16:52
  • @matt: If I was treating this like Wikipedia, I'd just nuke all the wrong tangents and strip the question down to just the core thing being asked, instead of preserving it and leaving an occasional note when it's seriously misleading for future readers. That said, I think I see your point. My edits on this question are probably the most extreme example of how I've ever used (editor's note) edits, and I wasn't happy with it even at the time, but it still seems to me less bad than any alternative (including deleting the whole thing because it debugs a specific tutorial, otherwise nuke it.) Commented Nov 29, 2020 at 18:56
  • @scopchanov: In your first comment, you say "the edit should not fix it, nor review it in-place." Disagree. My edit that changed the code block from the OP's original did fix the problem of the missing "memory" clobber because it wasn't asking about that. I guess that made it unnecessary for future readers to see a note about the correction, so the first note could also be a comment. I think only the fact that it's inline-asm made me really want to leave an FAQ link. I think just fixing a separate bug in the example would have been more acceptable to more people than also leaving a note. Commented Nov 29, 2020 at 19:06
  • @PeterCordes, I understand that you disagree with me. To have own opinion is everyone's right after all. Mine is, that you did in-place review of the question and this is not right. Whose opinion comforms to the SO rules is not for me to decide. If a moderator provides an answer about how to act (or not act) in such cases, I would be happy to follow the guidelines.
    – scopchanov
    Commented Nov 29, 2020 at 20:36

You must log in to answer this question.

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