89

I've spent some time in the Triage and First Post review queues and I keep seeing users who include or link to screenshots of their code and/or exceptions and error messages. This is generally considered bad practice.

As I see it, images are meant to be included when visual aspects of something adds value to the question. A question like "Why does this visual glitch appear on my Android phone, but not on the emulator?" would surely benefit from an image, given the visual nature of the question.

Other questions, where images are only added to display text, should not be included. Instead, the text itself should be copy/pasted by the author.

As such, I recommend the following warning to be displayed when the user attempts to upload an image:

Please only include images in your question if the visual appearance of something is relevant. Do not use images to show text - instead use the Code Sample or Snippet tool to display code or error messages.

15
  • 24
    IMHO there's no point in doing this; users who post screenshots of their code without merit are unlikely to read any messages warning them about doing it.
    – AStopher
    Commented Jan 5, 2018 at 14:13
  • 19
    If you are presented with a big, red message saying "Stop! What you are doing is wrong!" then I think people will listen. Likewise, if we subscribe to the idea that help messages are useless because users don't read them, why is there a help section anyways?
    – MechMK1
    Commented Jan 5, 2018 at 14:20
  • 15
    @cybermonkey: to add insult to injury, those questions still get answers; the OP is fully satisfied and doesn't bother to fix it.
    – Jongware
    Commented Jan 5, 2018 at 15:35
  • 11
    related: Discourage screenshots of code and/or errors
    – gnat
    Commented Jan 5, 2018 at 16:01
  • 5
    Make the warning red, full-screen and blinking, and play a loud alarm siren sound below it. If we put the user in enough shock, then maybe they won't click past the warning without thought. :P
    – Siguza
    Commented Jan 5, 2018 at 20:57
  • 2
    @Siguza this would take 6-8 weeks...
    – Vickel
    Commented Jan 5, 2018 at 21:02
  • I commented on a question recently asking the poster to please not post code as images and he's like "its only two lines of code, I don't see why I have to include it as text." Commented Jan 5, 2018 at 21:21
  • 9
    @Draco18s "Because if you want me to run this code, then I need to either type it from your image, or copy/paste it from your question. And you are the one asking me for a favour, not vice versa"
    – MechMK1
    Commented Jan 5, 2018 at 21:22
  • @DavidStockinger That's exactly what I told him. :P The post has since been updated (with actually helpful images!) Commented Jan 5, 2018 at 21:27
  • there is a problem with the word "text" in my opinion. Rather it should be source code. One such use case where images are very useful, although it has nothing to do with visual appearance, is when the user needs to paste a snippet of the log messages of the error, but the errors are not immediately available in the text form ( situations in run time error ) Commented Jan 7, 2018 at 16:57
  • 2
    I usually DV or CV for "unclear what you're asking" and use this link: idownvotedbecau.se/imageofcode
    – klutt
    Commented Jan 7, 2018 at 17:14
  • 1
    we could add a super OCR feature which looks in the text for common language keywords and prevents from posting. Well, that or downvote & vote to close :) Commented Jan 7, 2018 at 20:33
  • @infoclogged Images are fine if no better source of information is available. Although I would still encourage OP to transcribe it before posting.
    – MechMK1
    Commented Jan 8, 2018 at 10:34
  • @DavidStockinger hence - "meant to be included if no better source of information in text form is available or when visual aspects of something adds value to the existing text" is much clearer. Commented Jan 8, 2018 at 17:45
  • 2
    As @gnat noted, we already implemented this two years ago... Funny story though: turns out we completely broke it during the HTTPS migration, and so no one has seen it in well over a year.
    – Shog9
    Commented Jan 31, 2018 at 0:20

4 Answers 4

161

Perhaps a more in your face "Don't do this" would work with the image upload dialog:

enter image description here

Ps this is only a semi-serious suggestion, as I doubt even something this drastic would make any difference if it could be done.

