14

Sometimes one has a question which is of academic interest rather than "I have a problem with my code, please fix it for me".

Often such academic questions (which could be a broad spectrum of things) are met with negativity on Stack Overflow, sometimes because users do not find the question interesting or there is no simple answer.

For example, if you wrote a program with a bug - and you then fixed the bug but wanted to know, if you leave the bug in, why the program behaves the way it does. See also my most recent question

Are such questions allowed on Stack Overflow?

If so or if not so, why?

Note: Use of the word "academic" here broadly speaking could mean "for interest rather than something directly useful" or "for the purpose of knowing something in more detail" rather than academic as in academia - although how a question can be "academia" I'm not really sure...

11
  • 17
    What exactly is an "academic question"?
    – Alon Eitan
    Jul 30, 2016 at 12:24
  • 9
    The place's on-topic rules do not exclude all "academic" questions, nor favour all "fix this for me" questions. Can you make a specific example?
    – Pekka
    Jul 30, 2016 at 12:26
  • 7
    cstheory.stackexchange.com Jul 30, 2016 at 12:28
  • 2
    For example, if you wrote a program with a bug - and you then fixed the bug but wanted to know, if you leave the bug in, why the program behaves the way it does. (See also my most recent question.) Jul 30, 2016 at 12:46
  • 14
    That would be "academic" in the sense of "theoretical or hypothetical; not practical, realistic, or directly useful". And no, demanding an answer on undefined behavior in the [c] or [c++] tag is not going to be appreciated. It is a taboo subject, undefined behavior is undefined. Jul 30, 2016 at 12:51
  • 3
    That's precisely the point - many academic questions are not directly useful except to learn why something happens. You might not be able to directly apply the knowledge learned but it may help you in future. In my most recent question, it would be interesting to know what value the reference has at the end of function call, for example. Jul 30, 2016 at 12:53
  • 2
    @HansPassant: I would not swipe all 'academic' questions under the carpet as being about Undefined Behavior. See for example this recent one.
    – Jongware
    Jul 30, 2016 at 13:35
  • 4
    Sigh, I wouldn't either, I highly prefer "why" questions over "how" questions. It was not my word choice. And do look at his question, it is not about Python. Jul 30, 2016 at 13:41
  • 6
    For what it's worth, your question wasn't downvoted because it was "academic". Jul 30, 2016 at 21:43
  • If anyone is interested there is quite a nice answer on that question this morning. (Currently in the comments) Jul 31, 2016 at 11:17
  • In the C and C++ tags, many users are quick to dismiss such questions with "because it's undefined behaviour", even if you wanted to know why you get this particular behaviour on this particular platform with this particular compiler.
    – user253751
    Aug 1, 2016 at 20:56

3 Answers 3

14

It depends on the question. This example, mentioned by @RadLexus, is a good 'academic' question. It doesn't solve a concrete programming problem, but it does offer a nice insight into the way a computer handles floating point variables. This popular dupe target is another, less sophisticated, example. Even the single most popular question on Stack Overflow is academic in a certain sense (it's not about a practical problem).

Even though your question is well-written, in the end it is just another thirteen-in-a-dozen question about undefined behaviour. That's why the community reacted badly to it.

1
  • 1
    @RadLexus even better - it isn't even about floating points!
    – Glorfindel
    Jul 30, 2016 at 14:10
10

If you mean, is it okay if the OP didn't actually experience the problem they're asking how to solve, then yes.

The Help Centre states that questions should be about "practical problems that you face", but there's nothing stopping you from abstracting that a little. There's no way to enforce such a rule, after all. I read it more as general-purpose guidance to indicate that questions should be concrete. In reality, the rules are not simple enough to explain in a single sentence.

And, ultimately, if the question is otherwise useful and of value, then who cares whether you experienced it yesterday, or last year, or potentially next year. Or whether you're posting it because you care that somebody else may have experienced it yesterday, or last year, or potentially next year.

