93

"How to exclude letters while adding numbers in a for loop?" appeared today. It's clearly homework. There's no attempt at a solution, just a bare-bones statement of the problem.

The policy in the help centre reads:

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.

But I discover that the question has been answered by Bohemian, one of our esteemed moderators, with the words

I'm just going to give you the answer...

His is not the only answer, but that's not the point. I assume the moderators should be maintaining established policy, so presumably this question should have been downvoted or closed or both, but not, seemingly, today.

So, just what is the policy on homework?

10
  • 4
    You cited the policy. Which actually applies to all questions. That doesn't stop others though.
    – Bart
    Commented May 20, 2014 at 7:01
  • 21
    Mike W, you are completely right - the linked question should have been downvoted and closed and not answered. However, I do not understand what is there to clarify about the homework questions. The rules are clear - the problem is people totally omitting them. Is there something unclear in 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.?
    – user2140173
    Commented May 20, 2014 at 7:19
  • 6
    On Meta.Programmers.SE there's Open letter to students with homework problems - while it doesn't set a policy it does describe some of the issues with homework problems.
    – user289086
    Commented May 20, 2014 at 16:43
  • 9
    Well, there's a turn up for the books. The original question has been comprehensively downvoted and closed, which I guess it deserved considering how poor it was. What's more interesting is that Bohemian's answer has also been downvoted, which I'm not sure was justified given that it was possibly the best of the answers given. The interesting point is that a response here by Bohemian, which makes a valid point about negativity (as discussed here, has subsequently been deleted by another moderator. I really don't know what to make of that.
    – user1864610
    Commented May 20, 2014 at 20:31
  • 13
    We should outlaw homework questions, thus forcing people to pretend their question isn't homework, and ask it in a reasonable format.
    – PitaJ
    Commented May 21, 2014 at 3:38
  • 12
    @PitaJ You may be sarcastic, but this is actually very helpful. In the typical homework questions, changing the question to actually conform to SO rules pretty much means you've solved the whole thing on your own. The point is that the typical homework question involves no work at all, and no understanding of even where the problem is, much less the ability to dissect it and solve the parts.
    – Luaan
    Commented May 21, 2014 at 8:06
  • 2
    @luann I wasn't being sarcastic. That's what i was thinking.
    – PitaJ
    Commented May 21, 2014 at 13:41
  • 1
    @mehow I agree, the policy is clear enough. That is, until someone I assume should understand the system well does something that appears to fly in the face of it. As it turns out, the moderator's answer that sparked my question has now been deleted, as has his justification (posted here) for doing so, so I guess the policy rules.
    – user1864610
    Commented May 22, 2014 at 4:56
  • 6
    Diamond mods tend to do as they please. They seem to invent their own rules as they see fit, rather than following any site policies. And if you question why they did something, they'll link some peripheral discussion on meta, rather than citing the site policies. You are disappointed of this because you thought they were moderators and role models, while they are in fact rock stars.
    – Lundin
    Commented May 22, 2014 at 12:01
  • 17
    @Bohemian should really know better than to answer nonsense like this. It's very disappointing. Commented May 22, 2014 at 13:43

4 Answers 4

66

There is no specific rule against homework. Homework questions are just like any other questions so they should not be judged any differently.

  • Is the question on-topic? If not, vote to close.
  • Is the question just asking for links to tools, tutorials, or other external resources? If so, then vote to close.
  • Is the question clear and does it provide all of the relevant information to solve? If not, vote to close.
  • Is the question reasonably scoped that won't require a novel to answer? If not, vote to close.
  • Is the question so localized that will never be useful to anyone else (except maybe those taking the same class)? If so, vote to close.
  • Is the question just asking for opinions? If so, vote to close.

But if the question is answerable, useful, and it is clear what the issue is, then it shouldn't be closed. Homework doesn't make it an exception to the on-topic/off-topic guidance.

So if you decide it doesn't meet one of the close reasons, then it doesn't need to be closed, but you can downvote it if you don't think it is a useful question or was not well researched, or you can upvote it if you do think it is useful. And you can also choose to answer it or not.

Obviously, the moderator who answered that question did not feel the question should be closed, which is entirely their right (given their binding vote, they could have closed the question immediately), and thought it was worth answering.

No one can explain their rationale except for them, but since there isn't a specific rule against answering homework questions just because they are homework, then they didn't do anything against the rules.

Personally, I don't think it is a really great question, but there are certainly worse questions on the site.

7
  • 6
    "There is no specific rules against homework". Yes, in fact there are. The help center is pretty clear in defining homework questions as off-topic if they fail to meet certain criteria: "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."
    – samgak
    Commented Apr 16, 2015 at 8:58
  • 4
    @samgak No, you are making the same mistake as the OP. That is not a rule about homework. That is intended on being a guideline for help homework askers to get help. The "rule" you are quoting is nothing more than a suggestion we have for everyone to get help whether it is a homework question or not. Commented Apr 16, 2015 at 9:07
  • 5
    it's listed in the help center as a reason for why a question would be off-topic, and it specifically refers to homework. And the vote-to-close dialog instructs us to refer to the help center for what the criteria are for "off-topic".
    – samgak
    Commented Apr 16, 2015 at 9:12
  • 2
    @samgak then we disagree on what exactly is a "rule". Rules are hard and fast laws with little gray area. Guidelines are flexible and subject to individual interpretation. Most of the help center describes the guidelines for using the site. Commented Apr 16, 2015 at 9:28
  • 8
    guidelines speak in terms of "should". rules speak in terms of "must". ;)
    – samgak
    Commented Apr 16, 2015 at 9:32
  • The problem is that somebody does not at leat try to solve the problem, the question will be very unuseful and loacalized (if the OP can ask a good question, probably can solve at least a part of the problem). Commented Apr 27, 2022 at 16:02
  • 1
    I wrote the Homework Rule in the Help Center (when I was still a Moderator), and yes, it does say that, if you don't meet the criteria for writing a proper question about homework, then it's categorically off-topic. However, the same rules apply to everyone; homework is merely a category of questions for which the problems stated in the rule happen a lot. The admonitions for "showing your work" and "describing the difficulty" are meant to convey the idea that we're not going to do people's homework for them. Commented Apr 27, 2022 at 18:53
