46

Consider the following question, which is representative of a certain class of questions that get posted with some frequency on Stack Overflow.


How to find length of array in C++?

I want to write a function to find the length of array. If input is like this

4, 6, 9, 3, 2, 8, 1

I want the output to be like this

7

I have got this homework problem, and it can't be solved even after 1 hour of trying :(

Thank you so much for helping, you are the best!! Have a lovely day :)


Now consider the following bullet#3 in the help/on-topic page.

Some questions are still off-topic, even if they fit into one of the categories listed above:

...

  1. Questions asking for homework help are not inherently off-topic. However, you must have made a good faith attempt to solve it yourself. The question must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it. For more detail, see How do I ask and answer homework questions?

...

My interpretation of this text, and give me some rope here, is that questions asking for homework help are off-topic if the OP does not show a good faith attempt at solving the problem, and does not include a summary of the work they have done so far, as well as a description of the difficulty they are having while solving it.

If I'm understanding the text correctly, that would make the above question off-topic. And unless I'm misunderstanding the intent of the [help/on-topic] page, the bullets listed in the off-topic section are examples of reasons why a question could be closed.

There is no actual close reason for "no effort homework help", and adding a new reason to the close vote interface is not a trivial undertaking. But if it's a valid close reason, then I think I should be able to use a custom close reason stating that. I think something like the following reason, and give me some more rope here, could be made to work.

I'm voting to close this question because it is asking for homework help but doesn't show any attempt at solving the problem, and as such is off-topic as outlined in the help center.

I don't recall having seen anyone vote to close with such a custom reason, although it is occasionally used as a close reason for a cv-pls request in SOCVR (here's one example of that). It is currently unclear to me whether such a request is acceptable. I've asked for clarification on this, and currently this is the only response I have gotten.

That's going to depend. No effort isn't a close reason. They do have to have tried, but there is no minimum amount of work required.

This is very confusing to me. There is simultaneously no minimum amount of work required, and some minimum amount that they need to have tried? To be frank, the last statement looks like a contradiction in terms to me. And yes, no effort is not a close reason. So what exactly does this depend upon? This confusing response is also surprising as it comes from a user who in my experience has always been extremely clear and precise in what they say.

Note that currently most cv-pls requests to close "no effort homework help" questions also have an additional standard close reason tacked on to them, usually a variant of Needs Focus. This is not actually the case for several of these questions, and being able to close with just the actual reason would be much nicer.

Also, since no effort is undoubtedly not a close reason, it seems I can simply edit out any reference to homework in the above question, and that would make the question on-topic. This approach has been noted before and seems to have some support (at least as far as the 9 stars next to the message would suggest).

If someone asks an answerable question that they mention is homework, I'll often edit that out, lest someone closes it for that reason.


Note that the above question is a duplicate of this canonical target (I'm glad the OP on that question didn't admit it was homework, or we may not have this canonical at all). But finding duplicate targets can be hard, and in some cases they don't even exist.

Obviously, none of the other standard close reasons apply to the above question. Of course, in general a homework question may Need Focus, or Need Details/Clarity, etc., and any number of close reasons may be applicable to it. And in that case of course, it's acceptable to close the question with any of those reasons.

My question is simply whether bullet#3 in [help/in-topic] is sufficient to let me close the question with some variant of the above stated custom reason?


If a question being a request for homework help without any shown attempt is not a sufficient reason to close that question, then I would claim that bullet#3 is actively misleading, and should be removed entirely from [help/on-topic].

This argument is not based on the utility of the guidance on homework questions, but on the fact that the bullets in [help/on-topic] are taken quite seriously by curators, and are frequently used as justification for why questions should be closed. Note also that this is inconsistent: immediately following the guidance for homework questions in the primary help page, there is guidance on how much research effort should be put in before asking a question. For very good reasons, the guidance on research effort is not included as a bullet point in [help/on-topic], and it seems inconsistent to make an exception for the guidance on homework to be included in that list.

Editing the [help] pages is trivial, and I know of at least 2 diamond moderators who will edit that page if there is consensus on meta that it does need editing.


Finally, I'd like to add that I'm sensitive to the fact that many users have strong feelings about homework questions, and resolving one particular bullet in the [help] pages is not going to change everyone's (anyone's?) mind. This meta is simply trying to address one very specific aspect of the issue. The hope is that eventually, with enough time, there will be some sort of consensus about how Stack Overflow should deal with homework, and this meta is just one tiny step towards that goal.