14
  • 26
    This, plus three different checkboxes that say "this is not an image of data/errors/code" that we'd need to check. The text could change between attempts so the requirement of checking/unchecking would be different each time... :P
    – yivi
    Commented Jan 5, 2018 at 15:19
  • 47
    Oh look, an image that adds value to an answer due to its visuals and not code, data or errors.
    – MechMK1
    Commented Jan 5, 2018 at 15:20
  • 15
    -1. You seriously think this will work? there are ZERO Free Hand circles here
    – MattR
    Commented Jan 5, 2018 at 15:27
  • 28
    +1 there's THREE free hand circles Commented Jan 5, 2018 at 20:45
  • 8
    I am fairly certain that the offenders in question will assume that these are examples of the types of images which we would like them to post.
    – MonkeyZeus
    Commented Jan 5, 2018 at 20:55
  • 19
    cant even count anymore, dangerous picture. there are actually five free hand circles... Commented Jan 5, 2018 at 23:24
  • 3
    @SampoSarrala 3? I count 5. (No errors plz, No code plz, and No data plz)
    – Jed Fox
    Commented Jan 7, 2018 at 20:30
  • 5
    Tanner you made my day. Funny and extremely useful at the same time, with minor changes for the site (so expect the change in 6 or 8 weeks as usual) Commented Jan 7, 2018 at 20:31
  • Also no tables plz. And if a table is input or output then per MCVE it should be formatted as code & a table.
    – philipxy
    Commented Jan 7, 2018 at 21:18
  • 1
    @JF If you count the ds, there's seven. The as might also count. es are kind of "circle-adjacent." Commented Jan 8, 2018 at 6:58
  • 1
    Btw. I never noticed the editor image upload function xD
    – Hille
    Commented Jan 8, 2018 at 12:03
  • 1
    This has not yet been implemented. Why not? It seems such a little thing to change.
    – Jongware
    Commented Jan 14, 2018 at 18:52
  • 1
    @usr2564301 just because this is marked as the answer doesn't mean it will be implemented. It's unlikely that the team would actually implement this in the way it's presented, but they could implement something that carries the same message. First they have to acknowledge the problem and actually consider making a change.
    – Tanner
    Commented Jan 14, 2018 at 21:38
  • 1
    @Tanner: I only asked because I've seen about 15 to 20 hit-and-run questions posting code-images these last 4 days. They sure seem to take their time acknowledging the problem. Oh well, maybe it will take the usual 4-6 weeks.
    – Jongware
    Commented Jan 14, 2018 at 21:44
25

As gnat noted, we already had a warning for this - we just broke it a year ago and never noticed.

Adam Lear fixed this 10 days ago, and I'm happy to report that it's once again in the face of any user with <= 15 reputation attempting to upload an image:

Images are useful in a post, but make sure the post is still clear without them. If you post images of code or error messages, copy and paste or type the actual code or message into the post directly.

4
  • 12
    any user with <= 15 reputation Would it be worth it to have a feature request raising that number? I regularly see users with way more reputation making edits solely to add screenshots of text to questions in the suggested edit queue.
    – BSMP
    Commented Feb 16, 2018 at 4:55
  • Wouldn't hurt to propose, @bsmp
    – Shog9
    Commented Feb 16, 2018 at 5:12
  • 1
    @Shog9 would a visual hint make it clearer for the folks that don't like to read help text?!
    – Tanner
    Commented Feb 22, 2018 at 14:45
  • 3
    Honestly, @Tanner, this is probably one of those situations where if we want to do better than a text warning we have to dig into why anyone wants to do this to begin with. My gut feeling is that we both do not make it obvious how to paste in code and make it difficult to format code effectively - essentially the same reason you've probably had folks send you screenshots wrapped in a Word doc. You can throw up all the warnings you want but until we find a way to address the underlying cause, it's gonna keep happening.
    – Shog9
    Commented Feb 22, 2018 at 17:47
11

I don't think the users1 would read this warning message because they don't read any of the help pages or the help text on the right side.

1The users who are posting in wrong format etc.

If a user is posting his code or error message as an image, I'm writing a comment with one of these two links which explain pretty good why you shouldn't do this:

http://idownvotedbecau.se/imageofcode

http://idownvotedbecau.se/imageofanexception/


How to implement idownvotedbecau.se right:

[Q] Not a good question

Please be a bit more specific when asking a question: What have you tried so far with a code example? (I downvoted because there is no code) / What do you expect? / What error do you get? For Help take a look at "How to ask"

The Code:

