72

According to its author, https://stackoverflow.com/questions/72928402/referenceerror-jsondata-is-not-defined was at first rejected for containing mostly code. The author then replaced the code with a screenshot of the code, and this went through.

I find code still preferable to a screenshot of code. If users are to be educated about such things, then shouldn't questions containing "mostly screenshots" also be rejected?

15
  • 14
    The problem is that the system doesn't see images as code; the OP had (many) characters of code but little to no explanation. As a result, instead of adding a description to describe their problem, they removed the code and added images. They didn't address the problem.
    – Thom A
    Commented Jul 20, 2022 at 7:57
  • 10
    I would be OK if questions with mostly screenshots were rejected, regardless of what these screenshots contain (which the system probably cannot find out). Commented Jul 20, 2022 at 7:58
  • 11
    Stack Overflow's thoughts seem to be "If we don't allow a new user to use inline images, they won't post images." However, the fact is that it simply results in "If i can't post an inline image, I'll post a hyperlink to one (and not include meaningful information in the question)." The site does attempt to educate users about this, and the Staging Ground will likely be better for it too.
    – Thom A
    Commented Jul 20, 2022 at 8:03
  • 9
    In the mean time your best thing to do is downvote, Flag/VTC as unclear, and if you like provide a link to Please do not upload images of code/data/errors when asking a question. in the comments.
    – Thom A
    Commented Jul 20, 2022 at 8:03
  • 10
    Note that the error that users get, when posting mostly code, doesn't tell them to post images either: "It looks like your post is mostly code; please add some more details." The fact that a user decides that instead of adding details they remove code and post images is just a further reason to downvote. Normally such users haven't actually read the message, just saw "too much code" and did something else (wrong). It's common as well that such users have not even taken the tour (which they are prompted to do when signing up) and thus certainly haven't read How to Ask.
    – Thom A
    Commented Jul 20, 2022 at 8:17
  • 5
    Reading "i dont know how to add more message" makes me want to cry.
    – user692942
    Commented Jul 20, 2022 at 9:23
  • 7
    It's almost like SO are more interested in getting as many newbies to post questions than making sure they post good questions.
    – user438383
    Commented Jul 20, 2022 at 10:08
  • 3
    It's not like that don't know about the edit feature either, @user692942 , as they edited the question twice, and both edits were before they made that comment. So they, in fact, do know how to "add more message [sic]", they just haven't.
    – Thom A
    Commented Jul 20, 2022 at 10:23
  • 1
    Usually what seems to happen when authors encounter the too much code error, they either remove the code completely or unformat it.
    – Laurel
    Commented Jul 20, 2022 at 10:27
  • 8
    Well honestly, why should they bother actually improving this post? When they neither care about SO or their profile, then they can do what they want, there will still be someone who answers their question. Also happened in the linked question, so peoples time got wasted and they still have their answer. It is not only OP's fault for writing the bad question and SO's fault for accepting it, but also our fault for still answering those questions.
    – Tom
    Commented Jul 20, 2022 at 10:47
  • "...this was accepted." Where and how was it accepted? According to the timeline of this question, it was never reopened?? Commented Jul 20, 2022 at 13:48
  • 4
    @Trilarion: I assume OP means "it was accepted by the system", as in the site software allowed their question to be posted (rather than stopping them before even posting, as the "mostly code" error does).
    – V2Blast Staff
    Commented Jul 20, 2022 at 14:23
  • 1
    Correct, that's what I meant. Commented Jul 20, 2022 at 15:40
  • Ok. So accepted may be somewhat misleading. The system simply didn't know that the screenshot was code and the user didn't know or ignored the guideline not to post code in screenshots. However, the manual inspection of other users worked, it was eventually closed and not answered. Commented Jul 20, 2022 at 17:13
  • 4
    That the system didn't know that the screenshots had code implies that there are legit questions to contain pictures with little to none explanation. Even when we consider questions regarding styling/layout I can't think of a question with pictures, but not much else which would successfully work on SO nowadays. And regarding "and not answered": this is not really true. OP got an answer in a comment, thus learned that there is no need to provide a good question, you still get what you are looking for.
    – Tom
    Commented Jul 20, 2022 at 23:08

2 Answers 2

29

Questions that are mostly images are now stopped during the question review step. Users will see:

Your post is mostly images. Add additional details to explain the problem and expected results.

...if their post contains images, but insufficient context.

The threshold for this setting was chosen based on a coarse analysis of historical post performance. Posts with images that lack sufficient explanatory text do in fact perform substantially worse on the whole than posts with a bit more substance.

The requirement for additional text in the post is set low enough that it should not be especially challenging to meet. It's intended to encourage some explanation as to what the images contain, and the problem they express. "Sufficient" text is decently short, and we're not expecting a lot of false detections here.

...with the side benefit that, in many cases, it will prevent users from simply changing a block of code into a screenshot of code when they encounter an error that their post is mostly code. No guarantees we'll catch all such cases with this filter, because the code context requirement and image context requirement work slightly differently. But it should catch a good amount of them.

