I flagged this as not an answer: https://stackoverflow.com/a/2652160/901641

For your convenience, I've copied the contents below:

The short answer is that there is no guaranteed way to get the information you want, however there are heuristics that work almost always in practice. You might look at How do I find the location of the executable in C?. It discusses the problem from a C point of view, but the proposed solutions are easily transcribed into python.

Here's my reasoning for flagging this as not an answer:

  1. Saying that there is no answer is not an answer - that's a comment that belongs on the question.

  2. This post is largely a link. It says what the topic on the other end of the link is, but it doesn't actually summarize any useful information from the link.

My flag was declined, so I'm here to either:

  1. Learn where I err'd in my decision to flag this, so that I don't make the same mistake again, or

  2. Have the decision to decline my flag reversed.

| |
  • 1
    Have the decision to decline my flag reversed. - Not possible, we can't reverse flags. – Taryn Nov 19 '14 at 15:02
  • @bluefeet - Okay, but we could still remove the post. – ArtOfWarfare Nov 19 '14 at 15:03
  • 5
    I didn't process the flag but I agree with both the decline of it and with Servy's answer, it's an answer. I wouldn't delete it. – Taryn Nov 19 '14 at 15:04

Saying that there is no solution is absolutely an answer. It's an answer that often needs some sort of explanation as to why it's not possible, but it is certainly an answer to the question. It may or may not be the correct answer, but it's certainly an answer.

As for the link, the post is clearly an answer even without the link. The link adds to the answer, and provides further information, but the post would still answer the question even if you stripped out the link, which is the simplest test to determine if an answer is in fact an answer.

You may not like the answer, you may feel that it is incorrect (for example, you may feel that it is possible to solve the problem) or you may feel that it doesn't provide enough detail to expand on its points. Those are all reasons to downvote an answer if you feel that it is warranted. It by no means justifies deletion of the answer.

| |
  • 1
    So then I could run through every post on StackOverflow and simply answer "There is no answer" on every question. None of this garbage could be deleted, because according to you, that's a valid answer. My argument is: no, it's never an answer, it's a comment. It may sometimes be a correct comment, in which case there will be no correct answer, but it's never an answer. Further, there's absolutely nothing useful that can be done with this post without that link functioning. – ArtOfWarfare Nov 19 '14 at 15:06
  • 10
    @ArtOfWarfare Of course you could. The answers would be wrong in pretty much every case, and would likely be heavily downvoted, but they are answers. The fact that an answer is wrong doesn't mean it should be a comment. I mean nothing's stopping you from going around to every single post and just posting a solution that won't work and you know won't answer the question. Posting a bunch of wrong answers doesn't warrant deletion, but you'll likely get a ton of downvotes, and probably an answer ban as a result. – Servy Nov 19 '14 at 15:08
  • @ArtOfWarfare Note that in actual practice, going around posting the same answer to every post you can is likely going to be treated as spam. It might be deleted for that reason. – Servy Nov 19 '14 at 15:09
  • Nonsense - there's no other post that you can make that would universally be an acceptable answer. Anything else you try posting will at least some of the time be entirely off-topic. – ArtOfWarfare Nov 19 '14 at 15:09
  • 2
    @ArtOfWarfare That's not true at all. It's also not relevant. The fact that some block of text would be an answer to every single question, but just an incorrect answer to almost all of them, doesn't mean that you're never allowed to post it. It's still an answer, whether right or wrong. Anyways, as I said, it's an assertion that you should typically support in some way when providing it, rather than only posting, "it's not possible" and walking away. – Servy Nov 19 '14 at 15:11
  • You're right, I got distracted / off-topic (although it is true - anything else you could post everywhere would sometimes be deletable on the grounds that it's off-topic.) I have an analogy for you now. Suppose I wrote a function that takes a string and parses it as a base ten integer and returns that. I pass in "There's no way this is a base ten integer". What does it return? It doesn't! It throws an exception! Similarly, questions which don't have answers shouldn't have anything posted to it as a question. If someone feels compelled to point out that there is no answer, that is a comment. – ArtOfWarfare Nov 19 '14 at 15:31
  • 3
    @ArtOfWarfare So you'd rather people not know that there is no answer, and have no way of distinguishing questions that can't be answered from questions that nobody has simply taken the time to answer yet? No, stating that there is conclusively no answer is an answer, whether right or wrong, and posting it as an answer is entirely appropriate because that is the answer to the question. An answer shouldn't be posted as a comment just because you don't like it. – Servy Nov 19 '14 at 15:34
  • Especially when said answer suggests a workaround. – Seth Nov 19 '14 at 15:39
  • Whether I like it or not that there is no answer is entirely irrelevant. The fact that there is no answer inherently means that no answer should be posted - answering "there is no answer" is a self contradicting action, as there is an answer, and that answer is that there is no answer. Unless you accept the fact that there is no answer, in which case you admit this statement should be posted as a comment on the question. – ArtOfWarfare Nov 19 '14 at 15:40
  • 2
    @ArtOfWarfare There is a valid answer to the question. There is no solution to the problem described in that question. The answer to the question is to state that the problem described in the question has no solution. That's not a contradiction. And why is there being no solution to the problem irrelevant? If you had the problem you wouldn't be interested in knowing that the problem can't be solved, as opposed to knowing that nobody has bothered to try to solve it yet? That seems like highly useful and relevant information to me. – Servy Nov 19 '14 at 15:42
  • 3
    I find the phrasing in this answer (which stems from the question, it appears) to be a little misleading, actually. Saying "What you want is not possible" doesn't really seem the same as asserting "there is no answer". There very much is an answer: the answer is "no". I would think of it as akin to something contrived like "How can I walk to the Moon?" Clearly there is an answer to this, and the answer is "you can't do that". That's not (to me) the same as saying "That is unanswerable/there is no answer". Perhaps this phrasing is causing more contention than anything else. – eldarerathis Nov 19 '14 at 15:43
  • @eldarerathis Edited, answer was used to mean different things in different contexts, which is indeed confusing. – Servy Nov 19 '14 at 15:47