17
  • 1
    I don't think it is enough. Personally I think that should be removed from that page (that is is we reach consensus here).
    – 10 Rep
    Commented Dec 25, 2020 at 4:05
  • 5
    A justified answer would have to explain in appropriate terms. This asks given absolutely no context. So it needs more focus. Moreover what they call an "array" is not an array in C++ terms. So what they have written is not clear. Moreover they don't clearly say what can be input & how output is a function of it. This sort of lack of clarity is typical of a homework and/or effortless "question". (And of a lot of question posts.)
    – philipxy
    Commented Dec 25, 2020 at 5:27
  • 5
    @philipxy The question looks crystal clear, and answerable to me. It even looks clearer than the question in the target I suggested. Do you feel that the target is unclear and lacks clarity, as well?
    – cigien
    Commented Dec 25, 2020 at 5:59
  • 4
    My comments are clear & your comment doesn't address them.
    – philipxy
    Commented Dec 25, 2020 at 10:45
  • 1
    @philipxy your comment handles the concrete problem. Care to share your opinion on the general question wrt. bullet#3 on the help center pageg?
    – Turing85
    Commented Dec 25, 2020 at 11:31
  • 6
    @David 1) I haven't forgotten that. In fact, I discuss a specific custom comment in several paragraphs, and is one of the two alternatives I'm proposing. Please let me know how I can make that any clearer. 2) Note that you're admitting that >50% of your close votes cast are in violation of SO policy, which is that no effort is not a close reason. I understand completely that you feel it should be a reason. That's a reasonable view, but is well beyond the scope of this particular post. You should make another meta suggesting that "no effort" should be a close reason if you want to.
    – cigien
    Commented Dec 25, 2020 at 13:39
  • 8
    Personally I think bullet point 3 should be completely removed from the help-center. There's no reason to have it there. If a post is a clear copy of an actual assignment, then it's not focused on a specific problem, and can be closed as "Needs more focus" Once it's focused on a specific problem, like your example, closing it just because it may or may not be homework is just counter to what the site is about. Effort is irrelevant.
    – Scratte
    Commented Dec 25, 2020 at 15:10
  • 2
    Normal criteria being applied to this meta question would have it closed as lacking focus and clarity. It could and should have less 50% to 75% of the words with no loss of content.
    – bad_coder
    Commented Dec 26, 2020 at 1:07
  • 3
    @bad_coder I'm not sure what you mean by normal criteria. Meta has its own rules for what posts are on topic, and there are close reasons for Needs Focus, or Needs Details/Clarity that you can use if you feel they are appropriate for this post.
    – cigien
    Commented Dec 26, 2020 at 1:18
  • 3
    @cigien The point is that unless we know how the data is presented to the function, any answer is a complete guess. As an extreme example, answer the question when the function has an argument which is an audio stream, and a typical test case is the speech data "Alexa, what is the length of an array containing the numbers 4, 6, 9, 3, 2, 8, and 1?" (Or Cortana or Siri, if you prefer...)
    – alephzero
    Commented Dec 27, 2020 at 4:02
  • 2
    I always close those question under "Community Reason", "Other", specifying the language in that bullet point in the comment with a link to the page. That is, the following text appears in the comments: "I am voting to close this question because Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it." Commented Dec 27, 2020 at 10:15
  • 1
    I sort of feel like the wiki needs edited a bit. It contradicts itself with the "describe the difficulty" requirement. Looking at each question's page as a potential reference doc, I don't see the use of knowing how difficult a random student's homework problem from x years ago was. I know that if I am editing a question and come across a description of the OP's difficult time (e.g. "I've been pulling my hair out over this!"), I remove as fluff, as it takes away from the actual question. In any context, not just homework. Am I wrong?
    – Nate T
    Commented Dec 28, 2020 at 1:13
  • 1
    Does this answer your question? Should we add a "Do my work for me" close reason? Commented Dec 28, 2020 at 1:21
  • 1
    @ivan_pozdeev Not really, though it's certainly related. Note that I'm not actually asking about adding a new close reason. I'm specifically asking if a bullet point in the help-center can be used to justify a closure, and if not, should it be removed from that list, since it causes confusion among curators. A general question about adding a new close reason doesn't really address that.
    – cigien
    Commented Dec 28, 2020 at 1:26
  • 2
    Cody's answer is right; and here's another perspective on the subject: meta.stackoverflow.com/a/283191/16587 Commented Dec 28, 2020 at 14:05

11 Answers 11

44

Our policy regarding homework questions is vastly simpler than you imagine it to be. It can be summed up in three words:

We don't care.

In other words, the situation of the asker is entirely irrelevant. We don't care if you're doing homework or not. We evaluate each question on its own merits. If it is not eligible to be closed for any of the standard close reasons, then it should not be closed.

Lack of effort is not, and has never been, a close reason. If you think that the asker showed an insufficient amount of research effort, then you can downvote the question. But since there is no close reason for this, you should not be voting to close the question. Lack of effort is also not a reason to deny someone an answer. We are not the Soup Nazi; it is not within our purview to decide who "deserves" an answer.

Stack Overflow is a Q&A site. If someone is asking a practical programming question that can be readily answered within our format, then that question is permitted here. If you do not wish to answer the question, then you are under no obligation to do so.

Your hypothetical question should be edited to the following form:

How to find length of array in C++?

I want to write a function to find the length of an array. If input is like this:

4, 6, 9, 3, 2, 8, 1

I want the output to be like this:

7

In other words, trim the irrelevant details and salutations. They are not relevant or interesting, and the mere mention of "homework" causes some users to trigger inappropriately.

Unfortunately, in the case of this particular question, you should still vote to close the question, because it does not provide any explanation or definition for "array". There are multiple types of arrays in C++, and plenty of other things which could be generically referred to as an "array", even though they are perhaps more properly called a "vector", "initializer list", or whatever. You also don't know how they're taking the input: is it being passed to a function as an argument, read from a file, read from the command line, or something else entirely. The appropriate close reason here is "needs details or clarity". Note that this has nothing to do with whether it's homework, being asked by a professional programmer, or being asked by Brian Kernighan. None of that matters when assessing the suitability of a question here on Stack Overflow.

Note further that Stack Overflow is not a homework help site. We're not set up to give students "hints". We're a Q&A site. If you're planning on posting anything but a specific answer to the question in our answer box, then you're doing it wrong. Therefore, policies that attempt to determine whether or not a question is homework so that the answer can be appropriately tailored are horrifically misguided right out of the gate.

It's unfortunate that students might want to cheat on their homework, and it's unfortunate that we cannot take special steps to accommodate students who just want a "hint", but that's just how it is. Conscientious students can still break their problem down further and ask a more specific question that can be directly answered without providing a complete solution to their homework problem, in order to avoid running afoul of any applicable academic integrity policies. But it is not within our purview to enforce this on the site.