Please be a bit more specific when asking a question: *What have you tried so far with a code example? ([I downvoted because there is no code](http://idownvotedbecau.se/nocode/))* / *What do you expect?* / *What error do you get?* **For Help take a look at "[How to ask](https://$SITEURL$/help/how-to-ask)"**
13
  • 20
    Be aware that these specific comment links are rather controversial, see meta.stackoverflow.com/questions/355950/… and meta.stackoverflow.com/questions/361364/…. I also find it rather ironic that given your low opinion on how well people read the help pages that you expect them to read the linked page instead.
    – Martijn Pieters Mod
    Commented Jan 5, 2018 at 12:16
  • 1
    @MartijnPieters The most time on SO I'm editing questions which are badly formatted and that's why I'm thinking so. And they will click on the link and read minimum the headline because its looking interesting (downvotecou.se).
    – Hille
    Commented Jan 5, 2018 at 12:19
  • @MartijnPieters and for the nice comments with only the link, please consider using a plugin to auto paste a nice sentence with the link included :)
    – Hille
    Commented Jan 5, 2018 at 12:21
  • 4
    Side note: I don’t disagree. Many people don’t read the help info. I doubt that they’ll read the linked info instead. At least, not when presented as a bare link like that. See the answer by Jon Ericson at the first link.
    – Martijn Pieters Mod
    Commented Jan 5, 2018 at 12:21
  • 1
    I already use a plugin and a text expander app for my comment management. Life as a moderator is so much easier that way.
    – Martijn Pieters Mod
    Commented Jan 5, 2018 at 12:22
  • @yivi It's more likely a metaphor for the developer's forum. And it looks nice ;) But i wouldn't do that in an edit
    – Hille
    Commented Jan 5, 2018 at 12:23
  • @MartijnPieters The most comment I'm using is the one I have inserted in the answer. I think it's a good way to implement the idownvotedbecou.se link.
    – Hille
    Commented Jan 5, 2018 at 12:27
  • 5
    I do think that proactively telling people that a screenshot of code is not a good idea will reduce the likelihood the community is tasked with educating the OP with comments and downvotes. That is probably a better experience for the asker.
    – Martijn Pieters Mod
    Commented Jan 5, 2018 at 12:30
  • 7
    @MartijnPieters That's exactly what I mean. I'd argue that a lot of people don't actively read the rules and ignore them, but rather are not really aware that what they are doing is problematic.
    – MechMK1
    Commented Jan 5, 2018 at 12:37
  • 1
    Because they do get answers. After that, then why bother? I'd rather see an immediate [on hold] as soon as someone spots this.
    – Jongware
    Commented Jan 5, 2018 at 15:37
  • when I first started using SE sites it was not that easy to find help/faq pages (even if links were on some corner, lots of buttons for n00b), however I did read read all messages when posting stuff. I wont click on links when I'm writing post, all info must be there. On some sites you'll lose content when clicking links and this behavior has taught me not to do that, I believe many have similar habit. Commented Jan 5, 2018 at 23:31
  • 2
    I was passively browsing this post. I rarely click links on SO, since I generally come here for an answer. That said, the domain name was intriguing. I clicked it. I think it’s actually wayyyy more effective than the SO docs. When I was new, all I wanted to know was WHY I was being downvoted. I didn’t want to browse “how to” doc for posting questions, I’d rather learn based on feedback and results. The link provides the user feedback. Good stuff. Commented Jan 6, 2018 at 17:09
  • The text in the links of this answer are very poorly worded and hard to read. The idea has merit, but I couldn't even follow what was being said in the first one because the first person plural subject made no sense. The wording felt very passive aggressive to me. Commented Jan 8, 2018 at 6:33
-20

I completely agree with you. But what if there are certain circumstances that do not allow them to copy paste the text and it'll much much easier for them to just show us a screenshot, how will we allow for these exceptions? Maybe provide some sort of warning that tells them not to but not a rule that stops them from doing it.

3
  • 11
    How many programming IDE's have MsgBox with Ctrl+C disabled? I saw a guy this morning copy the HTML source of the error and use that. Its bad practice and so rare I'd expect people to type it out if Ctrl+C is disabled. Its crazy to expect people to do Image Searches of Error Images. Commented Jan 8, 2018 at 5:45
  • 2
    I don't see anyone proposing "make it impossible to attach images". The question specifically mentions some scenarios where images are welcome and even necessary. If we didn't want users to post images, it would be very easy to require a higher amount of reputation before allowing them to do that, but I think we all agree that this is too draconian and user-hostile.
    – tripleee
    Commented Jan 8, 2018 at 6:21
  • 1
    @JeremyThompson Emacs has Ctrl+C disabled. Instead it uses Meta+W.
    – L. F.
    Commented Jun 11, 2019 at 13:17

You must log in to answer this question.

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