I just answered this question: https://stackoverflow.com/questions/19909488/print-the-2-smallest-numbers-in-a-loop#comment29622280_19909488

If you look at the three answers we clearly have three levels of helping what is probably a homework question. My pseudocode pythonish answer, Someone's really pseudocode answer, and someone who just wrote out the code. Which is preferable?

| improve this question | | | | |
  • Given that I just failed an audit for accepting an answer to a homework question, I would say none. ;) – user213634 Nov 11 '13 at 15:24
  • 1
    @AndersUP failed an audit? – ford prefect Nov 11 '13 at 15:24
  • stackoverflow.com/review/late-answers#late-answers/… - I'd say the answer is of equal quality to those in your question. – user213634 Nov 11 '13 at 15:25
  • @AndersUP on a 0th impression, that looks like a poor "known bad" review choice (the question was deleted by the asker causing the answer to get deleted too... though that's just my incompletely informed opinion). – user213963 Nov 11 '13 at 15:30
  • @MichaelT I agree. And I'll probably write a Meta question about it. But preliminary research would indicate that the community has a bias towards don't answer poor [homework] questions. So I'll have to look a little more before phrasing my question. – user213634 Nov 11 '13 at 15:34
  • @AndersUP why should poor homework questions be treated any worse than poor non-homework questions? – Aaron Bertrand Nov 11 '13 at 15:48
  • 1
    @AndersUP there is nothing wrong with the answer itself - it is an answer (personal opinions on down voting code only answers notwithstanding). That the question was self deleted by the asker (likely to try to hide the fact they asked at SO) and then the answer was selected as a known bad... that's the problem. – user213963 Nov 11 '13 at 15:49
  • 2
    @AaronBertrand If anything poor homework questions seem to be treated more kindly. A "this is my job, now do it for me" would likely just be closed rather than getting hints + closed – Richard Tingle Nov 11 '13 at 15:52
  • @AaronBertrand Good question - and I don't think they should. That's why I'm researching a little more before posting my disputed audit question. ;-) My point is that I disagree with the audit, and I basically don't think the line is easy to chalk up, especially for the answerer. Take a look at meta.superuser.com/q/7081/97081, meta.math.stackexchange.com/q/11521 and meta.stackexchange.com/q/202895/213634 for some examples of different viewpoints on this. – user213634 Nov 11 '13 at 15:55
  • @Richard I don't know if I agree with that. That may be your opinion (and it is also mine), but most of what I see out there is "is this homework?" and then really crappy attitude... – Aaron Bertrand Nov 11 '13 at 15:56

There is no one right answer. It depends greatly on the personal preferences of individuals, and the specifics of any given question. People are free to vote based on what they feel is appropriate, so in a general sense the "best" option is entirely up to the voting practices of the community. That can change based on the tags your in, the time of day the question is posted, luck, the time of year, the quality of the question, the quality of the answer, the popularity of the question, and any number of other factors.

It's an issue that is reasonably controversial; there are many people on different sides, and a such there is no clear singular community consensus across the network. You'll simply need to determine on your own what you want to do, along with what "the community" of active members for that particular question is likely to think appropriate.

Of course, the fact that a question is related to a homework problem as virtually no direct effect on its quality. There are fantastic questions that happen to be related to a homework problem someone has, and there are terrible questions related to a homework problem someone has.

Likewise, there are factors to answer quality beyond just whether there is a complete code answer. An answer that describes the solution without code can be good or bad, based on what it describes, how well it describes it, etc. An answer with a full code solution can also vary in quality; it may be a really good solution to the problem, or it may not be. This adds yet another (major) variable to consider when evaluating such answers.

| improve this answer | | | | |

I often see a lot of negative attitude toward homework questions, and I don't understand it. Personally, I'm of the opinion that a lot of the people coming here for help with homework questions are simply trying to pass a course and don't really care how much they actually learn about Java or C++ or whatever they're learning. Now, you could argue that they're lazy and didn't do their own research from the course materials, but I feel more compassion for the students than I do for the people who are getting paid to solve the same kinds of problems, yet come to a community such as ours to essentially sub-contract for them.

I'm almost always an explicit-code-answer type of guy; very rarely opting for pseudo-code or wordy answers. What I tend to do when it is clear the OP is not overly familiar with the technology is do more around the code in terms of comments and/or naming variables and objects more explicitly. This can help a newbie (whether they are in school or not), and is only annoying to the very strict experienced coder who prefers tight, terse code.

In the end, the answers provided to a homework question will help the OP in one way, but they'll help future readers in other ways. They may even help the OP in a different way later when they revisit the question. For the most part my recommendation is to ignore whether the question seems to be homework or not (or at least don't think negatively about it), and focus on the question. Whether they are a student or not, someone who has little experience in a specific technology still has little experience in a specific technology, and the same type of guidance can be helpful.

| improve this answer | | | | |
  • 3
    In all fairness, if we help them to pass without understanding anything we're helping no-one. I'm all for helping out the newbies but an explation or hint will be more helpful – Richard Tingle Nov 11 '13 at 15:45
  • @Richard if they're not interested in actually learning Java, and it's an elective in their course, we're not going to be able to force them to learn and understand. They're going to find a way to submit their assignment without actually learning it. I don't know where we want to draw the line between solving technical problems and becoming psychologists and guidance counselors. – Aaron Bertrand Nov 11 '13 at 15:46
  • 3
    Doesn't this conflict with your answer here? meta.stackexchange.com/a/200116/148949. The user's question, while showing at least some effort, is still effectively "Here's my code, finish it for me". I'd say it's off-topic for lack of trying and laziness. And in cases where the user just posts their homework verbatim, those are an abomination. – LittleBobbyTables - Au Revoir Nov 11 '13 at 15:49
  • Indeed, but these are highly specific question that are unlikely to help anyone else. Arguably they shouldn't be answered at all (help vampires and all). But if they are it would be nice if at least 1 person was legitimately helped – Richard Tingle Nov 11 '13 at 15:49
  • 2
    @LBT I don't see how it conflicts at all. If a question is bad or lazy, then it doesn't really matter if it's homework or not, it's a bad or lazy question and should be improved or closed. If it's a good question, it deserves an answer, and again it shouldn't really matter if the OP is doing it for a school assignment or an assignment for their boss. – Aaron Bertrand Nov 11 '13 at 15:51
  • 1
    From meta.programmers.SE - Open Letter to students with homework problems. There are a lot of things that mix together that make homework problems a difficult one for the Q&A format to deal with (writing the non-optimal answer because "you haven't learned arrays yet" or "you can't use Arrays.sort()"). That the answers we give, while right, may involve shortcuts that the students should take as part of learning the material, that the instructor is trying to teach a certain concept... – user213963 Nov 11 '13 at 15:53

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