What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

This question already has an answer here:

I have been beating my head on a java project for a class for a bit. At the moment, the program runs and completes, but nothing as an output. It is error free and warning free, well as far as eclipse can tell. I would feel horrible to post the code and asking someone to debug, but i don't have enough rep to go into chat and ask if anyone cares to help. My question is, is it completely inappropriate to post a big chunk of code under those circumstances, as i suspect it is?

share|improve this question

migrated from stackoverflow.com Dec 1 '13 at 6:03

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Josh Caswell, hims056, Donaudampfschifffreizeitfahrt, Martijn Pieters, Shadow Wizard Dec 1 '13 at 12:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Why can't you debug first? Just trace what you expect to result in output backwards step by step to see where it goes wrong. It should at least give you an idea. –  Ingo Bürk Dec 1 '13 at 5:55
    
you need to ask questions about your project. uploading code and asking to debug is not the right way. If it compiles and runs to completeness but gives no output as expected then that means the logic used is not right. –  Nazgul Dec 1 '13 at 5:56
    
The error lies in the main method, which was giving to me and it appears to come from isEmpty(), which due to the fact its a built in, im not sure how it could possible register as empty if in debugger i can see it has contents. –  CSnewb Dec 1 '13 at 6:00

3 Answers 3

My question is, is it completely inappropriate to post a big chunk of code under those circumstances, as i suspect it is?

In my opinion, it is inappropriate.

Debugging is a task, not a question. And it is a task that you need to learn to do yourself. There are a few tricks, but mostly it is about learning how to use the tools (e.g. your IDE's debugger) and ... practising the skill.

People are likely to "cut you some slack" if the amount of code is a relatively small, or the problem is easy to spot. But people in general don't have the time or patience to undertake a large-scale code reading / debugging task on a (typically) poorly written code-base. It's just not fun.

share|improve this answer
    
“Debugging is a task, not a question. And it is a task that you need to learn to do yourself.” Seems a bit harsh. Programming is a very isolated task. And much of it relies on trust. Telling someone to just “learn to do it yourself” is in denial of how the sharing of code can help someone learn. –  JakeGould Dec 1 '13 at 6:48
3  
@JakeGould - "Programming is a very isolated task." You must be using "isolated" in a sense that I don't understand. Maybe you mean that programmers are isolated people ... but even that's not true. "And much of it relies on trust." No. Programming is an activity that combines knowledge, skill and understanding. Trust simply doesn't come into the equation. "... is in denial of how the sharing of code can help someone learn." We are not talking about "sharing code". We are talking about asking someone else to do your debugging. The best way to learn to debug is to do it yourself –  Stephen C Dec 1 '13 at 6:59

My question is, is it completely inappropriate to post a big chunk of code under those circumstances, as i suspect it is?

Yes. No one here has a lot of time to go through just your giant block of code. Narrow it down.

You claim your code compiles and runs, but doesn't have any output for it. I would strongly encourage you to isolate the place that you perform does output, and attempt to debug it. If you're still stuck, include the isolated piece of code (preferably a minimal compiling example) in a question.

share|improve this answer
    
So, not to say your effort was not worth it, but you and me are the only non-dead users in this page. OP can't get the answer. Shouldn't this be closed seeing that everyone does not have an account (and the OP would not know about the migration), and this is a duplicate of several other better questions? –  gunr2171 Dec 1 '13 at 6:07
    
No; OP can both follow the migration path, and register their account on MSO. I don't see any reason/value to close it unless it's a hard-and-fast duplicate of another question. –  Makoto Dec 1 '13 at 6:08
1  
@gunr2171: Unless my doctor (and pulse) are lying to me, I'm non-dead (at least by legal definition). I'd suspect there are lots of other non-dead users here as well. (Not to be confused with un-dead, of course, which are zombies. I'm not a zombie.) –  Ken White Dec 1 '13 at 6:12
    
@KenWhite, braaaiiinnns, I mean, rreeeppuuttaatiioonnn! And while it is true that the OP could follow the migration, my guess is that the OP will not do that. –  gunr2171 Dec 1 '13 at 6:14

Since you've written the application, you should be able to extract the needed parts only. No need to post the whole source.

share|improve this answer