41

This question asks for an explanation of a snippet of code in an off-site resource.

If you take the off-site resource out of the question, the question is essentially:

Q: What does this syntax mean?

A: Nothing. It is not valid.

This does not seem to be a particularly useful question - somewhat akin to asking for a definition of a made-up word on one of the English language sites - and would probably be better as a comment on the original resource.

However, I can't see an applicable close reason for it (apart from 'Other', but then it doesn't seem to contravene any of the 'How to Ask' guidelines either). Previously, this might have fit under more general close reasons such as "not constructive" or "too localized."

Are such questions considered on-topic? If not, what is the convention for removing them? Downvote to oblivion?

10
  • 7
    Downvoting doesn't seem fair, as it might be a reasonable question if the syntax actually existed. Isn't there a close reason for problems caused by simple typographic errors?
    – duplode
    Commented Aug 1, 2015 at 20:39
  • 2
    @duplode There is, but that doesn't seem to quite follow - the wording of the close reason makes it more apt for when the problem is caused by a trivial mistake made by the asker that renders the question moot but, in this case, the question is explicitly about the error (despite the fact that it's assumed not to be an error in the question). It seems like the best fit but it still jars - i.e. "it's a typo" is the answer, rather than "you made a typo" undermining the question.
    – Ant P
    Commented Aug 1, 2015 at 20:44
  • As an example of what I mean - that close reason would be applicable, e.g. when someone asks about reference assignment semantics based on some odd behaviour in a snippet of code but actually the behaviour was caused because they had a something variable and a someting variable by mistake, so the whole premise of the question is undermined and the question is redundant. This isn't really that kind of scenario.
    – Ant P
    Commented Aug 1, 2015 at 21:00
  • 8
    @duplode: Why don't you think downvoting is approprate? Doesn't feeding that to a compiler (which you should do anyway if trying to learn a new language) fall under the minimum reasearch we expect? Commented Aug 1, 2015 at 21:50
  • 13
    @Deduplicator The OP in that question did something akin to that ("It's just giving me a red underline"), and suggested a naive but not wholly illogical explanation ("Maybe I need to upgrade to MVC 5 from MVC 4?"). Also, there are similar scenarios in which accusing the asker of not doing the minimum research would be a bit harsh IMO (e.g. in a question that, rather than non-existent syntax, was about extra syntax enabled by a compiler option, which the off-site tutorial writer forgot to mention).
    – duplode
    Commented Aug 1, 2015 at 22:07
  • 5
    I'm not in favour of any tendency for SO to become a validation site for arbitrary Internet junk. Questions should refer to normative references, not just any old thing.
    – user207421
    Commented Aug 3, 2015 at 9:46
  • 1
    @EJP which is why we don't recommend just any tutorial or book, but The Tutorial™ and The Book™.
    – Braiam
    Commented Aug 3, 2015 at 23:38
  • Can we establish a standard answer for "these sites are notoriously bad; firs step should be to look somewhere else"? (Grump grump w3school grump...)
    – keshlam
    Commented Aug 4, 2015 at 2:37
  • @keshlam Obviously not. We should instead establish a standard answer that says 'unless this site you're referring to is normative in some way, why are you even asking'?
    – user207421
    Commented Aug 5, 2015 at 10:07
  • 1
    @ejp: Most folks, alas, can't read formal specs. I used to spend a lot of time translating from prescriptive to descriptive for folks who weren't used to thinking like standards lawyers. Sometimes the most useful references aren't normative, eg the xslt faq or the Annotated DOM.
    – keshlam
    Commented Aug 5, 2015 at 17:40

3 Answers 3

62

Errors in tutorials and other learning resources can be very confusing to people trying to learn something new. If they already understood the syntax and everything well enough to know that it was an error in the tutorial, they probably wouldn't be reading the tutorial in the first place.

If a tutorial does something in a way different from how you would have thought, or that doesn't make sense given your current understanding, usually you assume there's a good reason. (And that your current understanding might be too limited.)

