12

Did I give too much info on this question? Was it redundant to write all the general procedure, to help readers understand the code? Is the code necessary even if I provided an easily-accessible MCVE? (For the latter I guess so)

I just wanted to know if too much info given on a question can be misleading or unnecessary.

7
  • the question seems to be very clear... Jan 20, 2017 at 14:03
  • 1
    Just a quick question: what’s an MWE? Minimal Working Example? Jan 21, 2017 at 0:18
  • Yep. Should it be MCWE?
    – Eugenio
    Jan 21, 2017 at 0:34
  • 5
    @Eugenio Call it MCVE.
    – user6820627
    Jan 21, 2017 at 1:26
  • 1
    MVCE.
    – jpmc26
    Jan 21, 2017 at 21:45
  • @jpmc26 It’s MCVE
    – Jed Fox
    Jan 23, 2017 at 13:07
  • @JF Yay for typos. Good catch.
    – jpmc26
    Jan 23, 2017 at 13:10

1 Answer 1

20

I don't think there's too much info in that question. It's entirely appropriate to spend a few sentences briefly describing what the purpose of the code snippet is. It's not always necessary (although sometimes it is) to add some greater context to the code beyond what the specific problem with it is, but it's typically helpful, so long as it's a suitably brief description (yours seems fine in length).

As for whether all of the code was necessary, I don't know enough about the subject matter to comment. It's not so long that I'd be super worried about trying to shorten it, but perhaps a subject matter might be able to realize that you could cut 1/3 of it out without meaningfully changing the question; I wouldn't know. If such a change would be possible, it would likely be helpful, although it's not so long of a snippet as is that I'd consider it essential for the question to shorten the code.

All that said, you do have enough information that you probably do want to be rather mindful about how you format it, not just what you include. Burying the actual question halfway through the question, with several paragraphs of preceding information and several paragraphs of following information, isn't ideal. It more or less forces the reader to read the whole thing just to figure out what you're actually asking. You bolded the question, which does help, but really it's better if you can just lead with the question, so that you don't need to bold it. If you open with the problem you're having, then explain your code and then, if necessary, repeat the question later (about where you have your question now) once you've finished setting up the question.

In general when you're writing a question that is adding information that you think might be useful, but may also not be essential to an answerer, you want to be careful about where you put it in the question. Ensure that readers start by reading everything that's essential and then move on to supplemental information that might be helpful, but also may not be necessary. When you start with the supplemental information, and then move on to the critical information, you risk people missing some of the critical information, or simply giving up on your question and moving on because reading the first half didn't give them any idea what the question is actually about.

4
  • That's a good answer, I'll keep it in mind (and edit the post of course). Thx!
    – Eugenio
    Jan 20, 2017 at 17:09
  • Just a question out of your discussion: is it acceptable for a questioner to show only a part of the code, with an external link (like I did) and then as an answer share the whole code? (I can ask this question in another Question if necessary (I'm doing meta-meta-stackoverflow))
    – Eugenio
    Jan 22, 2017 at 1:02
  • @Eugenio Posting the complete code externally is a big no; link rot is a major reason for this. But aside from link rot, if you're doing it for length reasons, that would usually indicate that your MVCE wasn't minimal enough. An answer is certainly not the place for additional detail about the question, though; such an "answer" would be rightly flagged as "Not an Answer."
    – jpmc26
    Jan 22, 2017 at 23:05
  • @jpmc26 OK then, understood. By the way, I moved my question here meta.stackoverflow.com/q/342051/5794332
    – Eugenio
    Jan 22, 2017 at 23:12

You must log in to answer this question.

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