11

I recently created an answer to explain how to solve a problem with Python's http.server.

The answer required basic knowledge of commands like ps, grep, kill & killall.

Since I wasn't sure how much the OP knew, I included a screenshot of the output and went on to explain what it all meant.

Should I have included the screenshot and are there rules for when they should be included?

8
  • 14
    You can use screenshots if they are useful for your answer. If the output is text, just pasting it the answer is more appropriate.
    – yivi
    Mar 19, 2019 at 9:17
  • 1
    Is there something in particular that prompted you to ask this Meta question?
    – jscs
    Mar 19, 2019 at 16:43
  • Possible duplicate of Why not upload images of code on SO when asking a question?
    – Pac0
    Mar 20, 2019 at 19:24
  • (although the suggested duplicate target is about questions, I think it applies on answers as well, for the most part)
    – Pac0
    Mar 20, 2019 at 19:25
  • Possible duplicate of Discourage screenshots of code and/or errors
    – Jan Doggen
    Mar 20, 2019 at 21:06
  • In this example, a good description of what the user will see "You'll get a list of PIDs like this:" would make the answer work without the image. Honestly I think the question is off-topic as 'not useful to others' as it was fundamentally a typo...
    – JeffUK
    Mar 21, 2019 at 7:28
  • 1
  • Whenever the expected output of the command is an image... Mar 22, 2019 at 10:06

2 Answers 2

38

If you are adding output of a command or something that can be pasted into the answer as text you should be doing that instead of including a picture of the text. Including text in a post is better than a screen shot for several reasons.

  • Some users are on networks that block imgur rendering the image useless to them
  • If the user is using a screen reader they will not be able to get anything from the picture
  • If they do not speak the language fluently they may need to run it through a translator and that can't be easily done with an image.
  • If you want anything to be done with the output that you posted it will be a lot harder if it is an image.
  • Users can search for terms that are in the output which can help find what they are looking for
  • The text will scale with the resolution of the screen being used which can be very helpful on mobile devices with smaller screen.
  • It will use less bandwith if it is just loading text versus an image

In truth avoiding posting images when you can post it as text instead will make it more user friendly for all users.

4
  • 6
    One more reason that's often relevant (though not in this particular case): users searching for error messages and the like will only find them if they're posted as text.
    – dfeuer
    Mar 20, 2019 at 18:42
  • 6
    Also images of text can be really hard to read on a small screen (i.e. phone), as they usually requite horizontal scrolling to read. Mar 20, 2019 at 18:46
  • @dfeuer Excellent point, I have added it (was something I forgot to include)
    – Joe W
    Mar 20, 2019 at 19:42
  • @CrisLuengo Good point that is something I didn't consider
    – Joe W
    Mar 20, 2019 at 19:43
5

Without disagreeing with anything that @JoeW has written, there are occasions where including an image in addition to the raw text could be useful. It's limited to things like discussing syntax highlighting, etc that can't easily be represented as text.

(Theoretically you could use a snippet and use html/css to create a text block with arbitrary colors to match whatever tool you're discussing uses, but that's a bit grotesque.)

7
  • 1
    There are very few questions on the site which would be justified in talking about syntax highlighting. You're mostly looking at scripts which build out ANSI colored output, but the people who want to do that probably have an idea of what they're looking for.
    – Makoto
    Mar 20, 2019 at 20:19
  • 1
    @Makoto I totally agree it's an edge case. Mar 20, 2019 at 20:40
  • 2
    @Makoto Or questions which discuss configuration of syntax highlighting in IDEs…
    – user149341
    Mar 20, 2019 at 21:38
  • 1
    @duskwuff - that's a gray area...
    – Makoto
    Mar 20, 2019 at 21:56
  • @Makoto How so? "Software tools commonly used by programmers" -- like IDEs -- are explicitly in scope.
    – user149341
    Mar 20, 2019 at 22:17
  • 3
    I would conjecture that asking us how to set up specific syntax highlighting lands just outside the scope of what we want to discuss. We can get you up and running with having Java and Python running in your IDE side-by-side. I'm less interested in helping you configure the color of your IDE to match the Rocky Mountains.
    – Makoto
    Mar 20, 2019 at 22:19
  • I would like to note that syntax highlighting doesn't really matter much on stack overflow as it doesn't make the text anymore readable in the long run and the color scheme that is used on the website might not even match the editor that the person getting the information uses (if they even use on that supports it)
    – Joe W
    Mar 20, 2019 at 22:35

You must log in to answer this question.

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