30

EDIT I have finally decided that my original question is really too broad and not answerable in Stack Overflow format (constructing and broadening the MCVE on my own to try and reproduce the error, I still can't reproduce the error even in an example that is not-so-minimal any more). I have changed it to ask only a small part of the original question.

I am editing this question only to draw attention to the fact that the question linked in this meta post is not any more "based on a super-complex code structure". If it is possible (or better) to link to the old version of my question, just for the purposes of this meta-question, maybe somebody can do it (since I don't know how).


I've been on Stack Overflow for some time now... I'm not highly active, and 2.5k rep is lower than most very active users, but I do think that I know at least the basics of asking a good question.

However, I have been working on the same project for over a year now and my problems are becoming complex, and sometimes strongly relying on a complex code structure. I was mostly avoiding Stack Overflow, because it would take me hours to get a small enough MCVE, and even then the best I could do was just too long to capture anybody's attention.

I finally decided to post a question today. To explain the context, the "structure" I am working on is a Tree implemented through Nodes. I am trying to apply some attribute-like stuff to every node of the tree, which is very templated (the first one has different possible types and return values, but all these attributes need to be handled as one, the second one is actually templated by the different concrete classes of the first one, and again need to be handled as one) -- so I am using my abstractions on the Tree.

The project is much bigger than this -- I literally spend 2 hours to reduce it as much as possible (only the "skeleton" of the Tree+Node, only "skeletons" for all the abstract classes + only one concrete class example), while still keeping all the complexity that is causing the problem. If I could better identify where the problem was, I possibly wouldn't need any help in the first place.

I don't know how to make my example executable, since all the construction algorithms initializing all these structures are quite long and complex (it is a tree constructed upon a different structure). Even just initializing everything correctly takes up a screen of code. Just filling the tree with meaningless nodes would just add more text to the question (and people are having problems with the length). However, I did do my best to post the code that is as-close-as-possible to executable and compilable, as well as readable.

The question still ended up being very big. I understand that a lot of people do not want / do not have time to read such a long question, and that is okay.

But, the question also received a downvote and 4 close votes almost right away. I have to admit, this hurts a little bit, as a description of a downvote is "The question does not show any research effort; it is unclear or not useful", after I have spend 2 hours trying to make it brief, yet clear, reducing my code as much as possible but still leaving all the important details, re-writing the question a few times before posting so the order is concise. All this after searching the net and Stack Overflow for answers. After which I did the best I could -- explained my problem to the best of my ability, and came to get help and learn.

While I understand why a MCVE is important -- I would guess that the Stack Overflow community also understands that not every big project is reducable to only 10 lines of compilable, executable code that reproduces the problem.

So, I guess I want to ask: how do I improve this particular question and in general, how do I write better questions that are based on very large projects?

Frankly, I guess I am also hoping for a bigger concensus on the quality of the question: I am wondering if people closed / dowvoted it because they do not want to read something too long at all, or if they really think that this length is very inapropriate for such a question. I can accept if I'm wrong, but I would love to have some better guidelines than the comment section.

16
  • see the example above :)
    – ninjabber
    Sep 25, 2014 at 15:03
  • 1
    AFAIC there is nothing wrong with asking long, localized questions these days so why are you worried? Your question is fine ++
    – user2140173
    Sep 25, 2014 at 15:14
  • 10
    @vba4all 4 close votes and a downvote, plus the first two comments simply being "MCVE" makes penelope a worried girl :)
    – penelope
    Sep 25, 2014 at 15:20
  • @ninjabber To the contrary of the original question, here I tired adding a lot of context to find a general answer :) But, true enough, I have been taught that in writing, sacrificing clarity for brevity is not a good practice.
    – penelope
    Sep 25, 2014 at 15:22
  • @penelope I've been close voting your question as being too broad in it's actual form. I also agree with the demands for a MCVE. Probably trying to reduce your problem to such a minimal case that reproduces the behavior will help you to resolve the problem. Sep 25, 2014 at 15:44
  • 2
    Surely your error doesn't require the entire tree to reproduce. I'm not a C++ expert, but doesn't the error message at least tell you where the error is occurring? And if you know that, can't you look at the same general area in the code that is working and divine some insight? Sep 25, 2014 at 15:44
  • @RobertHarvey The thing is, I am actually wondering why the error is how happening at one place in the code (I have tried to mark the place where I am, expectantly, getting the error). The the explanation for that just might include the whole class hierarchy -- I just don't know.
    – penelope
    Sep 25, 2014 at 15:54
  • 2
    What people don't seem to understand is that the problem doesn't lie in you not providing an MCVE, but in the fact the very nature of the issue makes it impossible to produce one, because, as you've stated, the code involved is extremely large and complex. Unfortunately, I'm not sure how this can be remedied.
    – BoltClock
    Sep 25, 2014 at 17:11
  • @BoltClock Yes, I think that's actually it. I actually made a MCVE from the code I taught was involved (I'm updating now) -- and it works! Which means that localizing it to the best of my abilities wasn't enough, and I'd have to add more to reproduce the problem. But, then, are problems of this size even suited for SO, at all? :/ Since currently, I have very little simple problems, and most of them are like this (except, usually I am right in my localization)
    – penelope
    Sep 25, 2014 at 17:17
  • @penelope: Unfortunately I think the line between a difficult question and an unanswerable question - especially when it comes to debugging - is a very fine line. This is why we encourage MCVEs in the first place - to make the problem as quick or easy to identify as possible.
    – BoltClock
    Sep 25, 2014 at 17:18
  • @BoltClock Yes, I guess I can only continue working on my example: if I manage to reduce it, I'll update with the info, and if I don't and deem the question unanswerable for this format, I'll remove it. Thank you
    – penelope
    Sep 25, 2014 at 17:20
  • @KevinB Thank you for the advice, really. I wasn't focusing on the structure - but reproducing the problem did require me to reproduce the structure. Unfortunately, looks like the problem is not in those pieces of code - it's in something I left out. I can't yet reproduce the problem even, in trying so I keep writing correct code :) However, I am removing the question, cause nobody here can correct my code based on this, and the full thing is simply too massive for any community.
    – penelope
    Sep 25, 2014 at 19:11
  • Not a C++ user, but aren't you asking about a compilation error? If so, the 'C' in MCVE shouldn't apply -- you just need enough code to reproduce what you're asking about.
    – jscs
    Sep 25, 2014 at 19:39
  • @JoshCaswell Well, as I wrote in my last edit before the question got closed -- my "minimal" example, which I taught would reproduce the error -- is compiling and running without any errors :/ I extended my minimal example (locally, for myself), adding more and more stuff, but I still can't reproduce the error. Basically, at this point I think the problem is too big to be answerable here, but I can't delete it because of two (zero voted!) answers :/
    – penelope
    Sep 26, 2014 at 8:56
  • "If it is possible (or better) to link to the old version of my question, just for the purposes of this meta-question, maybe somebody can do it (since I don't know how)." that can be seen in the revision history if needed.
    – Kevin B
    Sep 26, 2014 at 15:43