Clearing it up with a SO question is certainly useful on the face of it. A question can still be a bad question if it's phrased poorly, or other potential problems, of course. I think the question you linked does a fairly good job. It avoids any long rambling speculation, and explains exactly where they found this piece of code that they don't understand and which appears to be a syntax error.

Errors in external resources are reasonably likely to lead to other people have exactly the same question in the future, so the long-term value of the question is usually a bit higher than most beginner-mistake question.

If/when the external resource gets corrected (due to someone letting the author know, or fixing a wiki, or w/e), then the question on SO becomes obsolete. This is the ideal situation.

Errors in external resources aren't always syntax errors, so trying out examples might lead to valid code that doesn't do what it's supposed to. Then it's even more puzzling, because you're left trying to figure out how you messed up when trying a code snippet.

Unless we want to reject all beginner questions that are trivial / boring for people that already know the answers, I don't see a good justification for excluding these.

12
  • 4
    It still remains a simple typographical error. I do wonder if we should handle it separately when it comes from an external source. Commented Aug 2, 2015 at 6:40
  • 9
    @PatrickHofman: Yes, I think we should. Normally, if the compiler rejects something, you know it's your fault. If you have some source you trust telling you it should work, you have to wonder if there's something you're missing. Commented Aug 2, 2015 at 6:47
  • 1
    @PatrickHofman: When I said we shouldn't reject these unless we reject all beginner questions, I didn't mean that all beginner questions have merit. I meant that coming from a tutorial example gives a question extra merit. So simple syntax-error questions that aren't from tutorials should still be closed. So yes, I think we should handle it separately when the confusing code comes from a tutorial, rather than just someone's attempt at something which doesn't compile. Commented Aug 2, 2015 at 6:51
  • 18
    This isn't a typo in the sense that the close reason means, it, though, @PatrickHofman: note that the phrase is immediately preceded by "a problem that can no longer be reproduced". In the case of a published tutorial or piece of documentation, the problem most definitely can be reproduced -- other people are going to read the same thing and have the same "WTF" reaction. The fact that it's relevant to someone other than the OP immediately obviates the "typo" close reason.
    – jscs
    Commented Aug 2, 2015 at 8:47
  • @Josh of course, but how would one find the specific SO question. It is virtually impossible. I think a forum related to the tutorial would fit best. Commented Aug 2, 2015 at 17:15
  • Searching for "is there an error in $AUTHOR's documentation of $TECH", @PatrickHofman.
    – jscs
    Commented Aug 2, 2015 at 17:33
  • @PatrickHofman: I agree, once you have confirmation from experts on SO that there's a bug in the tutorial, the best thing is to try to get the tutorial fixed. Post there, email the author, or whatever. And besides what Josh said, searching for the exact code fragment that has a problem in the tutorial could well take you to the right SO question. Commented Aug 2, 2015 at 18:26
  • 5
    Thing is - my issue with it isn't that it's a beginner question but that it's a question that effectively only exists because of an error in an off-site resource. You take away the resource and the question becomes inane. SO has many rules and guidelines in place to avoid the issue of content being dependent on third-party resources and this undermines those concerns. That and I don't think listing corrections to external sources is within the remit of Stack Overflow - those corrections belong on the resources themselves.
    – Ant P
    Commented Aug 3, 2015 at 12:14
  • 3
    @AntP: I see your point, but I disagree. After being confused by an external resource, I don't have a problem with someone asking on SO to clear up the confusion. It's a better reason for being confused than many. As long as the question quotes the code it talks about, I think it's ok. Almost everything talked about on SO is about programming languages specified in external resources. It's not like there's a programming language you can or should learn only by reading SO questions and answers. (Unless someone has invented a new lang in a post somewhere...) Commented Aug 3, 2015 at 17:44
  • @AntP: Point is, I think "what's up with this snippet from this tutorial?" with the snippet inline is fine. The guideline is there to tell you to quote, not just link. It's not there to stop you from asking about external resources at all, IMO. That's the diff between this and "Why does my code fail <link>, no quote". Commented Aug 3, 2015 at 17:47
  • 1
    I can agree on that point - the general rule of thumb (for questions and answers) should be that if the post is still valid when the link is removed then it's fine. In that case, though, the question should be "what's the deal with this code," rather than "what's the deal with this tutorial" and there's a very fine line when doing that between a valid question and an inane one. I still think that questions that rely on linked content in order to be valid should be removed for much the same reasons that answers are - SO is (explicitly) not the place for commentating on external content.
    – Ant P
    Commented Aug 5, 2015 at 10:14
  • @AntP: Yup, I agree. Asking about something from a tutorial isn't a free pass to violate the rules about including everything in the question directly, not just linking. It is a free pass about asking otherwise-too-trivial questions, IMO, as long as the asker makes it clear why they're asking, and links (as well as quotes) the tutorial that confused them. Commented Aug 5, 2015 at 11:24