As of right now, this change is exclusively enabled on Stack Overflow.

6
  • Isn't this how it works right now? Isn't this why users copy the text and put nonsense? Or is this with code block and not enough text?
    – Dharman Mod
    Commented Jun 27 at 19:43
  • 4
    @Dharman Questions with code blocks and insufficient text are blocked (have been for a while). This change makes it so questions with images and insufficient text are blocked as well.
    – Slate StaffMod
    Commented Jun 27 at 19:50
  • 2
    "Posts with images that lack sufficient explanatory text do in fact perform substantially worse on the whole than posts with a bit more substance." - well, yes; that's because they typically use images to show things that we explicitly don't want to be in images. Of course, we don't expect you to try to analyze the images to figure out what they depict. (Personally I would strongly prefer that you not attempt it.) But perhaps the guidance text should adopt a more generally anti-image stance? Commented Jun 28 at 11:23
  • 1
    @KarlKnechtel not necessarily. There are a lot of possible good reasons to use an image, e.g. questions about creating graphics, handling GUIs, there are even some programming languages (e.g. LabView) where you program by visually connecting various components in a GUI. Those images are fine, necessary even, and should not be removed by the OP because they were told a generic mantra that "images are bad, m'kay"?
    – Adriaan
    Commented Jul 2 at 8:24
  • What should I do as a reviewer? I edited and cleaned the post, but after spending a lot of time on it, I received this error. Shouldn't this error only arise when the OP is posting it, not when the reviewer is editing the post? Now what? Should I add some lorem ipsum text?
    – smr
    Commented Nov 1 at 0:30
  • 1
    @smr Since this change needed to be implemented as part of the post validator, it is possible that some extant posts will no longer be possible to validate. They are very few in number, though. I think RyanM posted an answer on how to work around it here on MSO - it's after hours so I don't have time to find it though.
    – Slate StaffMod
    Commented Nov 1 at 0:38
19

The honest answer is, yes, ideally questions containing very little text and a hyperlink or 2 should ideally be rejected as well; unfortunately they are not.

Although I can't know what truly went through the OP's head, I suspect I can accurately guess what did.

  1. The OP wrote their question, as it appears in revision 3, but actually put the text of the code, and error, in the body of the question as text (hopefully all in a code fence/block)

  2. The OP attempted to submit the question, and received the following error:

    "It looks like your post is mostly code; please add some more details.

    This is because the ratio of characters within a code fence/block compared to those outside of the block was too high. The number of non-code characters required to code characters is described in this answer.

  3. Instead of reading the error in full, the OP likely simply saw "Too much code", and thus to address this, they decided to remove the code.

  4. To ensure that the code was still in the question, however, they posted it as an image. As they have 1 reputation this could not be inline images.

  5. Initially this wasn't presented in the first revision because they removed the hyperlink for some reason (see original source).

  6. As the new question ended up being a single sentence, with no code (and no images, though this wouldn't have impacted the acceptability) and passed the minimum character threshold, it was accepted and posted.

  7. They then made two further attempts to make the images visible in the question.

Though the OP was informed that images of code isn't acceptable, they then made a claim that they were unable as they "dont know how to add more message [sic]"; I read this as they don't know how to use the edit feature, but this seems odd because they had indeed made 2 edits, thus did know how to add more to the content of the question.


So, firstly, the system did not actually allow the user to replace the code with images. Although the system likely would have allowed them to post it had they included the hyperlinks the original question posted was simply the following:

I just learn about API on  100 DAYS of bootcamp web development by
Dr. Angela Yu and i got this eror. Can anyone know how to fix this

  [1]: https://i.sstatic.net/8ktHC.png

Though there is a hyperlink in there to an image, it's not actually shown in the body of the question.

Next, stopping such things; honestly, I feel that the minimum character requirements are too low nowadays. Questions like "How do I do a Square Root in Python?" were acceptable when Stack Overflow first came out, but such questions really aren't any more; they would get heavily downvoted due to a lack of research and likely closed as a duplicate.

I also agree that hyperlinks should not contribute to the minimum number of characters, however, this wouldn't have solved the problem here anyway as (as mentioned before), there was no hyperlink in the original revision.

Hopefully the Staging Ground will help address this; as questions such as this will be reviewed before getting posted (and being able to be answered) stopping such poor quality content ever getting to the "main site". If the Staging ground is a successful project is another question entirely; it heavily relies on reviewers or passionate curators. Only time will tell if enough users (volunteers) will put in the effort.

1
  • 10
    Perhaps "dont know how to add more message" means they simply don't know what to say to describe their problem. All they know is "I wrote some code. It gives this error. What do I do now?". (I'm just trying to guess at the OP's thought process. I'm not claiming we want questions like this on SO).
    – PM 2Ring
    Commented Jul 20, 2022 at 14:04

You must log in to answer this question.

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