24

It's off-topic, but not because it happens to be for homework.

It's off-topic because it is a request for others to just create something for him, and Stack Overflow is not a magical code generator.

8
  • 6
    Wait, it's not? I've been standing out back for years, what precisely has been coming out then?
    – user50049
    Commented May 22, 2014 at 13:58
  • @TimPost: It's a training ground for the next generation of terrorists (read: cyber-terrorists, or "trolls"). The output you've been seeing is just misdirection. Commented May 22, 2014 at 14:12
  • 1
    3 answers to a question like that - seems like a magical code generator to me (that's the problem with a community-driven post-posting moderation site). Commented May 22, 2014 at 14:28
  • 5
    @Dukeling: Which is why all three answers are off-topic and should be nuked from orbit. So disappointing to see a high-rep, well-known mod answering it. Commented May 22, 2014 at 14:45
  • @LightnessRacesinOrbit how do you think those people get high rep? It's by answering a lot of low hanging fruit like that, and getting upvoted by the homework kiddos faster than they get downvoted by people who don't like that kind of stuff.
    – jwenting
    Commented May 23, 2014 at 6:27
  • 2
    @jwenting: I have high rep and I don't do that. Commented May 23, 2014 at 6:38
  • @LightnessRacesinOrbit not everyone, no. But there's quite a few who do. Easy way to get high rep...
    – jwenting
    Commented May 23, 2014 at 6:40
  • 2
    @jwenting: Yeah I'm well aware of that but it's still disappointing Commented May 23, 2014 at 6:51
23

The fundamental problem with homework questions is that if you hand someone a cut-and-paste answer to a homework question, they won't learn anything, but it's very difficult to write an answer that will teach the poster something but will also be useful to future readers. Most of the time, when I see homework questions, what the poster needs, in order to learn something, is to sit down and have a dialogue with an instructor, who can feed them little bits in the right quantities and sequence to make them actually think. You can do that on SO, with the comments, but the result is far too specific to a particular poster's style of thought and gaps in understanding to be much use to anyone else. So mostly I just don't answer those.

An important exception, IMHO, is when a homework question is also a "how do I do X" question where X is something that could come up in a non-homework situations and is tricky to get right even for people with a fair amount of practice. For instance, in "How do you create a directory with the same access permissions as an existing one?", after explaining the poster's immediate problem I wrote

Your program fragment has many other bugs. This is tricky to get right, and might well be a security hole if you get it wrong, so I shall write out the correct code in detail

and proceeded to give a cut-and-paste answer followed by a bunch of reading comprehension questions. This seemed the best tradeoff among educating the OP, educating future readers, and avoiding the propagation of buggy cut-and-paste subroutines for a security-critical task.

4
  • 5
    I think it's often possible to write a descriptive answer or even a pseudocode answer without actual code that is helpful to future readers. Such answers help the question poster learn, too; if they can understand the answer well enough to translate it into actual code, they've likely learned the gist of what they were supposed to learn.
    – Warren Dew
    Commented May 21, 2014 at 6:45
  • Regarding that answer of yours, personally i think after the time that has passed now, it would probably be good to edit the question title into something more likely to be googled by people who want to archieve something similar and to answer your own questions. While thinking about them for themselves may have helped the original asker, in my understanding future readers might be helped more with an explanation than with exercises.
    – DeVadder
    Commented May 21, 2014 at 7:47
  • 2
    the fundamental problem with homework questions is far worse. By helping unskilled people getting good grades, even degrees, you're lowering the quality of the professional workforce, thus the value of your own skills (at least the perceived value), hurting your future income.
    – jwenting
    Commented May 23, 2014 at 6:25
  • Some of those are also paid homework (posted on behalf of somebody else). Commented Apr 28, 2022 at 11:39
14

Don't look for an SE policy to give you any guidance on how to deal with homework questions. The most commonly applicable issue with them is the one that's actually listed as an off-topic reason listed in the help center:

Some questions are still off-topic...

  • Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist.

But that's a load of horse feathers, nobody can actually vote to close a question with that reason anymore. It was removed as an option in the summer of last year. Being able to understand an answer is no longer a requirement.

A student is supposed to demonstrate understanding of the course material in the last few weeks or months with his homework assignment. But no student ever documents what was covered. Very high odds that you'll post an answer that just can't be used since it wasn't covered, the student isn't supposed to know it yet. So "unclear what you are asking" or "primarily opinion based" can apply. Weasel words, I can rarely stomach to pick them myself since they just denigrate my expertise.

I'd strongly encourage you to set your own policy. Working from the doomsday scenario where your pointy-haired boss hires the guy and insists that you keep him productive. You can probably get him to ask for help to do his job at SO, he's had practice, but you'll of course have a pretty major drain on your time when he gets question-banned. A not unlikely outcome. The best help you can give him is the obvious one, to me, just don't help him.

Or you just completely ignore that it is a homework question. The need to make an answer useful to the questioner is not a very strong one at SO anyway. Questioners constitute only ~0.6% of the site traffic, the vast majority googles your post. Albeit that many of them might be students that have the same homework assignment :)

2
  • 1
    nobody can actually vote to close a question with that reason anymore - Does anyone know why that was removed? Also, why is that still in the Help Center if it's no longer true?
    – BSMP
    Commented May 28, 2015 at 14:38
  • 1
    SE employees claimed that the close reason was being abused. Not that I ever saw that happening, the more likely reason is that they got too many complaints about it. Commented May 28, 2015 at 15:23