Possible Duplicates:
Is [homework] an exception?
How to ask and answer homework questions?

It's bothering me if someone was asked to do report or has a homework question and asks for help here or anywhere in SE, is answering it considered cheating? I know it's not an exam or anything but sometimes reports and homework directly affect the marks of the student. Also it's different to give someone the plain answer than to let him/her read till he knows how to solve it. Also if the poster wrote some code and has an annoying bug, IMO it's Ok to give a helping hand as we had help when we were juniors but asking for the whole solution is something else.

What do you think, shall I post the solution or post a link to an explanatory material instead?

  • I think this belongs on meta. Roughly the equivalent of "Are questions about _____ on or off topic?" Apr 19, 2011 at 0:50
  • Thanks for everyone for answering and the original duplicate questions are very useful indeed. I guess I missed them because I was asking in the wrong place from the start.
    – M.Sameer
    Apr 19, 2011 at 23:03

5 Answers 5


As long as you are teaching to fish, you should be OK. It is generally not acceptable to simply answer a homework question, and it is really frowned upon to flat out ask homework questions. However, if the question gives an opening for a thoughtful and educating answer, it is fine. No one is required to have a good understanding about everything, and helping someone else grasp a concept is always rewarding.



And I am happy to down vote anyone who I see giving complete answers to apparent homework. And I'll make my answers less complete when I know or suspect that the question is homework.

  • 3
    +1: It's simply cheating and nothing more.
    – S.Lott
    Apr 19, 2011 at 0:35
  • 1
    Agreed, it is cheating and disadvantages the students that work honestly. It will lead to the next question - "why do all these new hires spend all day on stackoverflow.com and not working? "
    – james
    Apr 19, 2011 at 1:16
  • 2
    @james: In a competitive environment, one person's gain is another person's loss. However, education is rarely a zero sum game. The person getting their homework done here learns less. They disadvantage their own self more than anyone else. Often, they learn nothing because they did no real work other than reformat the answer they got here.
    – S.Lott
    Apr 19, 2011 at 1:41
  • With so many easy resources for students to "cheat" with (SO is not the only one), I think it's time for teaching to change. If an answer can so easily be found by asking on SO, then the teacher isn't asking the right questions. That said, if it's an essay question and the student copies wording from SO to their homework, that's plagiarism, which will always be cheating. But this burden is always on the student, and not on the mentor.
    – Nicole
    Apr 19, 2011 at 19:05
  • @Renesis: You have it backwards. If a question is easy to describe yet hard enough that you can't find someone on SO who can answer it, then it is far too hard a problem to assign as homework in any reasonable class.
    – btilly
    Apr 20, 2011 at 1:47
  • I didn't suggest that.
    – Nicole
    Apr 20, 2011 at 1:49
  • In summary, you'd like Stack Overflow to be the website that almost answers your questions, but stops just short of doing so? Feb 26, 2012 at 4:10
  • Answering a homework question is not cheating. The student turning in that answer is cheating. Dec 10, 2015 at 14:08

As far as answering homework questions, I think it is cheating, but it's a case of the student cheating themselves out of an education.

I think that Stack Overflow's role in general (providing answers) conflicts with the answers suggesting that we should only provide suggestions of tips. To me, if the question is well put we should answer it as well as we can. That's why SO exists. Definitely keep putting in explanations and guidance rather than just pure "here's the code". But if the question comes from a student who is trying to sabotage their own education, they are just fooling themselves.

  • Sometimes I wonder if the better solution would be to "help" the students that expect others to do their homework for them, so that they fail their final exams, or get hired by companies that don't ask candidates to code. Apr 19, 2011 at 13:41

Is it cheating to write code for someone that lied about there credentials in getting the job? Somehow on SO that is never talked about.

When I learned this stuff people would laugh if you gave them straight code from a question asked on a mailing list. People fall over themselves out here to validate there pathetic lives with some rep points.

People should stop writing code for others period. 90% percent of the answers are 'read the manual'.

  • +1 very interesting point.
    – M.Sameer
    Apr 19, 2011 at 10:02

If the homework question is so short and the answer is so small that it can be asked as a single quesion on SO - I think the student should find a better teacher!

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