19
  • Sp if someone posts a question saying "just give me a hint, not a full answer", how should their question be dealt with? "We're not set up to give students hints" isn't a listed close-reason.
    – khelwood
    Commented Dec 27, 2020 at 9:23
  • 4
    You should edit the question, removing the part that violates our Q&A model, but retaining the bulk of the question, just as you'd salvage any other question (e.g., a "how to" question that asks for a resource recommendation, where you can just remove that recommendation request, leaving a valid question). @khelwood
    – Cody Gray Mod
    Commented Dec 27, 2020 at 9:25
  • Then the OP ends up getting a full answer to their assignment. We make them cheat because they used the site wrong.
    – khelwood
    Commented Dec 27, 2020 at 9:27
  • 15
    That's really not our problem. We aren't a help desk. We don't focus on the user. We focus on the question, and whether or not it can be made a useful addition to our knowledge base.
    – Cody Gray Mod
    Commented Dec 27, 2020 at 9:32
  • The premise of the question is basically that homework questions are not "practical" and are not useful for the site for this reason. But there's no stock close reason for "impractical"... Commented Dec 27, 2020 at 13:22
  • 3
    In what way are homework questions not "practical"? That claim needs a lot more justification.
    – Cody Gray Mod
    Commented Dec 27, 2020 at 13:23
  • 2
    @CodyGray They typically feature very artificial situations and constraints which you'll never encounter in practice. They also virtually always feature multiple concerns thus are only usable for this particular problem and not others. Commented Dec 27, 2020 at 13:25
  • 4
    @ivan_pozdeev While I disagree that all homework-questions are impractical, shouldn't this hold true for all questions to be consistent? If not practical is a real concern, then we should fix it by adding a corresponding close reason.
    – Turing85
    Commented Dec 27, 2020 at 15:17
  • 2
    @ivan_pozdeev Most practical scenarios require a lot of code and setups. Removing "impractical" makes it impossible to distill a problem into it's most minimal part, because that would always seem like too simple, no? Adding to that constrains are imposed in practical setups due to using earlier and/or outdated software. I'm sure there is still production code running on java 5.
    – Scratte
    Commented Dec 27, 2020 at 16:56
  • 2
    "If it is not eligible to be closed for any of the standard close reasons, then it should not be closed" there's a box called "Other - add a comment" for closing questions. That's a standard close reason.
    – Braiam
    Commented Dec 27, 2020 at 23:03
  • 1
    I see that you've borrowed my keyboard, Cody. You've put it to good use since this is verbatim what I've said regarding homework questions.
    – Makoto
    Commented Dec 28, 2020 at 0:39
  • 1
    @Braiam I don't follow your logic. It seems like you're suggesting that since there is a "Other - add a comment" box, anything can be put in there and that would be a standard close reason. So is "I'm voting to close the question because I don't like the color of the OP's shoes", an acceptable close reason? It is a "standard close reason" according to your logic.
    – cigien
    Commented Dec 28, 2020 at 0:48
  • 1
    @cigien Cody's argument is flaky, since it relies on a inaccuracy that the close reasons are finite. I'm pointing out that people can write their own reason, which is also a "standard close reason".
    – Braiam
    Commented Dec 28, 2020 at 1:40
  • 5
    We've all been saying it for years, @Makoto. It is blowing my mind that this is so controversial as of late.
    – Cody Gray Mod
    Commented Dec 29, 2020 at 6:18
  • 3
    Writing your own close reason is literally the opposite of a "standard" close reason. It has "custom" right there in the name. At any rate, that option is under the general category of "off-topic"/"not suitable for this site", so it's expected that your custom reason would explain why the question falls into those categories. It's not meant for, "This is homework!" That's not a close reason.
    – Cody Gray Mod
    Commented Dec 29, 2020 at 6:19
26

Note: In case I didn't make this clear from the outset: it doesn't matter whether the OP says it's homework or not. If it walks like a duck ...


Homework questions are a special case of demonstrating effort. Demonstration of effort on a homework problem is required by the professor, it is required by the TA, and it is required by a tutor, before any help is given towards solving the problem.

The reasons for this should already be clear: wrestling with a problem is part of the learning process. That's why questions of the form:

Write code that solves [some specific problem] and explain your reasoning.

are categorically, unambiguously, and non-controversially off-topic. They essentially demonstrate no effort whatsoever, and are essentially the student asking someone else to do their work for them. They are what I call homework dumps.

As a teacher, my goal is not to hand the student the answer; it is to help them with their thought process. "What should you do first? What tools have you've learned from class that might solve this problem?"

When we ask "what have you tried" on a homework problem, we're asking essentially the same thing we ask of all Stack Overflow participants. "Where are you stuck?"

That's not at all the same thing as "How do I?" questions in a professional programming context.


For what it's worth, bullet 3 in the Help Center

Questions asking for homework help are not inherently off-topic. However, you must have made a good faith attempt to solve it yourself. The question must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it. For more detail, see How do I ask and answer homework questions?

is something that I unilaterally added to the Help Center (along with the other bullets) when I was still a diamond moderator, because I got tired of explaining to new users that it's not enough for their question to merely be about software development.

Bullet 3 has been refined somewhat since I wrote it, but the fundamental concept remains unchanged: "The question must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it."

