On Code Review SE, users should avoid answering questions in comments, because that's not what comments are for:

Do not provide suggestions for improvements in a comment, even if your suggestion makes a very short answer.

How do I write a good answer?

Recently, I have made efforts to make people aware of this rule by leaving a comment when they violate it. Often, this was something along the lines of 'Please, don't answer questions in the comments, but add an answer instead.'.

On May 15th, this question was posted here. Yesterday, I edited it and then voted to close, because the question was off-topic. I then saw that @Martin York left three comments:

  1. I would use libEvent that will tell you when a socket has data and you can go get it. But that is very low level. Above that there is boost async io boost.asio library that virtualize sockets into sinks and streams. There is nothing really in between (that I know of). – Martin York May 15 at 22:23

  2. PS. Using threads to increase parallelism to read more from sockets is the wrong way to go. Socket communication is inherently slow (compared to processors) and threads are expensive and bulky. The better way to go is have a single thread multiplex across thousands of connections. This is how modern web servers work. See C10K. – Martin York May 15 at 22:28

  3. If you are interested I have wrapped sockets. To provide a non blocking std::istream. So you can create a socket connection and it behaves like a normal std::istream. Any blocking operation causes the thread to finds another stream to handle. See ThorsNissa. It is noware as polished or advanced as boost asio but I work on it when I have time. Current documentation here: lokiastari.com/ThorsNisse/#introduction – Martin York May 15 at 22:37

In my opinion, these three comments make up an answer of its own, and should be merged into a single answer. Remember:

Answers need not cover every issue in every line of the code. Short answers are acceptable, as long as you explain your reasoning.

How do I write a good answer?

I made the user aware of this by replying:

@Martin York Please do not answer questions in comments. Add an answer instead. – Coal_ 17 hours ago

To get this response:

@Coal_ if I wanted to answer the question I would have. As a result I only made a couple of quick comments. As such if you think these should be answers please feel free to expand on the simple comments into a full answer, rather than making piffy comments. – Martin York 14 hours ago

I again tried to explain why the comments should be an answer, but got a snarky response:

@Coal_ You are wrong there is not enough information here to constitute an answer. Just a set of brief comments that give advice. I also will not be turning the comments into an answer because there is nothing valid to constitute an answer. But thanks for the wrong and unsolicited advice. Maybe when you gain some experience on this site you will understand the difference. – Martin York 1 hour ago

I don't want to pick a fight, my intention was to help, and to correct behavior, in a friendly manner. I flagged the first comment, but to no avail (yet, I understand the mods are busy).

  • Am I missing something and was my advice wrong?

  • What should happen to such comments in the future? Should we flag them? Should they be deleted?

I would like to add that the last sentence is an appeal to authority, which is a logical fallacy. Be nice.

  • 2
    \$\begingroup\$ I deleted the Meta comments from the post because they don't help the OP in any way and should be reserved for Meta discussion. \$\endgroup\$ – Malachi Mod Jun 4 '18 at 17:32
  • \$\begingroup\$ Did anyone get hurt, that you go down this road? Martin is a respected part of the community and him not following the rules so strictly doesn't harm anyone. \$\endgroup\$ – Mast Mod Jun 4 '18 at 19:14
  • \$\begingroup\$ @Mast I certainly didn't get hurt, but I wanted to know why he responded the way he did, and if my actions were wrong. That, again, is an appeal to authority. The rules are there for a reason, and everyone, no matter their amount of experience, should follow them. I find it harmful that you think people with more reputation can choose not to follow the rules. \$\endgroup\$ – Daniel Jun 4 '18 at 19:40
  • 1
    \$\begingroup\$ @Mast I don't see any clear rule that Martin did not follow though. There is no rule that I know of that says that you are not allowed to under any circumstances answer a question with a comment. The "Maybe when you gain some experience on this site you will understand the difference." part of his comment was totally unnecessary though and does go a bit against "Be nice". I also agree with Coal_ that it should be the same rules for everyone. \$\endgroup\$ – Simon Forsberg Jun 4 '18 at 20:33
  • \$\begingroup\$ @SimonForsberg I agree there's no clear violation, but didn't want to argue the point. \$\endgroup\$ – Mast Mod Jun 5 '18 at 14:54

Comments are 2nd-class citizens in StackExchange (actually, they are 10th class).... they are intended to be short-term communications that allow people to improve their posts, and should, ideally, be deleted when their purpose has been served.

If Martin chose to express concerns, or give opinions in a comment, then that's fine, and hopefully the OP uses that inspiration to improve their post (if it is code-related corrections then they should improve their post before it has answers).