I declined your flag.

Answers are posts that address the question.

Some questions are simply unanswerable, or at best, the answer is "This is not possible."

This is one of those answers.

The Not an answer flag should be used for posts that do not address the question, things like:


| |
  • With the exception for link-only answers, they are not considered proper answers, as we should delete them. Whether or not someone flags link-only answers as "no answer" or "low quality" shouldn't really matter, doesn't the errand end up in the same queue anyway? – Lundin Nov 19 '14 at 15:34
  • @Lundin No. The NAA flags go straight to moderators, the "Low Quality" flags go to the community first. Either way, because of the metrics used to determine what quality posts are like, we are generally strict about VLQ flags. We're strict about what "Not an answer" is. In this case, that answer is neither VLQ (it is not pure crap, worthy of immediate deletion), and since it's an answer, it's not 'not an answer'. – George Stocker Nov 19 '14 at 15:36
  • None of your linked to posts actually cover "There isn't an answer" posted as an answer. – ArtOfWarfare Nov 19 '14 at 15:38
  • Getting a bit off topic, but I see no reason why the moderators have to deal with the burden of these "NAA". Couldn't they be directed to the low quality community queue to reduce mod work load? – Lundin Nov 19 '14 at 15:39
  • @ArtOfWarfare Added. Didn't add it originally because that part shouldn't be in contention. – George Stocker Nov 19 '14 at 15:40
  • @Lundin meta.stackexchange.com/questions/243145/… – Seth Nov 19 '14 at 15:40
  • 4
    Anyway, the sheer amount of "previously" you found is proof that I am right when saying there's no community consensus about what to do with these posts. The community is confused so the link-only policies must be unclear. And if 20k+ rep users with review experience are confused, you can be certain that the people who just got enough rep to do reviews are as well. – Lundin Nov 19 '14 at 15:41
  • @Lundin They do funnel to the review queue, but mods also have the ability to process NAA and VLQ flags which we will still do. – Taryn Nov 19 '14 at 15:41

I'm the author of the reply in question, and I thought I'd try to explain why I answered as I did, and see if it changes either of our opinions. I'd also definitely appreciate feedback from any other participant in this dialogue. (I hope this is an appropriate direction to take this meta post in.)

  • In my opinion, it's a bad idea to attempt to locate the install directory of a particular application based on the value of argv[0], precisely because all methods of doing this are inherently error prone and therefore can fail in hard-to-diagnose ways.

You're welcome to disagree with this point of view of course, which comes from unix experience that is command-line centric and pre-dates the extreme dominance of the GUI application. It is legitimate, I think, to criticize this response and the the one linked to for failing to call our this assumption.

  • Because of this belief, I want to discourage people from heading down this path in favour of either designing their programs not to need this information or using some other way to get it.
  • At the same time, there are well-known heuristics that do work almost all the time.

These two reasons together are why my answer is phrased as it is: I want to suggest that the question being asked indicates that you might be heading down a wrong path in your design, and that you might want to reconsider your approach. Finally, I linked to another response, also by me, that makes the same argument with more explanation of the heuristics that can be used.