43
  • 4
    OK, but what are you trying to prove? That homework questions have the same standing as questions asked in a professional programming context? They don't. Commented Dec 25, 2020 at 20:15
  • 10
    Absent "homework" context, the problem remains the same. What sort of background knowledge does the asker have? Showing their attempt provides that information to the answerer, so that they can adjust the way they answer the question accordingly. Commented Dec 25, 2020 at 20:16
  • 8
    No. I won't be drawn into a semantic argument about that. If the question lacks context as to the asker's level of knowledge, it's perfectly within our rights to ask anyone to "show their work." Commented Dec 25, 2020 at 20:19
  • 7
    It's up to the asker to demonstrate, by showing their attempt, that it's not merely a homework problem. Commented Dec 25, 2020 at 20:19
  • 7
    And generally speaking, "benefit to others" doesn't apply to homework. The useful questions are the ones from folks who have been doing this for awhile, and who already understand the fundamentals. Commented Dec 25, 2020 at 20:20
  • 7
    @Scratte: What is your objection here? Any question that doesn't have enough context to determine the asker's relative level of knowledge needs to "show their work," a point that I don't consider controversial. That's especially true of homework questions, where the OP clearly does not have the required background, questions that are not going to be particularly interesting to anyone else. Commented Dec 25, 2020 at 20:34
  • 6
    @Scratte: I think it's not difficult to see why folks in the community are unsympathetic about such questions. Commented Dec 25, 2020 at 20:46
  • 7
    Note that a filter of this nature is not going to stop homework questions, it’s only going to stop questions from OPs who don’t yet know that they should remove all reference to homework from the question. If we start allowing users to close questions because they look like homework that’s extremely dangerous. Whether you feel you could make this distinction accurately is irrelevant, it only matters whether a vast proportion of curators could make the same distinction, and I suspect that is not the case.
    – cigien
    Commented Dec 25, 2020 at 20:49
  • 7
    I don't see how something being a homework question is relevant to us. Treat it like any other question. Whether the student is cheating or their doing their sat is irrelevant to SO.
    – 10 Rep
    Commented Dec 25, 2020 at 20:52
  • 5
    @10Rep: I never said anything about cheating. Commented Dec 25, 2020 at 20:52
  • 4
    And the powers-that-be seem to agree with me because, not only have they not removed Bullet 3, but they've actually refined and improved upon it. If that bullet is the travesty you all think it is, make a new meta post and lobby for its removal. Commented Dec 25, 2020 at 20:58
  • 5
    @RobertHarvey and that is the problem. As I pointed out in my answer: SO is community-reviewed. The community needs guidlines. The on-topic page is a top-level resource and thus beats, e.g., meta-posts. If the on-topic page says that homework must satisfy those criterias, those are hard rules. What else are we suppose to reference if we curate questions if not the official guidelines?
    – Turing85
    Commented Dec 25, 2020 at 21:07
  • 8
    If you don't like the guidelines, ask that they be changed. Commented Dec 25, 2020 at 21:09
  • 4
    This answer would be more correct if it was more strongly worded. This question, in the OP, is basically, "do my work for me" with the subtext of "I haven't pasted in anything I came up with in working on it for an hour because I basically was just fooling around for an hour and now I'm out of time because I'm going to over to a friend's room to smoke some dope". This question doesn't belong here, it shouldn't have been asked, it definitely shouldn't be answered. He should do his own homework. I wouldn't even bother to find a dup to close it as: questioner could have done that himself.
    – davidbak
    Commented Dec 25, 2020 at 22:38
  • 7
14

In your example, asker claims about it being homework and about them spending time trying are intangible meta fluff and could (should) be removed from the question, meaning you can ignore these and focus on the meaningful part of it:

How to find length of array in C++?

I want to write a function to find the length of array. If input is like this

4, 6, 9, 3, 2, 8, 1

I want the output to be like this

7

(also related: Removing phrases like "I looked everywhere on the internet and I did not find anything")

How you handle a question like above is up to you.

For example, my approach is based on canonical guidance here. Per my reading it suggests voting to close as too broad (aka needs more focus) in cases like that. Following "what's a mouse" reasoning in this meta guidance, diligent answer to question like above is supposed to explain what's a function, what's an array and array length, how to work with input and output and possibly something else - that is, make kind of a tutorial in language basics.

