11

I came across this answer to a question, which I have posted in full below:

Looks like a lot of complicated javascript and you are not sure where the problem is. Here are some things I would do to try to locate the source of the issue:

You could try using Firebug with Firefox (or any Javascript debugger depending on the browser you are using). You could then set a breakpoint at the line you think is throwing the error.

As you step over the code keep an eye on all relevant variable values and perhaps you will spot a value just before it fails and that might give you a clue to figuring out where the logic error is.

Another idea would be to start building your complex code up from scratch, and testing it step by step as you grow your complexity and perhaps then you will find where you are going wrong. You could try using a Javascript testing tool as you build your code from scratch as well - such as http://jasmine.github.io/

To summarise the paragraphs, we have:

  1. Your code is complicated
  2. Use Firebug to investigate your problem
  3. Look at variables when debugging
  4. Rewrite your program from scratch

None of these is actually an answer - if it were, couldn't we just automatically write this answer to any question involving JavaScript and be done with answering questions altogether?

It would be an answer if the poster had used these techniques to find the problem and then added a description of how it was done.

I did flag this answer, but the flag was disputed.

So how is this an answer?

1 Answer 1

11

The question was recently closed, as I cast the last close-vote. We can see that the question consists of:

  • A vague, non-descriptive title
  • A link to an off-site code sharing site containing a code dump
  • A generic crash message
  • ...and a wall of text that doesn't describe the problem whatsoever

The question in its current state is simply unanswerable.

The answer you flagged is an attempt to answer the question. It doesn't address the code but it does address OP's wall of text in which he says he can't figure out what the issue is despite debugging attempts. Yes, it's very generic and not very useful, but that is what downvoting is for.

Using When to flag an answer as “it is not an answer”? as precedent, let's take a look at pushpraj's general guidelines:

With respect to some flag rejection messages I had recently, below seems to be few of the guidelines for judging an answer

  • If it's an incorrect answer, down-vote it.
  • If you don't agree with it, down-vote it.
  • Flags should not be used to indicate technical inaccuracies, or an altogether wrong answer.

And Martijn Pieters's response to the question:

You [imperative you] flag posts that do not attempt to answer the question. Examples are:

Thanking the posters

Thxs! I had teh exact same poblem and this page really hepped me (sic)

Asking a new question

So how do I apply this to the frobnar when I twiddled the foozbain then?

Asking for clarifications

I don't get it; you want to foo the bar, but you did not include a traceback. Can you add that to your question please?

'Bumping' the question

Man, I have the exact same problem, have you got a solution for this yet?

None of these are answers, nor are they spam or offensive. They should just be deleted, which is what the Not an answer flag is for.

You'd be surprised how often these types of posts crop up.

What not to flag

Any post that attempts to answer the question, however badly is still an answer. You can downvote such posts to signal that the answer is a bad answer, but it is still an answer.

Of course, this is only one meta post, but it seems the answer you flagged doesn't meet the criteria for deletion.

2
  • This is a great answer - I completely understand the concept now.
    – Fenton
    Commented Nov 20, 2014 at 10:05
  • Thxs! I had the same problem but you helped me twiddle the foozbain
    – Tas
    Commented Feb 15, 2016 at 21:10

You must log in to answer this question.

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