What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

I like the new extra-specific notifications, such as "Code in your answer to Iterating through a map randomly causes segfault was edited" which relates to revision 2 of this question.

However, actually, this is not true. No code was edited, though the new text does contain a single word between backticks.

It seems like the notification shouldn't have talked about code.

share|improve this question
In both case, new code is added to the post. – nhahtdh Jan 29 '13 at 16:05
@nhahtdh: Sure, but no "code in my answer" was edited, since there had not been any. – Lightness Races in Orbit Jan 29 '13 at 16:13
I just point out the similarity in the 2 cases. Whether it is good to notice the user about this or not, I leave it to the admins to decide. – nhahtdh Jan 29 '13 at 16:14

2 Answers 2

First off, it says code was edited in your post simply because it's quite hard to determine whether or not code was actually edited in your code. It may not be in this specific case, but in general it is. There are many minor things in Markdown that could cause something to be rendered as code, or become rendered completely different as code. Trying to pinpoint exactly whether code was added, edited, or removed is way too much effort and would result in too many inaccuracies, and simply determining whether or not something within code was changed between the original and new versions is much simpler, much faster, and less error-prone.

Now, is this information useful? I'm not really sure. I don't really see any direct advantage to telling someone that code in their post was edited, versus just telling them that their post was edited. Chances are a person who would go check on their post from being told it was edited would also check it if they were told, specifically, that code was edited. As well, someone who would not check when told their post was edited probably still wouldn't check if they were told code was edited.

With no real, visible advantage for having this alternate notice, added to the confusion that it sometimes causes, I propose that the alternate message simply be destroyed and that it only notify users that their post was edited, simple as that. If a user really cares enough to know how their post was changed, they'll visit it to find out.

share|improve this answer
If it's intractible to detect whether code was changed, then the notification should go back to just saying that the post was changed. As it is, it's basically lying. On the other hand, I dispute that it is difficult; Markdown is a regular language and there are a finite number of ways to produce code blocks (two, actually). I don't see any reason that the engine shouldn't be able to identify text that was altered in a code block. – Lightness Races in Orbit Jan 29 '13 at 18:09
@LightnessRacesinOrbit: Did you finish reading the entire post? – animuson Jan 29 '13 at 18:10
Yes, I did. Thanks for asking. I was agreeing with you. – Lightness Races in Orbit Jan 29 '13 at 18:10
@LightnessRacesinOrbit: As for determining if code was edited, it's not an issue with Markdown, but an issue with determining the differences between the two posts. It's not perfect, and sometimes the diff algorithm can even mess up on simply determining if code was edited. There are minor instances where the diff algorithm will miraculously determine that the entire code block was removed and then an entirely new code block was added, even though the code blocks themselves were exactly the same. Diff does some amazingly weird things. – animuson Jan 29 '13 at 18:14

Backticks are used to represent code; that is their purpose. So code was added to your post. Existing code was not edited, true; it is certainly more correct to say that code was added instead of edited, but saying that it was edited isn't strictly wrong, it's just more general. (One could argue that an empty code block was edited to be non-empty, if you want a technical justification.)

In any event, it appears to have been determined that it's unimportant to distinguish between code added, code removed, and existing code edited; they all fall into the same category of edited code, and conveying just that was the intent of that message.

share|improve this answer
I know what backticks do. – Lightness Races in Orbit Jan 29 '13 at 19:04
@LightnessRacesinOrbit Okay, so then what's your main problem with the notification text? Do you not agree that backticks represent code, do you think it should have said "added" and not "edited", or what? – Servy Jan 29 '13 at 19:06
From the question: "However, actually, this is not true. No code was edited". If you can find anyone who disagrees that backticks represent code, I'll be surprised. :) – Lightness Races in Orbit Jan 29 '13 at 19:15
I guess I'd like to see the notification in this case probably just say "your answer was edited". But, not strictly here to suggest an alternative, I just wanted to point out that this text is, IMO, buggy. – Lightness Races in Orbit Jan 29 '13 at 19:16
@LightnessRacesinOrbit But code was edited in your answer, since you agree backticks represent code, and text in backticks was added to your answer. You could say that it's not useful to add the information that code was edited, but it's certainly a correct statement to make about that edit. – Servy Jan 29 '13 at 19:18
It is impossible to take my answer, find code in it, and edit that code, when the answer does not contain code. When you say you've "edited something", the "something" refers to the source text, not the outcome of doing the editing. – Lightness Races in Orbit Jan 29 '13 at 19:20
@LightnessRacesinOrbit So did you just stop reading my answer after the first sentence? If so, I suggest you finish reading it. Your comments indicate you haven't. In summary, code was added. Adding something is a form of editing; while saying it was added would be more precise, saying it was edited is not wrong, it's just more vague. – Servy Jan 29 '13 at 19:22
Of course I read your whole answer. By contrast you do not appear to be reading my comments. You cannot edit something that is not there. – Lightness Races in Orbit Jan 29 '13 at 19:24
@LightnessRacesinOrbit But you can edit something that is not there, in fact, that's specifically what my answer asserts is true. I'm asserting that your definition of "edited" is incorrectly narrow. – Servy Jan 29 '13 at 19:25
Ah, and now we get to the core of the disagreement. Excellent! I shall return with proof... I hope. – Lightness Races in Orbit Jan 29 '13 at 19:35

You must log in to answer this question.

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