Every so often, somebody asks a question about a piece of code, but the piece of code that they give is too abstract and unrealistic.
For example, there's a question on the front page right now about an abstract class called Base
, with subclasses called A
, B
, and C
. Classes A
and B
both have a field called _field1
. The question is whether or not _field1
should be moved into Base
.
In my opinion, this question is badly posed, because the asker has left out critical information: namely, what Base
, A
, B
, C
, and _field1
actually are. If the asker had told us what those classes and that field are, then we would be able to give a meaningful answer going into detail about the advantages and disadvantages of doing it each way. Instead, we have to give an answer which merely states "It depends", lists multiple possible answer, and gives much less detail about each possible answer.
I also think that you can tell that this question is overly abstracted because the names given are unrealistic. You would (hopefully) never have actual code with a base class called Base
and a field called _field1
.
So:
If we see a question about a piece of code which is unrealistic and abstract, should we ask the asker to edit the question so that the code is realistic and concrete? Should we maybe even close the question as "unclear what you're asking" until the asker has edited it?
(Imagine if someone went to aviation.stackexchange.com and posted the following question:
Suppose I'm flying into an airport, and Air Traffic Control gives me an instruction. However, I look at the instrument panel and I notice that something unusual is happening. What should I do?
We'd certainly close it as unclear! Questions need to be specific about what is actually going on.)