9

I recently made a comment on this post, and the comment was what made OP resolve their problem.

At that point, I wondered if I should make my comment an answer. So I searched on meta, and after reading this and this (tldr: better make an answer) I decided to add it.

I am now wondering if I should have done it beforehand.

Question: Should I have initially posted an answer instead of a comment?

The thing is, I guessed what was the OP's problem, but I was not sure about it.

4
  • 1
    answers aren't just for the OP. it can be for anyone who needs help with his situation (whenever they have it). Just post an answer with what you said. If it IS the definitive answer then he'll mark it the answer.
    – L_Church
    Jun 26, 2018 at 11:52
  • 5
    Shouldn't that be an answer, L_Church? :P Jun 26, 2018 at 11:53
  • 1
    irony evasive manoeuvres enabled
    – L_Church
    Jun 26, 2018 at 11:53
  • 5
    I think you did the right thing there. First getting clarification using the comments and then answering the question knowing (not just guessing) the answer. Jun 26, 2018 at 12:01

2 Answers 2

12

Should I have initially posted an answer instead of a comment?

No.

If the cause of a problem is not clear, you vote to close as unclear / off-topic (no mcve) and post a comment asking for clarification. Even if you're, like, 80% sure your guess is correct.

Stack Overflow is a place for clear, unambiguous questions with definitive answers. This is not a forum. Not a chat site with debugging hints ("try this"). It is a knowledge base.

Guesses, or rather requests for clarification (in this case "Are you executing the entire batch, or are you running a text selection?") go in the comment box, not in the answer box.

Once the question author confirms your suspicions, you can instruct them to add that additional information to their question, and post an answer.

0
-4

If you want to post a potential solution, you should be using an answer rather than posting a comment containing your guess answer. If you're unsure and could request clarification, that is often a good idea as CodeCaster indicates. It's best to avoid posting a speculative answer in the comments though.

A brief tangent on our model

This format works brilliantly to sort answers based on how useful they are, allowing correct answers to float to the top and wrong answers to sink. Not all questions can be answered definitively without clarification (such as more information, or clearing up an ambiguity). That's why comments exist—to clarify the post, or improve it so that it is answerable.

Answers in comments are discouraged because they bypass all of that. Your guess then sticks to the top of the page rather than being sorted and vetted by others.

In your case

Here's your answer:

You are selecting your SELECT line with mouse/keyboard and executing, thus not running at the same time (same batch, as Larnu says) the declare statement. @ is not #, you have to run it at the same time.

Though it is a guess, it doesn't sound like a request for clarification. I'd say you should just post it as an answer.

But what if it's wrong? Sometimes, your guesses will be wrong (if they're anything like mine!). You should still post it as an answer to allow others to vet your post, though—if you're wrong, you can just accept that and either delete the answer and try again later with another answer, or edit to fix your post.

There's no need to relegate your answer to the comments just because you're unsure. Go ahead and post your answer, and (as always) be ready to accept feedback and improve your post if necessary.

Posting a potentially wrong answer as a comment just means that it's pinned to the top, above the actual answers section. Comments can only be upvoted, so there's no way to signal an incorrect comment (other than posting yet another comment, which often spirals into a discussion rather than the tidy Q&A format that the system is designed for).

This advice doesn't necessarily apply if you're guessing due to a lack of information from the question. In that case, you should post a comment asking for more information, and vote to close as "unclear what you're asking". My advice above applies in the case that you're simply not sure of your answer being correct rather than not being sure what the author wants.

10
  • 1
    Yes, @CodeCaster, I'm advising that people with an attempt to answer should post an answer rather than a comment. That way, you can vote it down, rather than having it pinned to the top where the only direction of voting is up. It would be preferable for people to post only correct answers, of course... but sometimes you have a fairly good guess that you aren't 100% certain about, as in this case. I agree that we don't want nonsense being posted anywhere on the site, but at least in the answers section we have the tools to deal with it.
    – Aurora0001
    Jun 26, 2018 at 12:38
  • 1
    @Aurora0001 that facet of comment voting is worth more emphasis IMO.
    – ryanyuyu
    Jun 26, 2018 at 12:40
  • 4
    You shouldn't be advising that. This site is a place for clear, unambiguous questions with definitive answers. This is not a forum. Not a chat site with debugging hints ("try this"). It is a knowledge base. Guesses, or rather requests for clarification (in this case "Are you executing the entire batch, or are you running a text selection?") go in the comment box, not in the answer box.
    – CodeCaster
    Jun 26, 2018 at 12:40
  • Does the %chance you think you are correct matter? Eg, I was like 80% sure - that question was almost like "the natural path" of a newbie Jun 26, 2018 at 12:40
  • @CodeCaster, I think we're arguing more or less the same thing in a different way, then. I'm saying you should post your guess answer as an answer, or otherwise request clarification. "Are you executing the entire batch, or are you running a text selection?" is obviously a comment, as you say. But "You are selecting your SELECT line with mouse/keyboard and executing, do this" is an answer (even if it's wrong). I'm sure you agree that's a proposed solution; I agree that requesting clarification in this case might have been helpful, but that the way OP wrote it wasn't a request for clarification
    – Aurora0001
    Jun 26, 2018 at 12:46
  • 2
    The point is that I don't have the same trust as you have in the voting system. People use compassion upvotes, people refuse to remove incorrect posts that yield them a net reputation gain (-1/+1 votes means +8 rep). Therefore I don't believe in that people should be posting answers of which they're even a bit unsure to be correct, because the voting system doesn't work and the incorrect answers will remain on the site. It's not that hard to post a comment and wait for a reply, and barring a response, find another question to answer.
    – CodeCaster
    Jun 26, 2018 at 12:50
  • 2
    Do note that the OP posted that answer after the asker of that question confirmed their beliefs in comments - so they did the right thing by asking for confirmation first.
    – CodeCaster
    Jun 26, 2018 at 12:51
  • @CodeCaster The only thing I disagree with in the comment is that it was essentially a proposed solution there (it was exactly the same as the answer, except prefixed with "I bet"). If the OP had phrased it like you did in your answer below, we wouldn't be having this discussion. I'm merely saying if you're going to propose a solution, you've got to do it in the answer's section, and you're saying you should be as confident as possible in your answer (which I agree with). I'll take your points into account by editing this to clarify though.
    – Aurora0001
    Jun 26, 2018 at 12:55
  • Alright, so all you're arguing against is answering a question using comments instead of posting an answer. Yes, we shouldn't be doing that. But a comment in the form of "Are you doing X? Because that's how you get Y" is not an answer in comments. It is a request for clarification, followed by advice (perhaps even pointing to another question where the question is answered - but you can't dupe-vote if the cause is unclear). Just as that you shouldn't answer when the cause is unclear.
    – CodeCaster
    Jun 26, 2018 at 13:00
  • 1
    @George It's best to be as confident as possible in your answer. If you really are not at all sure if your answer is valid, either ask for more information or consider leaving it for someone else to answer. But essentially, if you want to post a potential solution, you must post it as an answer, not a comment. Even if it's a 5% chance, you shouldn't answer as a comment. In that case the best option is just to move on, though.
    – Aurora0001
    Jun 26, 2018 at 13:04

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