Out of curiosity, why was this question closed -- so I can be a better reviewer? Yes, the question seems like someones homework assignment and the title is a bit crude and it's a 101 question, but fundamentally, aren't there are a lot of questions on the site where someone includes code that's not working and wants some help debugging? The question involves GIS, arcpy, whatnot. He describes that he's getting an error on table creation.

It's not subjective or open-ended or entirely vague, someone could suggest some things to look for or run/debug and have a concrete answer.

Question is here -- problem with script - who has the answer

share
    
Did you see the explanatory comment I left after the question? If you would like more details, consult the SO meta site, such as at meta.stackexchange.com/questions/37308/…. –  whuber Feb 15 '13 at 2:02
    
Yes, but was looking for more explanation. It seems like there are a lot of questions that boil down to "What's wrong with my code?" and are not closed. Even if they don't explicitly put it in the title. –  awesomo Feb 15 '13 at 2:06
    
Read that page -- yes makes more sense to me now -- discouraging dumping of huge script or file and ask what's wrong. However, he had identified the problem of an error on creating table. Would it have been okay if he had just included the first few lines of his code sample ...arcpy.CreateTable_management() instead of the whole script? Seems like a lot of grey area. –  awesomo Feb 15 '13 at 2:21
5  
Yes, some simple fixes can go a long way: strip the code down to the minimum needed to throw the error, state the error, state how the code is expected to work, and sit back: somebody in the community will likely appear within minutes with a solution. (Well, it's also a good idea at that point to do a quick site search to see if your question has already come up.) The really cool thing is that more times than not, by following this procedure you will solve your problem (or at least convert it into a simpler one), so the question doesn't need to be asked in the first place! –  whuber Feb 15 '13 at 2:59
add comment

1 Answer 1

up vote 9 down vote accepted

That question exhibits a host of basic problems. The critical ones are:

  • The error message is not reproduced, making the problem difficult to ascertain.

  • A large block of code is posted, unedited (and badly formatted).

  • No evidence of any effort to solve the problem or even isolate it is provided.

  • No explanation is given concerning what the code is intended to do.

Any one of these would be ample reason to close the question. In general, this community and its moderators are very tolerant (perhaps because many GIS people are not really programmers) and will make extra efforts to improve or even answer questions that exhibit only one or two of these problems. But when just about every aspect of a question indicates it's a bad one, it gets closed fast.

(About the only thing that could make this question worse would be if the O.P. demanded answers right now because they're in a hurry...)

Some less-critical problems include

  • The title is meaningless.

  • There is just a single tag. (The only way you can determine what platform the code is for is to read it and no clues are provided about the purpose.)

The SE philosophy about questions of the form "what's wrong with my code" is clearly explained in a meta thread entitled Does SO discourage questions like “this is my code, please find the bug”?. The answers are unequivocal: such questions do not belong. To be taken seriously as the originator of a question anywhere on SE you should exhibit a minimum of common sense and courtesy for your readers:

  • Isolate the part of the code that causes the problem so we don't have to wade through pages of irrelevant stuff;

  • Tell us what environment it's running in so we can tell as quickly as possible whether we have the capability to understand the code and reproduce its behavior;

  • Give an accurate account of the bad or unexpected behavior--we cannot read your mind, no matter how gifted you think we may be;

  • Tell us what behavior is intended or expected--or be prepared to get answers that may make your code work, but in the wrong way!

It shouldn't be necessary to state these things: they are not particular demands made here at SE, but are what anybody with any kind of computing problem needs to do in order to address their problem.

share
    
You make a forceful case -- that it fails on many fronts. Ever consider trial lawyer instead of programming? Still think there's grey area out there, but I understand now this scenario of closing questions that have multiple problems - Cheers –  awesomo Feb 15 '13 at 2:41
add comment

You must log in to answer this question.

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