-12

I was interested in a topic I did not know much about, and had a specific question in mind. I researched and answered my own question to the best of my ability in one night of research, and I invited others to provide better answers.

My question was first closed as being based on "opinion" (all reasoning is actually based on objective criteria), and I was mildly irritated by the community response. I was hoping that instead of having my answer criticized, that better answers would be posted. It does not reflect well on anyone, when they criticize a solution, and do not offer a better alternative.

Perhaps the essential problem was merely the phrasing of the question, since a "preference" can be an "opinion" when it is not taken in specific context of desired criteria (the latter is the case for my question).

What has really annoyed me is that my question has since been deleted. It's a good question that deserves an answer. Perhaps it is possible to amend my Question and Answer so that it is not perceived to be "opinion" based.

Here is the Q/A.

Here are screenshots:

enter image description here enter image description here enter image description here enter image description here enter image description here

Note: there are a few minor errors in the answer as it stands. memcpy should be used instead of mempcpy as it is standard and likely a compiler intrinsic. And I allocate an extra byte in at least one example. The points in general stand as they are. A discussion of the choice of strscpy to return ssize_t instead of size_t should also be discussed.

8
  • @JohnMontgomery This question has two down votes now. Any other suggestions to improve? I compiled a lot of meaningful and useful information on a topic that has poor coverage on StackOverflow (you have to crawl through half a dozen links and read the comments on all of them just to get an overview). My Q/A was initially well received before high reputation users decided to close and delete it. And they seem not to understand the subject matter (only one C programmer voted to delete, the other two are full stack and OO language dev).
    – okovko
    Feb 20, 2020 at 2:22
  • @JohnMontgomery Was I simply mistaken that StackOverflow is a place for in depth cross analysis? Maybe there is a more appropriate forum.
    – okovko
    Feb 20, 2020 at 2:27
  • 4
    Better if a tag expert gives you a more in depth answer, but the linked question boils down to "What is the preferred strcpy alternative? How does it compare to the other options?", which would be very hard not to construe as a primarily opinion based question.
    – yivi
    Feb 20, 2020 at 7:16
  • 1
    And you are right, the site is not the appropriate place for "in depth cross analysis". It's a site to "get answers to practical, detailed questions", as explained in the tour. It also says: "Focus on questions about an actual problem you have faced. Include details about what you have tried and exactly what you are trying to do".
    – yivi
    Feb 20, 2020 at 7:17
  • 3
    1) "which alternative is preferred" is not objective. Preferred in which sense? Safety? Easy to use? Speed? 2) Your answer doesn't talk at all about strcpy_s.
    – BDL
    Feb 20, 2020 at 7:30
  • 6
    "instead of having my answer criticized, that better answers would be posted" – That's asking a lot of people. What you've attempted there is to compile some very extensive article, which you said yourself took you a whole night. Especially since it contains a whole lot of details, it should obviously be "peer reviewed", i.e. criticised, to correct errors within it. Expecting others to instead write something even more comprehensive was… too ambitious.
    – deceze Mod
    Feb 20, 2020 at 7:48
  • @BDL Preferred in the context of the three things you listed... obviously...
    – okovko
    Feb 21, 2020 at 0:37
  • @deceze I've read a lot of really high quality Q/As on StackOverflow where questions and answers were very long and discussed tradeoffs. These are the highest quality and most useful answers on StackOverflow. I don't know why or when SO decided to become Twitter, but this is lame, and I will be finding a new community.
    – okovko
    Feb 21, 2020 at 0:45

1 Answer 1

15

There are 3 problems with the question:

  1. The question lacks a practical question.
  2. It asks which on of several choices is the best
  3. The tone of the post is asking for discussion

More detailed comments/suggestions:

  1. Lack of a practical question is common problem with self-answered questions. Often this happens because author has some answer and tried to come up with a question. This leads to lack of criteria what will qualify as answer and what alternatives can be suggested. Sometimes searching for similar questions or actually starting from someone else question leads to better results.
    In case of this particular Q&A I don't think you can solve that as answer tries to be very broad and generic.

  2. The question essentially asking for "the best" approach without any criteria for what is "better". This is very common problem with questions and often indicates lack of understanding of general constraints - faster/shorter/more secure/thread safe/... most of those can't be satisfied at the same time and none of alternatives is "the best" overall. It does not help that such wording frequently used for "give me teh codez" questions.
    Starting with practical question usually lets one avoid that problem, but in this case you don't have one - so deciding what exact criteria you want to use for "better" will make question more concrete.

  3. Overall tone of the question is way too conversational and more suited to start a discussion rather than ask a concrete question.
    Sticking to basic "I'm trying to {what}. I looked at {list of references}. It did not help {because}. I'm looking for {concrete requirement}" format is a good option in general and especially for self-answered question where you don't really have a question. At very least avoid text that has no purpose in the question like "misinformation is rife". Sticking to facts ("Linus suggested ZZZZ") vs. almost insulting text that reads like "those two {well respected people} can't agree on this but I have the true answer" would be beneficial.

Side notes:

1
  • I believe it is practical to compare the safety and fundamental efficiency of various implementations for similar tasks. [abusive language removed —ed.]
    – okovko
    Feb 21, 2020 at 0:40

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