If you had to pinky-promise that you weren't asking a hypothetical, then FAQ-like self-answers would not be allowed, yet these are the life-blood of the site. We don't want the entirety of Stack Overflow to be lame "debug my code for me" questions. Heck, in an ideal world, those wouldn't even be the majority (though practical realities seem to dictate otherwise).

For the avoidance of doubt, what we also don't want are broad, sweeping, general questions about how something works in theory. Sometimes there are better places for those on the Stack Exchange network (e.g. ask about computer science theory on Theoretical Computer Science); other times they belong on another website entirely, or maybe not a website at all.

9
  • 7
    I'll say it again: TCS is for graduate level questions. The majority of questions on CS theory belong on cs.stackexchange.com.
    – Laurel
    Jul 31, 2016 at 15:36
  • 7
    @Laurel They probably should have chosen a better site name then... it only stands to reason that Theoretical Computer Science is the place for theoretical computer science questions.
    – TylerH
    Aug 1, 2016 at 14:49
  • 2
    @TylerH: Stack Overflow isn't just about stack overflows. It is impossible to adequately describe the site topic in a two- or three-word title. Visitors are expected to read the Help Pages before asking. Aug 1, 2016 at 14:58
  • 3
    @LightnessRacesinOrbit This is true of course but a site being about more than its title is not the same thing as a site explicitly disallowing questions about its title. Can you imagine if SO didn't allow questions about how to fix a stack overflow? Or if Workplace.SE disallowed questions about the workplace? But we are digressing here.
    – TylerH
    Aug 1, 2016 at 15:04
  • 1
    @TylerH: There are near-infinite possible questions about stack overflows which would be off-topic on SO. Aug 1, 2016 at 15:25
  • 1
    @LightnessRacesinOrbit There's near-infinite possible questions about any subject that would be off-topic, but the subject at large itself being taboo is, again, a different thing.
    – TylerH
    Aug 1, 2016 at 15:33
  • 1
    @TylerH: The subject at large itself is not taboo. The site "Theoretical Computer Science" is about theoretical computer science. It's just that they've put a filter on it that questions must be research-level, much like (but more extreme than) the filter on SO that questions must be useful for others, well-presented, etc. Did you even read their topic declaration before engaging in this argument? Aug 1, 2016 at 16:53
  • 4
    @TylerH There's no way to outline what is on- or off-topic with a title. Other sites like MathOverflow are also at the graduate level (or higher). Personally, I think the name TCS is fine, especially compared with "Research Level Theoretical Computer Science for Content Reasonably Scoped, Researched, and not Opinion-Based in English"
    – Laurel
    Aug 1, 2016 at 17:56
  • @Laurel: lol :P Aug 1, 2016 at 18:03
3

I would say such a question boils down to why a compiler, from which the code is not included, produces some unknown output code, which is also not included in the code, which in turn produces the (known) output value. There is a lot of unknowns in there. Worse, because it is undefined behaviour, one can not answer the question by looking at the specifications, because it is undefined behaviour.

I would suggest doing one of the following:

  • Turn a very small program into assembly. Find out the values in various registers and find out which instructions do not make sense for your program. Also give the source code for your program. Ask a question what assumptions were made generating that code, and why the compiler therefore generated that code. This approach removes a lot of the unknowns, allowing answerers to focus on the actual question instead of trying to guess the generated code.
  • Turn your question into a "[s]pecific research-level questions in theoretical computer science" and ask your question on the Theoretical Computer Science site.
2
  • 4
    I'm not sure if you really understand what TCS is about. It's graduate level and I quote: Work in this field is often distinguished by its emphasis on mathematical technique and rigor. There is no way to transform the linked question into something appropriate for TCS.
    – Laurel
    Jul 30, 2016 at 22:58
  • @Laurel I also don't think it should go to TCS Jul 31, 2016 at 11:16

You must log in to answer this question.

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