36

Pretty simple request...

Right now we have a warning that pops up if you link to JSFiddle (or similar) without any actual code.

Could we pretty please have something similar for new / low rep users when adding images or links to images to their posts without code blocks? Something like

Is this an image of code, data, error message, etc? If so, please consider including the content as text in your question. For more information, see How do I ask a good question?

All it has to do is match links like *.imgur.com or any common image file extension (.jpg, .png, etc)


I know sometimes a question might be relevant with an image and no code but it's hardly the norm. With that in mind, this could just be a notification or suggestion as opposed to a "you can't post this question" blocker like the JSFiddle one.

8
  • 2
    Or link to the FAQ: meta.stackoverflow.com/questions/285551/…
    – rene
    Commented Sep 15, 2020 at 6:57
  • @rene I figured the Help section is more newbie-friendly that meta and the "how to ask" article has a nice big DO NOT post images of code, data, error messages, etc section already
    – Phil
    Commented Sep 15, 2020 at 6:58
  • 4
    I guess I'm getting cynical. When an OP comes to Meta to complain about their closed post with images of code I want to comment to them: We told you by providing two different links, why didn't you follow any advice offered?
    – rene
    Commented Sep 15, 2020 at 7:01
  • 1
    I recall I had seen a post recently that requested that images got put through an image classifier and then bark when it turned out to be a screenshot of code. I can't find that anymore, I guess it is deleted. I wanted to link to it to show that more extreme proposals can be dreamed up. This one isn't that far fetched. The only worrying bit is how often it will be a "false positive", as in: the user is aware what they are posting and the warning only annoys the heck out of them. For the no-code but jsfiddle link it is pretty obvious. I expect your proposal to have a higher false positive rate.
    – rene
    Commented Sep 15, 2020 at 7:10
  • 1
    @rene in that case, put a rep limit on the notification. Over x, no warning
    – Phil
    Commented Sep 15, 2020 at 7:11
  • 2
    @Phil The hard part of such feature is to detect that an image may contain a screenshot of primarily text (esp. if such text is embedded in a screenshot of an IDE full window). This would require to apply OCR or similar mechanisms (OK, well available as microservices on various APIs), and decide if this is code or error message text. The idea is fine per se IMO, and about 80% of images posted by new users will fall into that category, but just to warn sweepingly would be received annoying for images posted for valid reasons. Commented Sep 15, 2020 at 7:20
  • @πάνταῥεῖ I've clarified the request to be for new / low rep users only. As long as the notification is not blocking (as mentioned), I don't think it would annoy too many people, at least not for too long.
    – Phil
    Commented Sep 15, 2020 at 7:23
  • 8
    This feature should have been implemented years ago. "Pictures of code" posts have become a big problem over the years. I guess since smart phones are far more common now than when the site started. Plus the kids who grew up with a phone up their nose are now becoming programmers.
    – Lundin
    Commented Sep 15, 2020 at 11:41

1 Answer 1

12

A warning is not going to have any effect because, as is well known, users don't read. The type of user who is going to do a drive-by image dump of code is even less likely to read.

Make this check a blocker, and make it apply to anyone who hasn't yet asked a question on Stack Overflow (i.e. new users only). I don't give a s**t about false positives, because they won't be the majority case. (If anyone has an issue with this reasoning, feel free to complain to Stack Exchange Inc. for making these sorts of checks necessary in the first place. I'm tired of being labelled the bad guy for giving practical solutions to issues that SE Inc. has caused.)

Wishy-washy indirect language like "please" is lost on people who don't read or have a poor grasp of English. Suggestions are lost on the same type of people. Direct orders will work a lot better, and with that in mind change the text to something such as:

Your question must contain the actual code text causing the issue, not an image of that code. Images of code aren't accepted here because they make it impossible for potential answerers to help you by debugging the issue. For more information, see How do I ask a good question?

1
  • 1
    This would need to be accompanied with a block on posts that contain no code but a link to the most popular picture uploading sites. And probably no code but a link to Github too.
    – Lundin
    Commented Sep 15, 2020 at 11:43

You must log in to answer this question.

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