1 Answer 1

7

Honestly, (I know you already this) I see that some people are not fair and not right, that is just the way it is in this world, I'm afraid. To add on, not every question you make doesn't have to be reproducible code especially if it is too big. Some questions I see are how to do something and show code for effort, but the code cannot be used to reproduce anything especially if it is database related. Some code can just be shown by the user for others to see what the problem might be.

I guess some advice I could give is maybe you can just show the snippet of code where the bug is and ask the question in relation of the error. For instance, even in this question, I sort of had to skipped down to the end to see what the question you are asking was, I am just pointing that out, not be mean or anything like that. Just try to keep words to a minimal sometimes and if you need help about asking particular question, I and others will be happy to help.

4
  • Thank you for your suggestions. We all have to work on our writing skills :) But, while I knew that sometimes the world is not fair, after the response to this question I was just honestly wondering, maybe I'm just writing bad questions. And since people on meta are usually friendlier and more ready to explain and discuss these kind of issues, I asked. That's what SO is supposed to be about after all, asking :)
    – penelope
    Sep 25, 2014 at 17:19
  • 4
    You may be the first person in the history of Meta to say that "people on meta are usually friendlier and more ready to explain"! :)
    – jscs
    Sep 25, 2014 at 19:42
  • @JoshCaswell That might be, but most advice on improving my question I ever got on SO (at least, the last couple of years) was a link to the FAQ or MCVE. And I've actually seen some people asking for advice on meta -- some of them even successfully :)
    – penelope
    Sep 26, 2014 at 9:03
  • It's not "just the way it is in this world". The way things are is (1) not the same in all contexts and (2) subject to change through social/community action. Just as an example of (1) - on some of the other StackExchange sites, users do not rush to downvote you and vote to close, but rather suggest improvements.
    – einpoklum
    Apr 4, 2017 at 15:54

You must log in to answer this question.

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