So, as others have pointed out, this answer, very roughly, is of the form I don't think you should do the think you're asking about because of reason Y, but if you really want to do so you can find some approaches at Z.

I'm trying to understand just what about my answer you object to.

  • Do you dislike that fact that I'm trying to discourage the OP from the solution he's trying to find, instead of "just answering the question"? If so, I'll just say I disagree on what's a valuable response: it's easy for anyone to head down a wrong path while solving a particular problem, and this often shows up as certain kinds of question. Sometimes, the right think to do is to re-direct a questioner in a better direction.

  • Do you think there are missing assumptions that make the answer incomplete, or even incorrect as written? I agree that some of my underlying assumptions aren't made clear in this post, but I'm curious if you have thoughts on what might improve my answer.

| |
  • My problem is that what you posted as an answer doesn't attempt to answer the question. I'm not arguing with the correctness of what you said, or with the value of what you said, but with the fact that you posted something as an answer which wasn't an attempt at an answer. It was related, certainly, but it was nothing more than a comment and should have been posted as such. I'm quite shocked that nobody else seems to agree with me on this. – ArtOfWarfare Nov 20 '14 at 15:10
  • 2
    @ArtOfWarfare: I'm confused, I guess. My response includes the phrase "there are heuristics that work almost always in practice", and a link to another response that explains those heuristics. So, I think I did offer an answer to the exact question asked. However, I do strongly believe that it's often the right thing to re-direct an OP in a better direction instead of literally answering his or her question, and that such responses are at least as valuable as literal answers and so shouldn't be just comments. I suspect it's this latter view with which you disagree. – Dale Hagglund Nov 24 '14 at 5:11

The answer you flagged doesn't say that there is no answer, it says there is no guaranteed way to achieve what the OP wants. The top answer in the link you provided uses similar phrasing:

You can't directly determine the location of the main script being executed. After all, sometimes the script didn't come from a file at all. For example, it could come from the interactive interpreter or dynamically generated code stored only in memory.

The key point is that the answerers are suggesting that OP is approaching the problem the wrong way and the workarounds are superior alternatives. It clearly works for the OP as the top answer was accepted.

However, this is not the same as saying "there is no solution" to the problem, which you seem to be getting at. A comment that says "you can't do that" is noise - it doesn't request clarification or suggest an improvement to the question. An answer that says "you can't do that" followed by why you can't do that however is certainly an answer. If nobody was allowed to answer with "there is no solution to the problem", then duplicates about the halting problem would pile up.

As for your second concern about it being mostly a link-only answer, I disagree. It does briefly summarize the contents of the link and uses it to support the main premise of the answer. See Your answer is in another castle: when is an answer not an answer? for reasoning on official policy on how NAA flags on these types of answers are handled.

| |

"You can't do that, because of <link>" is on the border to a link only answer. This is not a good answer and there is really no valuable information in it. I think I would have flagged this as a link-only answer too. The poster needs to learn to add more information to their answer, to make it meaningful, otherwise they might as well post it as a comment.

But apparently not all SO users agree on what makes a link-only answer. There is always the bunch who come and say "I agree with you that the answer is crap with next to zero value. Yet I insist that this is still an answer, because before they dropped the link, the poster wrote a little sentence which could possibly be salvaged into something mildly useful. So we must preserve this answer for future generations!"

Here is another example of an almost identical debate, where I considered the answer to be pure crap which should get deleted, while other SO users insisted that the pure crap must be preserved. So I believe there is no consensus about what to do with close-to-link-only answers.

Now what really would have settled the OPs case, is if the link was to another Stack Overflow post which answered the question. The question would have been a duplicate and we should close the whole thing. In this case, the link was to SO, but the duplicate candidate was in a different programming language, so it is not a proper duplicate.

| |
  • 2
    The post still answers the question even if you strip out the link. Following the link is not necessary to getting an answer to the question, it is only there to provide additional information that is supplementary to the answer. That very much makes this answer a valid answer to the question. Adding a link to an answer doesn't turn a valid answer into an invalid one. – Servy Nov 19 '14 at 15:54
  • @Servy See §2 of my post. – Lundin Nov 19 '14 at 17:37
  • 3
    So because you don't like the answer and don't think that it's useful it must be a link only answer? No, it's just a low quality answer that's not useful. There's are plenty of well established mechanisms (mainly to downvote) for how to handle an answer that you think is not useful, and flagging it as NAA is not one of them. – Servy Nov 19 '14 at 17:44

You must log in to answer this question.

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