IMHO a one line answer that is not backed up by references and doesn't show significant research efforts doesn't fit to P.SE. An example (no offense to Thorbjørn who is actually one of the best contributors): How would you know if you've written readable and easily maintainable code?. Peer code reviews is indeed one of the best ways but this answer doesn't explain why, doesn't give any references, etc. It seems like the contributor didn't have the time to work on the answer. In that case I think that a comment would be more appropriate. Am I right or I'm missing something here?
5It's not an issue. :P– Michael KApr 17, 2012 at 19:19
Link to version of answer referred to: softwareengineering.stackexchange.com/revisions/141010/2– Thorbjørn Ravn AndersenNov 2, 2020 at 15:38
I think that you are partially correct.
A one line answer without any demonstration of experiences or citations of references isn't an example of a great answer. I wouldn't go so far as to say it doesn't fit the site, but it would be something to look at. A short answer that doesn't share experiences or references could be a bad answer, or it could be indicative of a bad question that doesn't elicit the need to share experiences or references.
However, no answer should be posted as a comment, even if it is short enough. Comments are for asking clarification or providing additional information, not providing answers.
Writing a novel when a sentence will do is a bad answer.
This MSO discussion sums it up well:
Of course, obviously the better answers will generally be longer than one line. To bulk up the content, you might consider doing things like:
- linking to the appropriate documentation
- including a code sample
- suggesting a superior alternative approach
- cautioning against some things that people in the same situation commonly do wrong
- adding superfluous bulleted lists
There are many good answers that can be written in one sentence. However, the best answers explain the reasoning behind that one line. They explain the thought process that is required to arrive at the correct decision. They may include a personal experience that supports the conclusion reached. I've seen some good answers that take the approach the OP originally thought of and show how it leads to failure, and then present a better solution.
The best defense against harmful one-liners, as with many things on SE, is your voting powers. Don't be afraid to downvote the one-liners!
1One-line answers should not be comments. If one was flagged, I'd be more likely to leave a comment asking the poster to elaborate and then give it some time, then delete the "answer" if it was not expanded upon within a day or so.– Thomas Owens ModApr 17, 2012 at 19:31
@ThomasOwens You're right, I didn't think through that completely. One line answers might still be answers - just inferior ones compared to those that are fleshed out. Apr 17, 2012 at 19:34
I absolutely agree with what you have now - use your powers of downvoting incomplete or sub-par answers, leave a comment asking for more information or elaboration, and flag so that moderators can remove the low-quality posts that aren't improved upon.– Thomas Owens ModApr 17, 2012 at 19:36
Judge an answer by it's quality and correctness, not it's length.
Downvote it if the quality is below an acceptable standard, or the answer is incorrect, but don't discriminate against answers just because of their length.
Also don't forget, you can always leave a comment requesting the user expand their one-line answer into a more detailed response that covers the hows and the whys of the situation. I find many users are quite willing to do this if asked, and it will probably lead to them writing better quality answers in the future.
2I mentioned "a one line answer that is not backed up by references and doesn't show significant research". So it's not just the length. Also, it is unlikely that you can fit in one line references, personal experiences, etc. Apr 17, 2012 at 20:42
1@faif My answer would be the same for one-liners that don't contain references or show significant research. Judge the answer by it's quality and correctness, not by unrelated properties such as length, research shown, or references given. Sure these attributes might indicate a lower-quality answer, but not all the time.– RachelApr 18, 2012 at 13:28
Note: I only found this discussion accidentally.
I find it interesting that you consider my answer to be an example of "...a one line answer that is not backed up by references and doesn't show significant research efforts..", and I believe this is not so.
Perhaps the misunderstanding is that you would like explicit mentioning of all the references and all the research effort in the answer.
In this particular case it is simply not necessary. The laconic style is intentional since lots of wording will just muddle the point being made, namely that you as the author of the code cannot tell, and the computer being a victim of the halting problem cannot either. You MUST ask another human (or yourself when you have forgotten sufficiently of what you knew when you wrote it). I believe the number of upvotes reflect that other programmers have enough experience to recognize this too.
So, in this case a one-liner is the most precise way of mentoring the asker.
1upvotes aren't a reliable indication for answer quality don't you think? For your case, it seems to be more compelling to point out that answer gained only 2 downvotes - with 2K+ views at generally downvote-happy site like ours this sends pretty strong signal that vast majority of readers were able to infer needed context without explicit pointers Apr 18, 2012 at 12:59
@thorborn I'm not saying that your answer is bad (I up-voted it too). I just don't consider it complete. I think that both sides can do better; You as the contributor can provide more information, and people who like the answer but don't consider it complete should ask for extensions (which is what I'm planning to do from now on). Apr 18, 2012 at 17:22
@gnat The question is: Should we expect from the readers to infer the needed context? Apr 18, 2012 at 17:27
@faif expanded my answer with clarification on that Apr 18, 2012 at 18:02
@gnat you may have a point about the downvotes being a more reliable indicator than the number of upvotes.– user1249Apr 18, 2012 at 23:08
@faif a complete answer to this particular question would most likely be very, very long.– user1249Apr 18, 2012 at 23:11
Thorbjørn I noticed that I am displayed as a "CW-author" for your answer. Given its revision history, this just doesn't feel right. I think if you add then remove
<!-- some substantial amount of invisible text -->, this might bring not particularly smart CW heuristics back to normal. I would appreciate if you test that workaround Apr 28, 2012 at 20:51
@gnat, I'd rather that you bring it up with a moderator.– user1249Apr 28, 2012 at 21:18
Thorbjørn after discussion with @ChrisF I brought this question at MSO Meta Apr 29, 2012 at 12:20
Thorbjørn per MSO question (now closed as duplicate), it looks like inserting
<!-- some substantial amount of invisible text with more line breaks than were in my edits -->would be considered a reasonable workaround for a known limitation of CW-attribution algorithm Apr 29, 2012 at 14:11
@gnat And all this for you trying to "improve" on my answer...– user1249Apr 29, 2012 at 14:19
this is not surprising - yet another point that "expanding high quality one-liner could do more harm than good" Apr 29, 2012 at 14:38
1@gnat I tested your workaround. The authorship was changed.– user1249May 9, 2012 at 0:17
great to hear that! I felt really uncomfortable seeing my name under the post where my contribution was zero :) May 9, 2012 at 4:50
Your example looks like an awesome answer to me.
- How would you know if you've written readable and easily maintainable code?
- Your peer tells you after reviewing the code.
Not only does it answer the question, it also introduces important notions of peers, code review and feedback, ties them together and presents in a way that is easy to understand and use.
Answer style is not quite typical, in the sense that most other good answers I've seen at Programmers tend to be more verbose. But since stylistic consistency is not the only criteria I use, this doesn't worry me.
For the sake of completeness need to note that this particular one-liner is pretty exceptional; vast majority of other one-liners I deal with at P.SE are not like that - easy targets for downvote, flag or "expanding edit".
The question is: Should we expect from the readers to infer the needed context?
Good question. My take is
- in more typical cases it's better to just err on safe side and provide context explicitly
Mainly because expanding average one-liner does no harm.
- in this particular case - yes, it looks reasonable to expect that from a reader
Because expanding high quality one-liner could do more harm than good.
To avoid misunderstanding, I would like to make it perfectly clear that I support general guidelines you referred to. I believe that one-liners are typically not a good fit for Programmers. I also think that providing explicit answer context is as a rule beneficial for the answer quality.
The fact that I may occasionally encounter particular exceptional case (like it was with your example answer) won't stop me from following these guidelines.
I'd argue that an one-line-answer with many upvotes is an indication of a bad question. An answer that doesn't need citations, explanations or references to be deemed correct is most likely either an obvious answer ("yes, a compiler compiles") or a highly subjective/religious answer ("Linux is better"). Good questions do not provoke such answers, at least not with that many upvotes.