12

I have a problem with "what does this syntax mean?" questions in general, because you could come up with near-infinite such questions and they'd never be searchable (and, thus, useful) to anybody else. I don't see their value in a Q&A.

But there is obvious value to the posting individual. If the OP can cite their sources and use words to describe some technique that the original resource was attempting to demonstrate, the post may become more useful. In such a case, I wouldn't think about closing it.

-10

There is a potential for interaction with "sponsored tags" as a handful of vendors (e.g. Google Chrome) pay SE to host supportive content for various tags.

I had the experience, not here but on Server Fault, of posting a Question about a problem with an offsite resource. As StackExchange content goes, it was not the best (one upvote, two downvotes, no Answers but some helpful comments), and got auto-deleted after a month. But I think it illustrates the need for the Community to give a sponsored-tag Question a chance for the sponsor-monitors to respond.

Sponsored tags are visually distinctive in color and pointsize, and generally are accompanied by a small logo icon.

7
  • 10
    Tag sponsorship isn't paying SE for hosting off-topic support questions, those are always unwelcome, neither for for hosting on-topic questions, which are welcomed anyway. Tag sponsorship is for advertising. Commented Aug 2, 2015 at 14:30
  • 1
    I don't know how you can up with this idea. Any 'proof'? Commented Aug 2, 2015 at 17:14
  • 1
    @PatrickHofman: I'm not sure if you are asking me something. Are you asking about the use of sponsored tags on the site?
    – hardmath
    Commented Aug 2, 2015 at 17:31
  • I wonder why questions with a sponsored tag should be out of the rules, as you would give them a chance and others not. Commented Aug 2, 2015 at 17:39
  • 1
    @Deduplicator: However absolutist your opinions may be expressed, I doubt that you are equally able to speak on behalf of StackExchange and sponsors. According to this blog post from 2011, Google sponsors tags as part of their use of "SO as an official Chrome extension developer support channel." Reasonably we can argue as a matter of policy about whether a vendor should be allowed to identify SO as a first-tier unpaid support option. However I'm making an evidence based claim that Google does that currently.
    – hardmath
    Commented Aug 2, 2015 at 18:03
  • @PatrickHofman: I'm responding to the issue of a question that references and may depend essentially for its substance on "offsite resources", not quite in the sense of the mere typographical error described in the Question, but in the more substantive way that a vendor's products will often have proprietary aspects that only an "insider" will be able to address. I am in favor of requiring SE/SO Questions to be "as self-contained as possible", and the requirement for debugging help in particular calls for a minimal, complete, and verifiable example.
    – hardmath
    Commented Aug 2, 2015 at 18:09
  • 4
    As far as I'm aware of, sponsored tags are no different from regular tags from an editorial point of view, and I would be very surprised to find out that wasn't the case. Companies direct users to SO tags because they are useful as they are, not because they expect special treatment. Cf. What benefits does a sponsor gain from a sponsored tag?, which does not mention any editorial issues other than the sponsored links section of the tag wiki.
    – duplode
    Commented Aug 2, 2015 at 22:17

You must log in to answer this question.

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