This is somewhat of a dilemma which I have come across on numerous occasion regarding: Minimal, Complete and Verifiable which states
- Use as little code as possible that still produces the same problem
- Provide all parts needed to reproduce the problem
- Test the code you're about to provide to make sure it reproduces the problem
When writing a question of a more complex nature, some of the code required to reproduce the problem in a copy/paste manner may include many constants as defined, as well as other use cases which demonstrate working examples where the problem does not exist.
I believe firmly in providing in as concise manner as possible all relevant information in order to be able to obtain an answer which is more directly related to the problem I am having, however sometimes showing cases where something may be working inclusive as part of the question showing the case where I am having the problem, requires more than an extremely simplified rendition of the problem which would leave it open to speculation of probable cause rather than actual cause.
While I do my best to shrink and simplify, my coding ethic already does that for me where when I do have a problem, the simplest form usually requires little or no further modification to offer it up for demonstration of the issue.
My problem, is this:
How much is too much code?
and
If a class can show relevant cases of both working and non-working examples, is it okay to include the functional portions to demonstrate both working knowledge of the problem at hand, and to offer a test bed where-by someone answering the question may easily check those cases to compare for anything missed?
The other problem, is that some of the methods I work with, don't have working examples online which reference all the necessary constants or API declarations. Given that there could be (theoretically) a problem with any part of that which may be the source of the problem, is that also okay to include if I feel it is relevant to fulfill the complete portion, or should I exclude that and leave those answering to just assume that all my ducks are in a row with that stuff?