When I post questions people keep on saying it is homework.

For example in this question https://stackoverflow.com/questions/2902781/priority-queue-implementation the question is this implementation correct?

This one was closed: https://stackoverflow.com/questions/2896811/question-about-siftdown-operation-on-heap-closed

Can anybody explain me what is happened?

No one is answering my questions, why?

  • Personally, it hurts my eyes to look at the code (pseudo code) that you posted. If my eyes hurt then i have to make the abomination go away, usually by either voting to close, or just by flicking to the next question.
    – slugster
    Commented May 25, 2010 at 10:18
  • 3
    +1 for making the effort to come to Meta and work with the community.
    – Pops
    Commented May 25, 2010 at 14:24
  • 2
    Great edit, by the way. Commented May 25, 2010 at 15:01
  • @Popular Demand, technically, they posted on SO and it was migrated here, so it's good that they're wanting to learn, and presumably just didn't know about Meta. Commented May 25, 2010 at 15:35
  • 1
    @Dominic, true, it was migrated, but the OP created a Meta account and associated it with his SO account, which was good enough for me.
    – Pops
    Commented May 25, 2010 at 15:45

6 Answers 6


The comments to your first question give a hint as to why no one's answering your question.

Your question is "why does my code not work?" - and you've posted quite a bit of code. Try narrowing the problem down. Is there a specific function that doesn't behave as you expect? What output do you want? What output do you get? What have you tried to do to make it work properly?


Whenever I post a question that goes unanswered it leaves me thinking one of several things;

  • I wasn't clear enough, people don't know what I'm asking
  • I asked a question that was too vague to be answered
  • I asked a question that was fundamentally incorrect - like asking if Java is a good replacement for Xml (this doesn't make sense)
  • I asked a question in such a way that puts a large burden on the reader. I should have put effort into editing, reducing the problem to the simplest example, clarifying the wording, everything to save the reader effort, making it easier for those with the knowledge to answer without sifting through many lines of irrelevant writing and irrelevant code.

Fixing your code for you will teach you nothing. You'll go from having code that you don't know why it doesn't work to code that you don't know why it does work. This entirely defeats the point of homework.

As some of the comments say, you need to learn how to inspect and debug code, using debugging tools or even just printing a load of status output as you go, in order to understand what the code is actually doing.

This is a far more important exercise to the discipline of programming than the basic data-structure stuff (that in reality you're rarely ever going to have to write as it'll come out of a library).

  • Actually, I interpreted "people keep on saying it is homework" as "my question is not homework but people keep on saying it is."
    – Pops
    Commented May 25, 2010 at 14:25

It's because you are not stating your problem clearly enough.

Tell a story, It has a start, middle and end.

  • The start is what you are trying to do.
  • The middle is what you have done and what is going wrong and
  • the end is what you would like to happen and asking why you aren't seeing that result.

If you tell a story then you will probably get a reasonable answer.

  • 5
    s/are/are not/ ...
    – Ed Guiness
    Commented May 25, 2010 at 8:15
  • 2
    @oo - fixed it.
    – Gnoupi
    Commented May 25, 2010 at 8:46

OK, I have changed the question. It looks like this: What is wrong in my questions which I have posted in https://stackoverflow.com/questions/2902781/priority-queue-implementation. So please help now if anybody can.

  • 2
    No downvote because you're new, but in the future you should post notes like these as edits to the question (link on bottom left of question) or as comments under the question, not answers.
    – Pops
    Commented May 25, 2010 at 14:26

OK, I have changed the question. It looks like this: What is wrong in my questions which I have posted https://stackoverflow.com/questions/2902781/priority-queue-implementation. So now please help if anybody can.

  • 6
    People gave you several advices. You didn't listen to any of them. Try to understand what we are telling you, it is important. Repeating "please help" won't change a thing. Help us help you.
    – Gnoupi
    Commented May 25, 2010 at 8:50
  • i have done what i could can anybody help me and tell what is wrong no more what is wrong why it does not show me minimum Commented May 25, 2010 at 9:36
  • 2
    @davit - The only thing that you did was to copy the C code you wanted to make in Java. You didn't explain why, what you want to do, you didn't listen to advices to make your code more clear. As such, your code is close to unreadable, with your "a, b, c" variables. You can't just come and say "please fix this". You have to make the effort to explain correctly. Explain the whole situation, and listen to what people say. Hundreds of questions have answers on this site, every day. Questions which are worded correctly, so that people can understand them.
    – Gnoupi
    Commented May 25, 2010 at 9:48
  • 1
    @davit - Understand as well that this is not that people don't want to help you. You got more attention and more advices than most questions in the last hours. But you have to make the code more clear, and what you want more clear as well. Or people simply can't help you.
    – Gnoupi
    Commented May 25, 2010 at 9:49
  • ok i want implement priority queue and insert numbers in this queue and return minimum also make heap property on this numbers as like in heapsort Commented May 25, 2010 at 9:53
  • 2
    @davit - not here, though. edit your question on Stack Overflow.
    – Gnoupi
    Commented May 25, 2010 at 10:06
  • 2
    please help urgent plz can someone help? Commented May 25, 2010 at 10:30
  • 7
    @davit-datuashvili, browsing through your post history (on SO), it seems many of your questions have been closed due to the lack of information you provide. I think this is because your English is not proficient enough to properly understand what it is people are asking from you to clarify your question(s). You then get an attitude, like you did in the question you mention in this post, after which people vote to close. I highly suggest you look for some other forum/mailing-list where people speak a language you're more familiar in instead. Best of luck to you.
    – Bart Kiers
    Commented May 25, 2010 at 12:55

You must log in to answer this question.

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