17
  • 1
    I mean, without the fluff the question is fine enough. But the real issue is, surely this question in particular has already been asked a dozen times right?
    – Zombo
    Commented Dec 25, 2020 at 5:16
  • 7
    @StevenPenny Without the fluff the question is not fine, see my comment on the question.
    – philipxy
    Commented Dec 25, 2020 at 5:29
  • 1
    The "canonical guidance" that you've linked to refers to "lacks a minimal understanding of the problem". As far as I'm aware, that has not been a valid close reason for quite a while. Are you claiming that you vote to close questions with "Needs Focus" because they "lack a minimal understanding of the problem"?
    – cigien
    Commented Dec 25, 2020 at 5:43
  • 2
    @cigien the guidance I linked to isn't based on that (though one can argue that it is inspired by problems which originally lead to establishing of mentioned close reason a while ago). Per my reading this guidance merely explains what is expected of an answer to questions like that, if we assumed that they are worth to be kept open and answered
    – gnat
    Commented Dec 25, 2020 at 5:52
  • "How you handle a question like above is up to you." - For the concrete example, this may be a valid answer, however it avoids the actual question, i.e. is bullet#3 in [help/in-topic] sufficient to let us close the question with some variant of the above stated custom reason? Or is "it is up to you" the answer you would give? Or is your answer that a custom close reason should not be used since another reason can always be found?
    – Turing85
    Commented Dec 25, 2020 at 10:58
  • 1
    @Turing85 I think guidance in help center addresses more straightforward cases, where askers post their assignments as is. Like eg this one: "This is the problem: Write a Procedure to <blatant homework dump> Please help me on this!"
    – gnat
    Commented Dec 25, 2020 at 11:38
  • @gnat so... tl;dr: in your opinion bullet#3 in [help/in-topic] is sufficient?
    – Turing85
    Commented Dec 25, 2020 at 13:42
  • 4
    I don't understand how that can be unfocused at all. We don't answer more complicated Questions starting with how to add two integers, so why would you need to explain what an array is here? The asker is clearly aware that it's an array.
    – Scratte
    Commented Dec 25, 2020 at 14:53
  • 5
    @Scratte as written in the example we discuss, there is no way for answerer to tell what they are expected to focus their explanation on. Is it usage of some API, or algorithm, or coding bug, or maybe language basics like syntax, function, array, input, output etc etc etc ("- Click the right mouse button. - What's a mouse?") Less troublesome questions easily avoid this by providing relevant code allowing answerers to infer what specifically to focus on - but this is not the case here
    – gnat
    Commented Dec 25, 2020 at 17:22
  • 2
    I would hope to see several different ways to finding the length on this post, @gnat, so that later when other users land on it, they are presented with different ways of finding the length of an array. If the asker had put constraints on it by providing with some failed attempt or further narrowed it, the posts would have been disappointing when someone like me lands on it to see how to get that length. -And then post a new Question because that one was too limited or didn't have exactly the same constraint or my attempt was slightly different.
    – Scratte
    Commented Dec 25, 2020 at 17:26
  • 2
    @gnat I see no evidence for that occurring on Stack. I search for javascript stuff all the time, and I've searched for "loop object" and "loop array" among other very basic stuff. I always land on no-attempt one-lines with great concise Answers.
    – Scratte
    Commented Dec 25, 2020 at 17:46
  • 3
    @Scratte mine experience differs from yours, this is a known thing. That's why I wrote "How you handle a question like above is up to you." (so it is to me and luckily my rep level allows me to vote based on my experience)
    – gnat
    Commented Dec 25, 2020 at 18:27
  • 3
    Not only that, but gnat has been on the network for several years. The SO you see today is thanks to users like gnat.
    – Braiam
    Commented Dec 25, 2020 at 21:18
  • 1
    @cigien "Lacks a minimal understanding of the problem" is certainly a valid reason to close on some other SE stacks. For example Engineering SE expresses the basic idea as being a "naive design problem". In other words, the questioner has not given any evidence that they would understand a good quality answer that was shorter than a complete book on the subject.
    – alephzero
    Commented Dec 27, 2020 at 4:10
  • 3
    @alephzero What does the policy on other SE sites have to do with SO policy? They're different sites with different rules. Also, I suggest not getting too hung up on what the OP gets out of the answer. While important, the goal of SO is to build a repository of quality Q&As that will be viewed by many future visitors, almost all of whom will not be the OP, and the more important question is whether the answers will be understandable to them.
    – cigien
    Commented Dec 27, 2020 at 4:35
7

Most homework questions are useless because they cointain multiple concerns aka multiple questions: how to do this, this, and that, in a situation-specific combination. So an answer to one would lack focus and only be useful for that specific problem and not others that contain the same elements but in a different combination.

As such, virtually all homework questions can be closed as too broad.


The tiny rest that are one-concern are valid -- but virtually guaranteed to be a duplicate of something (since homework is about things that have been done before) and can be closed as such.


So there's technically no need for an additional stock close reason.

There can be one with text better tailored for this situation -- but it has to be extremely well formulated to withstand abuse. There has been a "too localized" reason before and it was deleted specifically because it was being abused.

So far, the community wasn't able to come up with anything sufficiently good -- see Should we add a "Do my work for me" close reason?

