I answer a lot of JavaScript/jQuery questions. One thing that is really annoying is people who post their PHP/C#/Java source code and expect you to debug the HTML output that you can't even see.

I believe that if the problem is on the client, they should be showing the client code, not the source code.

Would it be a good idea to have the system prompt/notify users using JavaScript/jQuery tags that it is preferred that they pout their HTML output and not their source code?

  • It's a discussion - comments are more valuable than down-votes. – Diodeus - James MacFarlane Feb 17 '12 at 16:28
  • 8
    Actually downvotes are useful on meta to express disagreement. I disagree with this [feature-request], mainly for exactly the reasons Bobby mentions in his answer. – Josh Darnell Feb 17 '12 at 16:30

No, I don't think that's a good idea.

First, you do not know beforehand where the error is, so prompting them to throw everything or maybe the wrong parts at you is bad. Second, that would require a tag-based notification system, which is not in place and might be a hassle, seeing that the tags can be changed by the community at a whim.

What you could (and most likely already) do is, leave a comment. If the user comes back to you, you know that it's worth your time to come back to that question.

| improve this answer | |
  • Why says there is even an error? – Diodeus - James MacFarlane Feb 17 '12 at 16:23
  • I guess it's 50/50 is the parts are the wrong ones or not. – Diodeus - James MacFarlane Feb 17 '12 at 16:31
  • +1, there is not any useful / consistently-correct way to detect whether the notification would be appropriate. – Josh Darnell Feb 17 '12 at 16:32
  • I agree - perhaps this would be useful in the FAQ. – Diodeus - James MacFarlane Feb 17 '12 at 16:36

As Bobby says, an automated way of detecting this would be unreliable at best and a hindrance to asking questions (something we don't want) at worst.

However, you may be onto something. Currently there is a page with information on how to ask a good question. It seems to me that this page could potentially be expanded with more helpful information, including examples of bad questions vs. good questions.

As part of such an expansion of that page, there could be included a "common mistakes" section. What you're talking about could easily be included in a "know the difference between server-side code and client-side code" part of such a section. It could briefly present how server-side code is used to emit client-side code and common ways in which a person could potentially determine if their error is client-side. (Such as if it's a display issue or a JavaScript issue.) Then some basic instructions for getting the relevant client-side code (HTML, JavaScript, CSS) could be presented.

It seems to me that the How To Ask page can use a lot more attention anyway (and be more prominently linked from the Ask Question page). For a while now, the canonical page to which people link for advice on asking questions has been on an external blog. While that blog post is an excellent discussion of the subject, in my opinion it should be the aim of Stack Overflow to internalize canonical content. (A goal often cited in the definition of poor questions and answers.) And, given the long standing relationship between the blog's owner and Stack Overflow, I doubt anybody would mind if a re-vamped How To Ask page included a link to the blog post as "official" further reading on the subject.

| improve this answer | |

You must log in to answer this question.

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