6

When someone (typically a first-time poster) posts a question that contains code presented as an image, we're supposed to encourage them to edit the question and repost as plain text, for all the usual reasons:

  • Images aren't searchable.
  • Images aren't copy/pastable.
  • Images aren't accessible for blind/low vision people (and if the image quality is low, are problematic even for people with full vision.)

However, I've seen some questions where the images were small and quite readable (by me personally) and gave me everything I needed to answer the question, so it feels a bit dishonest (and even a bit fussy!) to say that I can't answer it.

In such a case, should we stand on principle and ask the user to repost as text? I fear that by doing this, we just drive away first-time posters.

1
  • 11
    VTC as "needs details or clarity" or "needs debugging details". If I cannot see images, then your answer to the question would be useless to me. I don't know what you've answered.
    – VLAZ
    Commented May 27, 2020 at 20:03

1 Answer 1

13

It is an absolute requirement that the sample code (minimal, reproducible example) be posted as text, within the body of the question itself. Thus, according to Stack Overflow's guidelines/expectations, you cannot answer the question in its current state.

You have two choices:

  1. If you're willing, the task is reasonable in scope, and by doing so the finished product would be an otherwise on-topic, answerable question for Stack Overflow, you can edit the question yourself to transcribe the image into text.

or

  1. You can simply cast a vote to close the question as "a community-specific reason → needs debugging details", which provides the following guidance to the asker:

    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, Reproducible Example.

    This guidance/explanation pretty much covers that the shortest code necessary to reproduce the problem must appear in the question itself. If you like, you can also leave a comment explaining that we do not allow images of code, and that the asker needs to paste the code into the question as text. A comment I sometimes use for this goes as follows:

    Please add code and errors as text (using code formatting), not images. Images are problematic for many reasons, including that they don't allow copy-pasting text for testing or searching.

So, basically…yes:

In such a case, should we stand on principle and ask the user to repost as text? I fear that by doing this, we just drive away first-time posters.

I do not believe that this will drive away first-time posters. They are invested in getting an answer, so they'll simply do the little chore or jump over the little hurdle that we're asking them to do. Hopefully, next time, they will have this requirement in mind and thus avoid making the same mistake again. In the meantime, we've all done our part to ensure that the question is useful to others in the future, which is the true purpose of this site. (Remember that Stack Overflow is not a help desk. Our mission is not so much to help the asker, but rather to build up a library of high-quality Q&A on programming topics. Helping the asker is a nice side benefit, but our model is much more akin to Wikipedia than some hypothetical HireAProgrammer.com.)

11
  • 6
    I was under the impression that we aren't allowed to transcribe images. Is this just for suggested edits or about the amount of text in the image?
    – BSMP
    Commented May 27, 2020 at 20:28
  • We really need TOFQ ("take over the question") functionality - it's somewhat unfortunate that there is "approve and edit" that takes responsibility for edits but no "edit and take over" for question - that would let one edit a question they find valuable and accept full responsibility for downvotes that come with it... Commented May 27, 2020 at 20:53
  • @AlexeiLevenkov That seems like it would only lead to abuse. If you see something in the question that deserves being answered and it doesn't look like the OP is going to fix it, you can always just ask a new question about it directly (in my experience though, 99% of these questions are either way too broad or duplicates anyway). Commented May 27, 2020 at 21:08
  • 1
    @BSMP I do not subscribe to the general philosophy espoused in the linked Q&A. That is, I do not think it is inappropriate to transcribe images, nor do I think that suggested edits doing so should be rejected on that basis alone. Naturally, doing this is purely optional, and it is a lot to ask, so I certainly don't expect anyone to do it instead of closing. And if you do decide to do it, you definitely need to be careful not to introduce transcription errors (that would be grounds to reject the edit). Furthermore, you should only do it when, as I said, your edit would salvage the question.
    – Cody Gray Mod
    Commented May 27, 2020 at 21:08
  • I don't see why we need a "take over" feature, @Alexei. The site is collaboratively edited. The only real "privileges" that a question-asker has are (A) receiving/losing rep from votes, and (B) selecting an answer. I just don't see compelling reason to change the way either of those privileges are distributed, especially not because someone made an edit, no matter how substantial. Edits are still supposed to respect the author's intent. We're not talking about editing in code that they didn't intend to be there. It's still their question.
    – Cody Gray Mod
    Commented May 27, 2020 at 21:10
  • 6
    I think the line for when it's OK to transcribe code should be just as hard as when it's OK to have code in images. Meaning: never. The risk of introducing transcribing errors is just too high. In addition I don't think suggested edit reviewers should have to go through images of code matching each character from image to text one character at a time. And, one cannot know what type of whitespace was present in the original code. Also, copy paste from e.g. the official javadoc often leaves invisible characters that my compiler will complain about.
    – Scratte
    Commented May 27, 2020 at 21:27
  • 1
    The site is collaboratively edited. One of the major advantages of this is that we can all help fix problems. As such, I'm just not on board with introducing any sort of blanket prohibition against edits that transcribe code from images, or indeed any edits that can salvage a question, rescuing it from a state where it needs to be closed into a state where it can be answered. There's always a non-trivial risk of introducing errors when making edits. The editor needs to be diligent, and so do the reviewers, and there are always rollbacks as a failsafe.
    – Cody Gray Mod
    Commented May 27, 2020 at 21:53
  • 6
    @CodyGray it's worse than that: there is the very real possibility of removing errors. A skilled and experienced software developer, for instance, could easily remove syntax errors without consciously realising it:( Commented May 28, 2020 at 4:05
  • @CodyGray did this section title change? specifically, is 'Complete' portion no longer implied or to be construed as either on nor off topic? Was it not 'Minimal, Complete and Reproducible'? Commented Dec 31, 2022 at 17:59
  • 2
    @BrettCaswell You mean, why did it change from "MCVE" (Minimal, Complete, Verifiable Example) to "MRE" (Minimal, Reproducible Example)? I guess because someone was trying to shorten it. You might recall the "reprex" debacle, where Shog9 tried to come up with a "less awkward" phrase, but failed miserably. :-) The follow-up to that is here, which introduces the new name. [continued...]
    – Cody Gray Mod
    Commented Jan 1, 2023 at 7:09
  • 2
    [...] The names are all really just window-dressing, though. Completeness is still required for the examples, which is implied by the word "reproducible" (if it reproduces the problem described, then it's complete; if it can't reproduce the problem, then it's not complete). You'll also notice that "complete" is still explicitly mentioned as a requirement in the help center page (for which the [mcve] short-link still works on the main site).
    – Cody Gray Mod
    Commented Jan 1, 2023 at 7:11

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