-2

I've noticed an increase in the number of questions asked on Stack Overflow related to syntax errors. Should there be a dedicated site for that so that Stack Overflow can be cleared to actual provide useful answers to useful questions or is Stack Overflow the correct place for these types of questions?

Many of the said problem questions involve someone copying a code snippet and asking for it to be solved. No background information. Nothing. People still solve these problems for them!

I believe that Stack Overflow should not be used as a means of having people solve your syntax problems. Do you agree?

  • Reason for the down vote? – bblincoe Dec 31 '13 at 19:06
  • 1
    Stack Overflow isn't the right place for those sorts of questions. – Makoto Dec 31 '13 at 19:06
  • 2
    Voting is different on meta; downvotes indicate disagreement. – Doorknob Dec 31 '13 at 19:06
  • @DoorknobofSnow thank you, didn't know that. – bblincoe Dec 31 '13 at 19:07
  • You've "noticed an increase", huh? How perceptive of you. So... is that just your anecdotal gut-feeling, or do you have statistics? – JDB Dec 31 '13 at 19:23
  • @DoorknobofSnow - Actually, they really aren't. – JDB Dec 31 '13 at 19:25
  • @secretunicorngremlins OK, I suppose I can't prove that. – bblincoe Dec 31 '13 at 19:30
  • 1
    Personally I quite enjoy unpicking a bit of source code and trying to spot the problem: passes the time during whole library recompilation... – Bathsheba Dec 31 '13 at 19:39
8

If a question happens to not describe the problem that it is having and, for example, just dumps a bunch of code with a "plz fix" then it's a bad question that should be downvoted and closed regardless of whether the problem is a syntax error or some other type of problem entirely.

If a question doesn't demonstrate sufficient effort, hasn't indicated the research done by the author and what they have attempted to do to solve the problem then that is also a sign of a poor question, to be downvoted and possibly closed as well. Again, this is regardless of whether or not the question happens to be about a syntax error or not.

We already have tools available to handle the types of syntax error questions that are of low quality. There is nothing special about the fact that they are asking for something relating to a syntax error. They can be downvoted/closed based on what's actually wrong with them, rather than simply because they are related to a syntax error.

If a question describes the specific problem, demonstrates a minimal understanding of the problem, has demonstrated effort and reasonable attempts at researching the problem, posts a clear and understandable question, etc. and that question happens to be about a syntax error, then it can very well be a great question that is entirely on topic on SO and most certainly doesn't necessarily belong on another site just because it is a compile time, and not runtime, error.

3

Stack Overflow is not the place for some of these questions. You see, Stack Overflow is a site made for programmers to get answers to their questions. However, the hope is that the questions on the site will be helpful for others in the future. Questions such as Find my syntax error and Where did I miss my ; are most likely only helpful to the person who asked the question, and as such aren't the type of questions wanted on Stack Overflow. However, if it is a more general question that isn't just a code block with a syntax error at the end, it may be on-topic. There is no Stack Exchange site that I know of where these Find my error questions would be asked.

  • I agree, more and more you see a flood of Why doesn't my code work, I have such and such error. – bblincoe Dec 31 '13 at 19:09
  • 3
    So you're asserting that no possible syntax error questions are ever helpful to anyone else. I reject that assertion. Many of them are, but certainly not all of them. – Servy Dec 31 '13 at 19:09
  • @Servy I guess it comes down to context. Users must ask more generic questions that will help them solve their problem while assisting others as well. – bblincoe Dec 31 '13 at 19:10
  • @Servy Not really. If it's a question that someone else may encounter (more general) and they haven't figured it out after searching, sure, it's userful. However, most questions are not this, it's just a code block with the syntax error at the end. That isn't the type of question that is wanted. – hichris123 Dec 31 '13 at 19:12
  • @hichris123 But you haven't said that you're specifically talking just about cases where there's a code block that says "plz fix". You're talking about all syntax error questions. That's radically different. – Servy Dec 31 '13 at 19:14
  • @Servy That's true, I changed some of the wording in my answer to clarify the points where it is and isn't off-topic. – hichris123 Dec 31 '13 at 19:17
3

The best way to put it is that Stack Overflow should not be used as a substitute for normal debugging and troubleshooting practices.

As indicated by the popularity of questions like https://meta.stackexchange.com/questions/182266/how-much-research-effort-is-expected-of-stack-overflow-users, we expect question askers to put effort into their questions. For code questions, this means narrowing down the issue, explaining exactly what the issue is, and making an honest effort to resolve the issue on one's own.

This means that for questions involving syntax errors, it is still an acceptable question if the question includes a SSCE (SSCCE minus compilable), a clear indication of what the syntax error is, and why they haven't been able to resolve it. This is why questions like Cannot find symbol hasNextInt for a java.util.Scanner? have their popularity1.

If the question amounts to a code dump and it is clear that the asker has made little effort to fix the error, then it is absolutely not welcome.


1 That being said, there was plenty of discussion as to whether or not this particular question was completely okay too, but its initial popularity brings the point across.

  • You realize that part of SSCCE is compilable...If the issue is a syntax error the best it can be is SSCE. – Servy Dec 31 '13 at 19:35
  • @Servy Ah true, I'll fix that in the question – Dennis Meng Dec 31 '13 at 19:36

You must log in to answer this question.

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