10

I often see questions with huge amounts of source code and very small amounts of accompanying content that essentially amount to, "here is a large script, please debug it for me." (this is a recent example). I dread these posts because to do a full code review would take hours and require a lot of information-gathering from the user, and I seldom see someone putting in the time to help someone do their job on a task they don't seem to be able to break up into smaller pieces.

If the same amount of information or the same requirements were applied to a question without such a large amount of code, it would very quickly be closed as too broad or too specific, and quite often these questions go incompletely answered or linger with no accepted answer for quite some time.

Do we have a policy for this? With content this long and nonspecific outside of a code block we'd ask the user to cut their post up into multiple, smaller questions or clarify what they are asking for. We're not doing that for these script questions, should we start applying an existing policy to them more vigorously or clarify/add policy to keep up the quality of the site? Additionally, should we just start directing these sort of thing to something like the Code Review Stack Exchange if they're more about programming than GIS?

2
  • 3
    Great question - I dread these ones too. On a recent example I tried to help by asking the user to submit just the code which was causing the problem, and made a simple mockup to demonstrate. The user kind of did that, but still left a large chunk of unrelated code like the huge long require list which wasn't actually required, and I gave up. Commented Jul 30, 2014 at 23:19
  • 1
    Even with the example I linked to, I see 4 answers, all with overlapping advice, and it seems almost a roll of the dice to determine which one the asker will accept. Who knows which one represents the "most optimized" version of the script, or at least the one with the magic keyword the asker is seeking? Should the answers be merged and marked Community Wiki? I really think we all kind of drop the ball here as community members on questions like these fairly often because it's so specific and buried in code that we (I think) all assume someone better qualified will flag if it needs flagging. Commented Jul 30, 2014 at 23:28

1 Answer 1

10

Questions of the type you are describing are certainly well categorized as "here is a large script, please debug it for me". Sometimes they are posted by aspiring GIS developers who are yet to acquire much in the way of code troubleshooting skills. At other times they are from people who have grabbed code from somewhere else but lack the skills to successfully modify it to their own needs or to debug it when something does not work. I also see code sometimes from people who could possibly have the skills to debug but to meet a deadline may post it to see if someone else will fix it while they get on to something else. For all the cases above, the same policy should apply because it is the quality of the question, and not the person asking it, that we should seek to address.

When a question has a lot of code in it and "something is broken" the chances are that you will be asking yourself a number of questions as you try to answer it and there may be a number of things wrong with the code. This all adds up to the question being too broad for our focussed Q&A format so I recommend the following steps:

  1. Vote to close the question as too broad
  2. Consider downvoting to discourage its asker from repeatedly doing the same
  3. Consider adding a comment to suggest that the asker edits their question to reduce the code element to a snippet that works up to the point at which they are stuck
  4. If you spot even one thing wrong with the code consider posting an answer that addresses that one component

If you do answer one question within a multi-part question such as this, and the asker asks "what about the rest", or "what about something else", then remind the asker that, as per the Tour, they can always research/ask any other questions they have separately.

1
  • 1
    Question like this are by nature multi-part, it totally violates the format of the site. I'll do the standard downvote/vote-to-close thing. I'm hopeful we'll be more vigilant in the future against questions like this. Commented Jul 31, 2014 at 18:30

You must log in to answer this question.

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