124

Situation:

We can see many posts containing links to code / images (snapshot) of code. These posts are bad because

  1. The code in the question (image) cannot be indexed for future search.
  2. Tough to copy-paste the code to reproduce the error.

Currently, we have a close reason which says:

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

I propose, please modify the reason to add a hint about the need for "text-based code" so that this close reason can be used for the posts adding screenshots / links for code.

Proposal:

Modified text emphasized

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary in text form to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

33
  • 5
    Is not "in the question itself" enough?
    – YSC
    Commented Mar 9, 2016 at 16:22
  • 18
    Ideally in text form should be a link to the code formatting advanced help. Commented Mar 9, 2016 at 16:23
  • 37
    @YSC No, a screen shot would also appear in the question itself, though it's not wanted. Commented Mar 9, 2016 at 16:24
  • 7
    Good proposal. +1, I support it fully. Commented Mar 9, 2016 at 16:25
  • 5
    Yes, why not expand the paragraph full of text that no one reads anyway. Do you think this will actually solve the problem?
    – Cody Gray Mod
    Commented Mar 9, 2016 at 16:28
  • 7
    Are the questions that post the code as an image actually staying open and being well received by the community currently? Do the authors actually push back when they're told that they need to post code as text? I haven't really seen much of either of those things. Sounds like you're trying to fix something that's not really a problem.
    – Servy
    Commented Mar 9, 2016 at 16:29
  • 10
    @Servy At least, this will save me from leaving a separate comment asking for the text version of the code every time. Commented Mar 9, 2016 at 16:30
  • 4
    @YSC "Is not "in the question itself" enough?" apparently not. Commented Mar 9, 2016 at 16:32
  • 10
    The whole question should be in text form. Images should only be used for when they are necessary (binary data, demonstrating layout). So I think this is a general requirement and does not only apply for this close reason but everywhere. I would therefore put it on "How to ask..." and refer to that all the time. Commented Mar 9, 2016 at 17:03
  • 4
    It's still a big blob of text. I'd like to see a numbered list of items that should be included in the question. "You're missing #3."
    – user1228
    Commented Mar 9, 2016 at 18:15
  • 3
    @SouravGhosh The way I see it, any time you are requesting something be added to the site (which this qualifies as, IMO), it is a feature request :-)
    – TylerH
    Commented Mar 10, 2016 at 14:04
  • 6
    @theMayer It's not only about screenshot, but links also. And yes, This happens a lot, believe me. Commented Mar 10, 2016 at 14:07
  • 7
    Anyone else think the kind of people who would post screenshots of code in the question are the same kind of people you'd see on Clients from Hell?
    – BoltClock Mod
    Commented Mar 10, 2016 at 14:51
  • 2
    @SouravGhosh "this will save me from leaving a separate comment" don't bother, just vote to close and move on. These questions are rarely worth any more effort.
    – Raedwald
    Commented Mar 10, 2016 at 16:11
  • 3
    @Raedwald If we can do that and educate the misguided OP at the same time about the error of their ways, that would be lovely.
    – Mr Lister
    Commented Mar 10, 2016 at 16:50

1 Answer 1

6

The only problem about this suggestion is that some languages are not textual, so it is impossible to include them in textual form.

I agree that this change makes sense for most situations, but I think we need to be careful we're not scaring away legitimate questions.

Fortunately, graphical languages are a small and well-behaved minority, as far as I've seen.

I think that we need to be clear that it would only apply to text that is in a picture, not strictly code. By saying "no pictures of text", it would also cover those cases where it's the stack trace or the contents of a database that are in the picture, neither of which would apply with the proposed wording.

Of course, we should allow pictures of text when it is both supplementary and relevant to the problem stated in the question. An example of this would be typography issues.


Here's what Scratch looks like, BTW:

here's teh codez

2
  • 1
    Right. "The only problem about this suggestion is that some languages are not textual, so it is impossible to include them in textual form." So, those question do not require the "code" to be present in text form and thus, excluded form the close category, is not it? Commented Aug 12, 2016 at 7:10
  • We only need to close those questions which can and need to have the textual code to reproduce the problem, that's the basic target of this discussion. :) Commented Aug 12, 2016 at 7:11

You must log in to answer this question.

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