It is not all black and white as I see it. Newbies generally do not know where the problem is and constructing a suitable, simple example demonstrating a problem is not easy for them. Secondly, sometimes in their endeavor to simplify things they might actually leave the important details out and we specifically ask for the exact problem statement and compiler errors rather than their interpretation.

i would prefer if the questions have a generic template, something like
a)statement explaining the problem
b)expected output
c)current output
d)inputs
e)code
f)compiler errors if present

But yes, thinking in terms of making the question more understandable is definitely important, and there is some link that gets posted once in a while giving tips on how to ask a question correctly.

I understand what you are getting at. I agree that sometimes people dump off yards and yards of code when it's not always necessary. However, I think asking for the smallest and yet compilable code can bring about a Heisenberg-like effect.

The more the OP takes out the trickier it is to make sure that everything is declared/applied/called in the right place. The code example in your blog was designed as such, and would only match a handful of cases. One example would be where the OP knew enough to rearrange his code for the benefit of the solver but didn't know enough to catch an elementary bug.

The other danger is when the OP goes to great lengths to "summarize" the code for this purpose. All the compiler error messages essentially become invalid and additional errors can creep in. Also, if the OP doesn't really know where the error is, forcing him/her to guess can take the attention off of the real problem.

I understand what you are getting at. I agree that sometimes people dump off yards and yards of code when it's not always necessary. However, I think asking for the smallest and yet compilable code can bring about a Heisenberg-like effect.

The more the OP takes out the trickier it is to make sure that everything is declared/applied/called in the right place. The code example in your blog was designed as such, and would only match a handful of cases. One example would be where the OP knew enough to rearrange his code for the benefit of the solver but didn't know enough to catch an elementary bug.

The other danger is when the OP goes to great lengths to "summarize" the code for this purpose. All the compiler error messages essentially become invalid and additional errors can creep in. Also, if the OP doesn't really know where the error is, forcing him/her to guess can take the attention off of the real problem.

This.

Sometimes it isn't necessary to require them to add code. To the untrained eye, the debug output can throw you wildly off course. This means that they could paste entirely the wrong code anyway.

If they're here because they want help solving a thought problem. I.e. I need to create a word counter, but I don't know what to do. Then our answers will be of the sort: Look up string functions and delimiters.

Then off they toddle to do research (supposedly) and should have a go at writing something. Then they come back later and say "I tried to do it like this, but I'm getting a lot of compiler errors."

I firmly believe at this point we need the compiler output more than the entire source code.

Dumping of source code should be a last resort.

But that's just my opinion anyway :)


I firmly believe at this point we need the compiler output more than the entire source code.

I agree that the compiler output is quite valuable, but without the code it has no inherent meaning.

Dumping of source code should be a last resort.

Agreed. Especially if the OP is at a level where they can pare down the code.

But that's just my opinion anyway :)

That's the case from my end too.

Edited 6 Years Ago by jonsca: n/a

I agree that the compiler output is quite valuable, but without the code it has no inherent meaning.

It gives us (as more experienced programmers) a better idea of where to look. If we get the compiler output we can then direct them to the place we think the error is. This will hopefully reduce the amount of code dump that is necessary.

In some cases it may be possible to solve with just compiler output. But in all cases it definitely serves as a starting point.

Edited 6 Years Ago by Ketsuekiame: Typo's

I see what you are saying, feeding back the troublesome points to the OP who references them in his/her own copy of the code. This could turn into a spoonfeeding thing very quickly. "Okay, I fixed the one error, here's the next one." (ad nauseum)

I agree, but that's where we have to step back and draw a line. Even if they post code, it makes it even more tempting to just modify it and paste it back. That way they haven't learned anything at all.

I suppose in the end it's down to us as a community to limit how much we assist as it becomes necessary. Not every question will be the same and neither will the OP's skill level and the answers the community gives should reflect that.

(But overall I agree with what you're saying, just a shame there's no general way things should be done without alienating someone)

Note: We and They refer to the Community and the OP respectively. Not high level programmers and low level programmers. I'm not THAT elitist :P

Edited 6 Years Ago by Ketsuekiame: n/a

This article has been dead for over six months. Start a new discussion instead.