11
  • So, you're saying that there's no reason to look at them any differently than if they had not originated from being someone's homework?
    – Scratte
    Commented Dec 27, 2020 at 17:34
  • 1
    @Scratte for SO, it only matters if the question is useful for the site's goals and as such, worth keeping at the site. Commented Dec 27, 2020 at 17:37
  • 2
    @Scratte as you can see from that, where and how it originated is irrelevant. Commented Dec 27, 2020 at 17:45
  • But what about a homework question that goes along the lines of, "here is my problem, I have done this. I cannot fulfill the last requirement. How to do it?".
    – 10 Rep
    Commented Dec 27, 2020 at 19:55
  • @10Rep Then the question should be formulated (and MCVE'd) to be about that last requirement, while the fact it's homework can be given as context. Commented Dec 27, 2020 at 20:14
  • @10Rep Other general details of the larger problems can be relevant, too -- to explain why the OP is trying to solve this problem in the first place in order to avoid xyproblem.info. The key here is the focus should stay on the single concern. Commented Dec 27, 2020 at 20:23
  • Generally, I agree with you. However, the question gives an example of an extremely focused homework question. How would you handle such posts?
    – Ryan M Mod
    Commented Dec 27, 2020 at 23:05
  • @RyanM Close as a duplicate of stackoverflow.com/questions/4108313/… . Commented Dec 28, 2020 at 0:27
  • @RyanM edited this into the post. Commented Dec 28, 2020 at 0:33
  • 1
    I don't see how this answers the question. I've made it quite clear I hope, that any and all questions can be closed with valid close reasons. And yes, a vast proportion of homework questions may fall into this category. My question is: "is that sufficient grounds to just disallow homework questions entirely?", and if not, "should the bullet on homework be removed from the list that curators use as justification to close questions?" Your answer doesn't really address that.
    – cigien
    Commented Dec 28, 2020 at 0:57
  • @cigien Good point. meta.stackoverflow.com/a/404073/648265 Commented Dec 28, 2020 at 1:16
6

There is no actual close reason for "no effort homework help", and adding a new reason to the close vote interface is not a trivial undertaking. But if it's a valid close reason, then I think I should be able to use a custom close reason stating that. I think something like the following reason, and give me some more rope here, could be made to work.

You have a good point, but in practice it's rarely a problem. For the type of questions you're talking about, it's EXTREMELY rare that you cannot use AT LEAST one of the close reasons focus, clarity and debugging. Also, most homework questions can also be closed as dupes if you put some energy into looking for a suitable candidate.

Furthermore, you can also downvote them. Lack of research is pretty obvious, but also usefulness since these questions often have a very narrow scope.

I would not use a custom close reason. That would only be confusing in most cases, because that can easily give the impression that homework question is not ok, which they are. If they have not provided their own attempt, then it is almost by definition unclear what the problem is, so you can close it as such.

For those very rare circumstances where a custom close is the only viable option, make sure to add a link to the page describing the requirements for hw-questions.

6
  • I'm not entirely sure what you're suggesting. You don't seem to be suggesting that the bullet point should be removed. I can't tell if you're saying that the custom close reason I suggested is acceptable, or if this isn't a problem we need to worry about at all.
    – cigien
    Commented Dec 26, 2020 at 3:05
  • 2
    @cigien I'm saying what I'm saying and nothing more. I don't know for certain about custom close reason. But it's a very rare problem in practice since almost all of those questions you're talking about can be closed without custom close vote.
    – klutt
    Commented Dec 26, 2020 at 3:21
  • I see a lot of post being commented on as "This is homework" and, in my opinion, closed wrongly, so I don't agree that this is very rare. And even if it was rare, why put an answer here that doesn't bring any clarity?
    – Scratte
    Commented Dec 26, 2020 at 11:44
  • @Scratte I have seen those too, but I cannot remember a case where another close reason would not work for those questions. But you're right. I'll clarify the question.
    – klutt
    Commented Dec 26, 2020 at 12:14
  • 2
    Thanks for clarifying the answer. This point "If they have not provided their own attempt, then it is almost by definition unclear what the problem is, so you can close it as such." is very interesting. A very large number of the canonicals (including the one I linked to in my question) on SO, and certainly in the tags we watch show no attempt, and are better posts as a result. If the question is understandable without an attempt, and many of them are, I personally find that a bug-ridden attempt hampers the quality of the question.
    – cigien
    Commented Dec 27, 2020 at 4:40
  • @cigien Actually, I do agree. Many times it would be better for future readers. However, even if the quality of individual questions would go up, I think that the quality of SO as a whole would go down if people were allowed to do so. Even today it's a problem that people are using SO as their personal google or teacher.
    – klutt
    Commented Dec 27, 2020 at 8:17
6

I suggest that homework or professional task questions should result in no special considerations because of 3 key reasons:

  1. Determination of "effort" is too subjective. What one visitor to StackOverflow may consider substantial effort is trivial to another visitor.
  2. The fact that a question was triggered by a homework assignment or professional task does not inherently make it uninteresting or useless.
  3. It is not our responsibility to foster the programming abilities of the question asker; in my opinion, our primary responsibility is to future visitors.

Additionally, while demonstration of effort may provide context to potential answers, fruitless or misguided effort wastes the time of potential answers and might even confuse future visitors.

Therefore, I recommend removal of the third bullet point of on topic page of the help center.


Homework or professional task questions invoke an emotional response from other visitors (including myself). Therefore, to decrease the likelihood of that negative emotional response hindering users from answering a potentially useful question, I recommend the following actions:

  1. Edit the question to remove references to homework and any other unnecessary content.
  2. If appropriate, vote to close the question based on other existing guidelines. Such questions are almost always a duplicate, too broad, or unclear.
  3. If you cannot find a valid reason to close the question based on other criteria but find it to be of low quality, downvote the question and move on. Alternatively, if what remains is a high quality, on-topic question, upvote it.

Some experienced users of this site have rightfully pointed out that information about a question asker's programming experience conveyed by statements of homework or "being a total newb" helps potential answers match the level of their answer to the question asker. However, I hold that such context can be inferred from other portions of the question or identified in the revision history if the user is serious about providing a high quality answer.

4
  • 2
    I agree with pretty much all the points in this answer. In fact, I am one of the people who have pointed out that knowing whether a question was set as homework, or an online programming problem, etc can affect the kinds of answers that are posted. But your point that this information can be gleaned via other sources makes a lot of sense, I didn't think of it that way. Thank you.
    – cigien
    Commented Dec 27, 2020 at 4:45
  • I'm a little confused by your [future visitors] link pointing at the help pages on [help/question-bans]. I'm not sure I see the connection.
    – cigien
    Commented Dec 27, 2020 at 4:47
  • @cigien Please see the section containing the text, "All questions are expected to be useful to future visitors." I am not aware of another section of the help center that is that specific about future visitors. Commented Dec 27, 2020 at 4:50
  • Oh, I see. Hmm, that text is a bit buried in that help page. I'll take a look and see if I can find some better link for that.
    – cigien
    Commented Dec 27, 2020 at 4:56
5

It's that time of year again - the time when the people who believe that every question deserves a fair shot, and the people who believe that questions have little intrinsic value except for the answers they attract, butt heads.

I fall into the second group, hence my take on gimme-teh-codez questions (of which homework questions are a subset) is simple: these questions are highly unlikely to be unique enough to warrant good answers, therefore they should be closed as a precautionary measure.

If the question really is more specific, and hence valuable, the asker is welcome to update said question with appropriate details, which will put it into the reopen queue.


The "git pull vs git fetch" question is a poor example because it's not strictly about programming, it's about a tool used for programming that is exceedingly poorly documented and has an exceedingly arcane user interface. It's not about an algorithm, or the fundamentals of a programming language, like most gimme-teh-codez questions.

4
  • If you prefer other example, there "What is the difference between ++i and i++?" which is about programming. Do you discount that because it's about fundamentals?
    – Scratte
    Commented Dec 27, 2020 at 19:16
  • I haven't mentioned the "git pull vs git fetch" question anywhere in this meta. If you're responding to comments made by other users, that's fine, but please be explicit about that in your answer.
    – cigien
    Commented Dec 27, 2020 at 19:49
  • @Scratte Stack Overflow should only be used if Google cannot answer your question. And the question of prefix vs postfix operators has been easily answered by Google since Google existed. In contrast, at the time the "fetch vs pull" question was posted, Google could not answer that question, which justified it being asked here.
    – Ian Kemp
    Commented Dec 28, 2020 at 21:30
  • @IanKemp I don't support your version of having Stack be as small as possible. I also do not support that anything that one can figure out should not be asked, because then the only type of Question that's left would be the curl Question, which was also closed and deleted for being opinion based. I've seen post being closed and deleted here despite the fact that they were the only link of their type from Google to Stack, and it's not making the internet better to remove things before one know if they're useful or not.
    – Scratte
    Commented Dec 28, 2020 at 21:42
4

Questions about academic assignments are ok. There, I said it. But that doesn't mean that they get a pass at violating our High Quality Standards™. Homework questions, like other questions must be clear, reasonably scoped, practical problems unique to software engineering. A good homework question, you don't even notice that it's homework.

It seems to me that the "homework" buzz came about because that's what some crappy questions shared in common, which are three categories: vague, broad or WHA-TIZ-DIZ-I-DUN-EVEN/other. Like the point Shog raised about folks looking for effort, the same rationalization applies here. Being homework is a hallmark of a low quality question. That's what confuses the discussion about whenever to allow or not allow homework questions.

Other issue that have a "homework question" is that it has to retain its value, even after the asker get their answer. This is tricky, because it require that third parties actually assign practical, real world problems for the student to solve. A good assignment doesn't have that problem.

The last hurdle that these questions have to clear is how the student frame their questions. They need to know that they will be criticized, questioned and evaluated on the merits and methods of the problem they are trying to solve. They should be able to (and I'm sad for the general lack of) ask a question that is clear, self contained and practical. The bad examples of these issues are the ones guiding this discussion, but sadly I don't see the combination of policies and practices that would effectively improve the situation.

Oh, btw, quality of answers on these questions also have to be top notch! Just in case.

5
  • This argument seems very reasonable to me. Would you be comfortable if the "homework" bullet is removed from help/on-topic then? Since the other bullets already cover the criteria that you've mentioned are necessary for all posts? I'm only asking about the bullet, I'm not suggesting that the link to the "homework FAQ" in the primary help center page be removed.
    – cigien
    Commented Dec 28, 2020 at 0:15
  • 2
    @cigien considering that it's not doing anything to prevent the worst kind of questions, but it's being used for accurately closing low quality questions, do you believe that removing it would improve the situation?
    – Braiam
    Commented Dec 28, 2020 at 0:29
  • "it's not doing anything to prevent the worst kind of questions": agreed, which makes the bullet redundant. "it's being used for accurately closing low quality questions". But it's used to close questions incorrectly; we've discussed this many times with several examples in SOCVR. That makes it counterproductive. My question is, why do we need that bullet when any question it would catch, would be caught by one or more of the other bullets?
    – cigien
    Commented Dec 28, 2020 at 0:42
  • 2
    @cigien so, what you plan these people to do? They feel that that accurately describe the problem with the question. The help center tries to give whatever guidance it can for fixing the question. You can't just yank that away without a redressing. As said on my answer, unless you can propose something better, the status quo is the best thing we have.
    – Braiam
    Commented Dec 28, 2020 at 1:37
  • 1
    Ah, this is the getting to the root of the problem. My claim is that the "homework" bullet doesn't allow one to close any question that couldn't be closed with some other reasons, and as such is not a useful bullet to have (at best it's redundant). If as you say, users feel that the "homework" bullet accurately reflects the problem with the question, then that's a serious issue, since a question being homework doesn't make it inherently off-topic, and neither does the lack of effort. I'm not claiming that anything needs replacing, because I think the remaining bullets are sufficient.
    – cigien
    Commented Dec 28, 2020 at 2:00
2

Yes, bullet#3 of the help/on-topic should be sufficient to close a question with a custom close reason as stated above.

Rationale:

Those are the guidelines as written on help/on-topic. Since Stack Overflow is community-moderated, the community needs official guidelines on how to moderate. This document is a top-level resource of those guidelines and thus takes precedence over other resources, e.g. meta-posts.


Adendum:

I was informed that some people say bullet#3 of help/on-topic is more of a recommendation for a good question, not a hard requirement. Under the reasoning I gave above, it should be clear that I (and probably many others) interpret it differently, i.e. as hard requirement. If this bullet point is meant as recommendation, not as requirement, it should be removed from help/on-topic.

1
  • 2
    I had to think hard about how to react to this post. I'm choosing to upvote it. Not because I like the result; in my opinion, requiring any effort, whether it's a homework question or not, is a dangerous thing to do. No, I'm upvoting this answer because it's correct; the bullet point in the help center page makes it very clear that this is a valid close reason, however unfortunate I personally find that to be, and as such a custom close reason should be sufficient.
    – cigien
    Commented Dec 25, 2020 at 16:49
-4

I don't think that "effortless" questions should be closed as Needs More Focus. As long as the problem is unique, clear and tight, it's a good question and the type of question that I like to answer, and it's the type of post I would like to find when trying to solve a problem.

Given that "no effort" questions are straight up questions on how to do something and not bug fixing (different close reasons will apply if otherwise), here is something that I consider:

  1. A user posts a question, expecting an optimal solution. They show what they have tried, as they've heard that it's mandatory to do so in order to get a decent answer.

  2. Answerers wouldn't know whether the OP wants an optimal solution, or someone to point out to them the simple mistake in their code.

  3. An answer is given, simply pointing out the small issue in the OP's long code that could've been shortened to a few lines.

  4. The answer gets accepted and upvoted, and the world moves one. Oh wait, people searching for the same problem will get to the post, and take the unnecessarily long code as the correct answer.

I don't know if this is a real problem, but I often find myself overwhelmed by the code given by the OP, and debating with myself whether to explain each bug in their code line by line, or to completely disregard their code, and give them the optimal solution.

I hate the times that when I have a problem and find a post that addresses my problem, I'd have to reverse engineer the code in the answer to extract the solution from the OP's existing code that has little to do with the problem.

This is controversial (and so is this whole answer, as I'd soon "find out"), but my point is basically that I'd rather have a short and sweet question that I can feel free to provide the optimal answer to, rather than to be overwhelmed by code that I'd otherwise need to gruelingly fix bug by bug in order to avoid judgement of "going too advanced on a beginner". Of course, what I'm saying only applies to unique, clear and tight questions.

I think the only times when I (not speaking for any other users) benefited from "what they tried" are when the problem is not clear, while their code pinpoints their intention clearly, but that also brings the question into the Needs Details Or Clarity category...

Basically, I am saying that it's not a valid close reason. Credits to: @Turning85

10
  • I agree with you on this. Needs More Focus is a bad close reason IMO.
    – 10 Rep
    Commented Dec 27, 2020 at 5:32
  • The help says homework needs an attempt. If not more focus applies. Anyway before any attempt there also needs to be a [mre].
    – philipxy
    Commented Dec 27, 2020 at 5:34
  • 3
    Actually, I don't think your answer is going to be too controversial. I agree with you, and I suspect most users do as well (except for the ones who prefer debugging questions, which is fine). I think the issue most users have is not against the questions themselves, but the person asking the question. They're possibly worried that they might end up helping someone who doesn't deserve their time or help. Your answer sidesteps that quite nicely by focusing on the post rather than the motives of the OP.
    – cigien
    Commented Dec 27, 2020 at 5:36
  • 1
    @philipxy This is just my opinion, but for what it's worth, the "homework help needs effort" line item is unlikely to be in the help center page for long. So you won't be able to point to point to that to justify using Needs Focus when a post shows no effort. Note that in general, no effort is not a reason to close any post. And only questions asking for debugging help need an [mre]. "How to" questions don't need an [mre] at all.
    – cigien
    Commented Dec 27, 2020 at 5:39
  • 4
    @cigien Contrary to your question & comments, there is a longtime policy in the help & faq that homework requires effort, anything contradictory notwithstanding--SO/SE documentation is a mess. Cherry picking & wishing is not helpful. If you want a particular policy, make a feature request. But one point of view is, answering non-effort homework is not helpful to either an asker or a googler, regardless of their opinion about that, so the site shouldn't offer such answers.
    – philipxy
    Commented Dec 27, 2020 at 5:56
  • 1
    While I agree with what you are saying, I do not see how your answer addresses the question at hand. Could you please clarify how what you have said translates to the question of whether bullet#3 of help/on-topic is a valid close reason?
    – Turing85
    Commented Dec 27, 2020 at 14:43
  • "Unique" is exactly what SO is not about. SO seeks to help further readers, so questions and answers must be reusable which is the opposite of unique. Commented Dec 27, 2020 at 19:39
  • @Turing85 Basically, I saying that it's not a valid close reason.
    – Red
    Commented Dec 28, 2020 at 0:30
  • @ivan_pozdeev I'm not getting your point. When I say "unique", it merely means "not a duplicate".
    – Red
    Commented Dec 28, 2020 at 0:30
  • @AnnZen would you edit your answer and add this clarification? =)
    – Turing85
    Commented Dec 28, 2020 at 7:41
-9

This whole issue could be avoided if profs/TA/whatever issued homework with the directive 'You must explain/list, in diary form, the steps you took to test and debug your code once you achieved a successful build. 5% of marks will be awarded for working code, 95% for test/debug effort'.

That would make working, copypasta code answers to homework questions valid according to SO policy, but essentially useless for handing in.

4
  • 3
    My diary: Step 1 - post on SO. Step 2 - copy answer. Commented Dec 27, 2020 at 3:44
  • 1. Lots of places already do this. 2. How is it really relevant for Stack Overflow how users are using Answers?
    – Scratte
    Commented Dec 27, 2020 at 12:27
  • @chrisneilsen Obligatory link: meta.stackexchange.com/a/9151/174091 Commented Dec 27, 2020 at 17:51
  • 2
    This would also make 99 percent of college students fail because profs are really bad. If you say they aren't, because if you do a survey you will find the truth.
    – 10 Rep
    Commented Dec 28, 2020 at 2:44

You must log in to answer this question.

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