18

When I search, the number one Google result for encoding ampersands in xml is:

How do I escape ampersands in XML so they are rendered as entities in HTML?

That's great, but look at the question:

How do I escape ampersands (&) in XML? I tried & but this isn't allowed.

Wait what? That is how you escape ampersands in XML. And not allowed how?

Then look at the answer:

& will result in & when rendered. Which will result in & if rendered again...

This doesn't answer the question directly, which I suppose isn't possible, but it doesn't even explain that the question is malformed.

It looks like the questioner got the knowledge they were seeking (perhaps there was some double-encoding going on), but this is a poor, confusing way to convey information to others.

This question is popular-- 450,135 views-- and was protected in 2011. And it's probably feeding on its own popularity by getting more upvotes. So our question ranking system is pouring points into what is really a poor question and a merely average answer.

Is there a way we can make this better?

11
  • 3
    Well who knows what the author's original intent really was there because too many people have edited it and changed the meaning too many times. Revision three is probably the best bet we have as far as what they actually wanted there.
    – animuson StaffMod
    Commented Aug 29, 2016 at 21:11
  • 16
    But the problem is we have what is basically a canonical answer to a fundamental question and it's just goofy. Stack Exchange isn't just transactional Q&A; it's knowledge for newbies, at which this fails. Maybe that's just what Documentation is for? But then maybe we need to back-populate old questions like this with prominent links to new Documentation entries. Commented Aug 29, 2016 at 21:16
  • 11
    Sometimes I remember when goofy canonical answers were all right, snarky comments were tolerated and Documentation did not exist. My, how does time fly. Commented Aug 29, 2016 at 21:19
  • 4
    I'm saying you can't say the question is goofy - it was never intended to be that. It doesn't make sense because the users who edited it made it not make sense. This is moreover a good example of what happens when the community attempts to clarify a question when they don't know the author's actual intent, and why the community should avoid doing that. You just end up with... this mess... where nobody knows what's going on with it anymore.
    – animuson StaffMod
    Commented Aug 29, 2016 at 21:19
  • I edited the linked question to include a sentence that the OP had included at first posting. I think without that sentence it can be hard to tell why the OP needed to have two ampersands. My answer below is reflective of what I believe the general outlook should be for creating canonical posts or Documentation in these situations if not satisfied with the current state of a post which is either being used as canonical or is highly popular.
    – Travis J
    Commented Aug 29, 2016 at 21:26
  • 13
    He author did it right and edited the question to explain the double-rendering issue behind the problem. Presumably elevated from a now deleted comment and enough of a lead for the answer. That edit was rolled-back again by a mod two years later, turning it back to goofy, no idea why. Commented Aug 29, 2016 at 21:36
  • 2
    vote to close...? Commented Aug 29, 2016 at 21:50
  • 2
    Perhaps we should redirect (close as duplicate?) to stackoverflow.com/questions/1091945/… Commented Aug 30, 2016 at 14:15
  • Perhaps we need a better way of ranking the list of Related Questions that's displayed. If the top ones were marked by the community as more related to, or more authoritative than the current question compared to the other suggestions, it could help point to a better, newer alternative for the displayed question and answers if it exists. Refining a question after the fact to match the popular/accepted answer, can cause other useful answers to become nonsequiters as opposed to just alternative (but valid) interpretations of a more general or ambiguous question.
    – BenPen
    Commented Aug 30, 2016 at 17:22
  • 2
    Oh no! Someone got points for mediocrity. Now you look bad for only having 800 rep. :( Sad day. You should see some of the other old questions that have hundreds of points for showing someone how to declare a variable and such.
    – eddie_cat
    Commented Aug 30, 2016 at 20:28
  • I'm really loving the meta effect on the edit history of the question. Commented Aug 31, 2016 at 19:21

5 Answers 5

12

This doesn't answer the question directly, which I suppose isn't possible, but it doesn't even explain that the question is malformed.

The question wasn't malformed, it was just unclear. It requires someone who know something about the subject (obviously very often the OP does not fulfill this role) and who can interpret the babbling of the OP to come to a clean, clear, answerable question.

I deem myself fit for said role and have edited the question accordingly.

Suddenly, the top-voted, accepted answer makes sense again.

This may have something to do with the various changes to the Markdown rendering on Stack Overflow over the years.


Based on comments: if your question is about the more general case of apparently vague questions that have many views and plenty of upvotes: apparently it does something right. Maybe the visitors who came through search engines do understand it better than others. So the above still applies: someone who does understand it, should edit it to make it more clear.

10
  • 2
    You've just totally invalidated John Feminella's answer and plenty of others. Also, your edited-in claim that ampersands on their own are invalid in HTML is untrue nowadays; see Matthias Bynen's careful examination at mathiasbynens.be/notes/ambiguous-ampersands. I don't think this edit was a good idea at all. Perhaps this question wasn't beyond saving, but you haven't saved it and have probably made it worse.
    – Mark Amery
    Commented Aug 30, 2016 at 14:10
  • 3
    @Mark alright, let me rephrase that: suddenly the top-voted, accepted answer makes sense again. That plenty of other answerers were merely guessing at the actual problem is their loss. That there are contradicting answers should not mean we could never edit a question anymore. As for your edit, it's a 2009 question. I edited it in that time spirit. Thank you for that link though.
    – CodeCaster
    Commented Aug 30, 2016 at 14:13
  • 3
    I disagree that the top answer makes or made sense, either now or at any point in the past. For starters, it begins by seemingly quoting something that was never stated in the question nor anywhere else I can find on the page.
    – Mark Amery
    Commented Aug 30, 2016 at 14:16
  • @Mark alright, I have butchered the answer as well. The quote wasn't actually a quote, and two thirds of the answer were commentary about how Markdown rendered the answer...
    – CodeCaster
    Commented Aug 30, 2016 at 14:43
  • This answer is not "meta" at all...
    – DevSolar
    Commented Aug 30, 2016 at 14:44
  • @DevSolar what's that supposed to mean? :)
    – CodeCaster
    Commented Aug 30, 2016 at 14:45
  • 3
    @CodeCaster: The question is "How do we clean up popular but goofy questions?". The linked question is given as an example. Saying "I fixed it" doesn't really address the question.
    – DevSolar
    Commented Aug 30, 2016 at 14:47
  • 2
    @DevSolar the entire question seems to be about this specific question (though lacking that tag, but the OP may not know of its existence...). My answer applies to the broader question as well: if a question has hundreds of thousands of views and hundreds of upvotes, apparently it does something right. Maybe the visitors through Google do understand it better than the complainers. So my answer applies: someone who does understand it, should edit it to make it more clear.
    – CodeCaster
    Commented Aug 30, 2016 at 14:49
  • 1
    @MarkAmery the original poster confirmed this was his intention at edit #3. Commented Aug 30, 2016 at 15:19
  • 1
    Now that the question and answer have been edited by CodeCaster, s/he should get rep each time either are updated, per Documentation example.
    – CubeJockey
    Commented Sep 1, 2016 at 16:13
6

This seems to be a case when the title is a bit generic, making it very good for SEO.

To me, many things can be done:

  • change the title to something more specific
  • post an answer addressing the full topic
  • edit the accepted answer in a way that makes it usable
  • award an existing good answer with a bounty that will also attract upvotes to ballance the situation
  • close as duplicate to another question that addresses the problem better

My most upvoted answer lies in Finding all files containing a text string on Linux. This question has almost 2m visits so far and it addresses a more narrow problem (the OP did not want to find all files, but to exclude some extensions as well), which the title does not reflect and makes it a very good entry point for people looking for a generic solution.

4

There are opportunities to improve this situation. Materializing them may be difficult though.

The current option here would be to create a canonical post which highlights the issue in a way which shows up in more searches and also is easier to recognize. That is essentially the hard part of creating canonical posts. Writing the in depth answer to the newly created question should be the high quality content that one would hope for in these types of situations.

That said, manually creating canonical posts for observed situations like this is complicated. It can take a long time for the created post to be competitive with a highly upvoted post such as the one you use as an example. It is also highly probable that the canonical post created in earnest does not actually search very well and as a result is not seen by those who would benefit from the content.

In my opinion, this is where Documentation has some power to improve these situations. Have you considered writing an example and/or creating a narrow topic to house the example? If the situation is encountered often it would be nice to have a community collaboration on creating quality content explaining the issue. Perhaps in some cases, this documentation (as in at Stack Overflow Documentation) already exists.

10
  • 3
    Perhaps in some cases, this documentation already exists. Of course it already exists, where do you think most of Documentation's content comes from? Commented Aug 29, 2016 at 21:26
  • @FrédéricHamidi - I think that you misunderstood my sentence because I wasn't clear enough. I tried to edit in some clarification. My point was that the documentation here at Stack Overflow Documentation may already exist (as it is still being built up).
    – Travis J
    Commented Aug 29, 2016 at 21:28
  • 1
    @FrédéricHamidi - Also, related to your question, if you see plagiarism in the Documentation content you should report it so that it can be removed and so that behavior is not continued.
    – Travis J
    Commented Aug 29, 2016 at 21:30
  • 5
    Heh :) I probably misunderstood your sentence, yes, but my comment is still valid -- documentation was widely available before SO Documentation, and my personal belief is that we're reinventing (and centralizing, which is a Bad Thing™) the wheel here (with adverse effects on the rest of the site, but that's not the topic here). In other words, I do not think SO Documentation can carry the same added value as a good, old-fashioned canonical post on the Q/A side of the site. Commented Aug 29, 2016 at 21:33
  • @FrédéricHamidi - Fair enough, it is possible that may be true. it could also be that SO Docs manage to overcome some of those points. Time will tell.
    – Travis J
    Commented Aug 29, 2016 at 21:55
  • $HEAVEN hear you. It sure started on the wrong foot, though, and the tendency to "revise" older questions and the most disputable sides of the community's behavior I recently noticed on the Q/A side does not bode well IMHO... but I'm a well-known pessimist. We probably will not end up deleting useful content there, especially in favor of the Documentation effort. Commented Aug 29, 2016 at 22:02
  • "The current option here would be to create a canonical post which highlights the issue in a way which shows up in more searches..." which could be closed as a duplicate. Commented Aug 29, 2016 at 22:11
  • 2
    I don't think that creating a new post will work so long as the old post exists, because the old post has the higher search engine rating and most people who need help are using Google to find articles.
    – WillC
    Commented Aug 30, 2016 at 0:23
  • @RileyMajor - Creating a canonical post should highlight the underling concepts and not simply recreate a several sentence post. It would not be a duplicate as duplicate questions require asking the exact same question which a canonical would not.
    – Travis J
    Commented Aug 30, 2016 at 19:27
  • @WillC - That is just not the case. The canonical post will have a different title and content, ideally higher quality content with links to official documentation and naming which follows convention as opposed to the terminology used by the OP who was probably not fully aware of all the nuance involved.
    – Travis J
    Commented Aug 30, 2016 at 19:28
-1

If you want to keep the originals for authenticity, then in general you could leave the question and answer texts as they are, but add a proper explanation of each in the same text block, below a HRule. And then re-apply the protection.

For the specific example, as Hans Passant points out in the comments to this question, check the history for a good version of the question and/or answer and re-instate those.

-2

If we look at Stack Exchange as a knowledge base, then the index are the questions. If the answer is good, but a better question would help more people find it:

Would it make sense to ask the better question and mark it as dup of the bad question with a good answer?

1
  • 2
    Probably not. I would prefer having the good question and the good answer in the same place and having everything else as dup of this. Commented Aug 30, 2016 at 20:03

You must log in to answer this question.

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