In this case, it seems Martin wanted to throw out some ideas that would improve the code without going in to the full/comprehensive review that he's well known for. That's perfectly fine if that's OK with him. Note that if the OP decides to revise their post to correct these "initial" issues, then maybe a full review would be done. Who knows.

Having said all that, there's no reason why someone can't come along and collect Martin's (and other) comments in to a cohesive answer, and then make the comments obsolete.

Just because it's generally best to give advice in the form of an answer does not mean that it's the only way to do it. Perhaps Martin anticipated the post being off-topic, and did not want to add an answer pointing out issues in an off-topic question (which in turn won't get deleted by the system since it would have an answer).

Bottom line, if someone adds value in a comment, there's nothing wrong in borrowing that value to put it in to a more permanent answer, but try not to answer posts you believe are off-topic.

  • \$\begingroup\$ I don't get it. 1) If the question is off-topic, it should be flagged as off-topic, right? Why would answering in comments be allowed in that case? 2) Does this mean the help center (and comment placeholder) are wrong to mention that questions should not be answered in comments? \$\endgroup\$ – Daniel Jun 4 '18 at 16:06
  • 1
    \$\begingroup\$ I think I'm misreading your answer, is answering something off-topic in comments ok, but in an answer box not? If I'm not misreading, why would it be ok to answer questions in one form rather than another? \$\endgroup\$ – Peilonrayz Mod Jun 4 '18 at 16:06
  • \$\begingroup\$ To clarify: the comments made were concerning the code, not the question as a whole (formatting, testing, tags, ...). They were not asking for clarification. 'to correct these "initial" issues ...': no, these aren't issues, Martin was providing alternative solutions. \$\endgroup\$ – Daniel Jun 4 '18 at 16:22
  • \$\begingroup\$ if code is broken, and it is obvious, and the post could be made to be on-topic, CR has, in the past commented to this effect so that the user has a better chance of a good review. \$\endgroup\$ – Malachi Mod Jun 4 '18 at 17:18
  • Am I missing something and was my advice wrong?

    No, under the comment privilege page it says:

    When shouldn't I comment?

    Comments are not recommended for any of the following:

    • Suggesting corrections that don't fundamentally change the meaning of the post; instead, make or suggest an edit;

    • Answering a question or providing an alternate solution to an existing answer; instead, post an actual answer (or edit to expand an existing one);


  • What should happen to such comments in the future? Should we flag them? Should they be deleted?

    They shouldn't be there, if you follow SE rules, and so should be flagged to be removed.

    However I have previously had flags against comments like these declined, and so I don't think everyone agrees on this.

    Either way you may want try to educate users with a friendly comment and flag the problematic comment, with a custom flag, whether or not the poster listens to you. If the user insults you, then flag that against the rude or abusive flag.

We don't allow users to answer off-topic questions for various reasons, where these problems arise whether you comment or answer questions.

  • 2
    \$\begingroup\$ The keyword here is: recommended. It is recommended to post an answer instead, but if there are comments then don't force someone to post an answer. Adding value in comments is better than adding no value at all. \$\endgroup\$ – Simon Forsberg Jun 4 '18 at 17:05
  • \$\begingroup\$ @Simon Forsberg I disagree, because comments were never intended to be used for answering in the first place. It isn't any extra effort to write an answer in the answer box than to write it in the comments, plus you get all the benefits of voting, comments on the answer, etc. \$\endgroup\$ – Daniel Jun 4 '18 at 17:17
  • \$\begingroup\$ @Simon Forsberg The comment box placeholder and the article I linked to are also decidedly more strict than the privilege page. \$\endgroup\$ – Daniel Jun 4 '18 at 17:18
  • 1
    \$\begingroup\$ @Coal_ It's correct that it's not intended to be used for answering. But I think it's a bad idea to punish people for writing an answer as a comment. I do however think it's a good thing to encourage people to write it as an answer instead. \$\endgroup\$ – Simon Forsberg Jun 4 '18 at 20:24
  • \$\begingroup\$ @Simon Forsberg I agree with you on that. Do you suggest leaving a comment and not flagging? \$\endgroup\$ – Daniel Jun 4 '18 at 20:27
  • 3
    \$\begingroup\$ @Coal_ A simple "I would recommend writing that as an answer instead of a comment" is what I would go with, yes. At least if I would handle the flag and I see that a comment provides value that no answer does - I would reject the flag. Unfortunately we don't have a "convert comment to answer" button either. \$\endgroup\$ – Simon Forsberg Jun 4 '18 at 20:29

You must log in to answer this question.

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