Should we take some inspirations from https://idownvotedbecau.se?

As I guess most of you are aware of, some people created the site https://idownvotedbecau.se/

It was designed to be an easy way of explaining problems with posts. Instead of manually explaining the problems, you just posted a link with a very in-depth explanation of what the problem is, why it is a problem and how it should be corrected. For instance, here is the page explaining the problem with images of code. https://idownvotedbecau.se/imageofcode

An image of your code is not helpful

When asking a question about a problem with code, people who are volunteering to help need the text of the code. Images of the code are not an acceptable substitute.

Why this is a problem

One of the first things answerers do when examining a question’s code for errors is to try compiling (if necessary) and running the code to see what happens. Answerers may also copy part of the code to paste into search engines in order to learn about the types or algorithms being used, and to find other related material. When answerers are presented only an image of code, this process becomes much more difficult.

Why this is worth a downvote

It is important to finding fast, correct answers to provide everything needed by answerers in the question. When they are forced to transcribe an image , they are wasting valuable time that could be spent analyzing the problem. In addition, errors in the transcription make it less likely that a solution to the problem can be found. Image contents cannot be searched, so future developers with the same problem will be less likely to find this question. This is even more of a problem for developers who use screen readers, as they will neither be able to help answer the question or help themselves by finding the answer to their question here.

What to do next

Edit the question. Remove the images containing code from it. Copy and paste the text of the failing code into the question. It is very important that the code is the minimum needed to reproduce the problem, and that it is well formatted. If the code consists of HTML, CSS and JavaScript, stack snippets can be taken advantage of to make the issue reproducible right in the question! This makes it much easier to see code problems and to provide fixes quickly.

An example of well formatted code with comments explaining any issues:>

public static int Calculate(string digits)
{
   //Issue: x is 6 should be 5
   var x = digits.Where(char.IsDigit).Count();

   var sumOfDigits = digits.Where(char.IsDigit)
       .Reverse()
       .Select((e, i) => int.Parse(e.ToString()) * (i % 2 == 0 ? 1 : 2))
       .Sum(e => e / 10 + e % 10);
   //Error: sumOfDigits is returning 100 should be 600

   return sumOfDigits % 10;
}

Leave a comment!

Once you have done this, leave a comment to the person who sent you this link. They will be happy to retract their downvote.

I’m not sure this was very well executed, but I think the idea is very good. Is this something we should incorporate?

(I was very unsure if I should tag this mvp or non-mvp)

4 Likes

In my opinion, something of this kind could be an excellent idea but bearing in mind the site topic might be mushrooms (or unicorns, or Photography) the “code as image” issue may not always be relevant. (Actually, at times, Gardening & Landscaping had to press OPs to include photographs.) But what goes into a Help page could well be community rather than technical and, as I understand Monica, if so https://meta.codidact.com/ may be a better place to consider this suggestion.

1 Like

This was just an example. The point is that I think it would be good to have native support for something like this in the platform.

3 Likes

How does our canonical posts not solve this?

Stuff like this should preferably be added in wizards, is possible. For example, if someone attaches a picture on the coding site, have the wizard display the message about pictures of code being unhelpful and why.

Failing to inform the user before the question hits the site, then info about why the question was removed will preferably look along the lines of your examples.

Things like this should be reserved for posts that are so bad that they can only be fixed by the OP or otherwise get removed. That’s one reason why the “idownvotedbecau.se” was bad - on SO you shouldn’t just down vote posts containing pictures of code - you should close them for lacking a reproducible example. And as it happens, the site has built-in close reason messages.

1 Like

On Codidact I have (so far) assumed canonical posts referred to Q & A pairs (or possibly Q & As). As this seems to me to be a suggestion regarding assistance to users asking questions, my query is "How might canonical posts solve this?

But an image of code does not mean such an example is not reproducible (for someone prepared to bother to rekey). Close reasons tend to have to be brief and, for simplicity, a few close reasons cover a considerable variety of issues. The “I downvoted because…” approach could be a valuable addition to other reminders/warnings by opening up a near unlimited choice of relatively specific examples, each with comprehensive details of why that particular approach is not desirable and maybe examples of good versions of bad attempts.

In essence, on SE Close reasons are ‘theory’ - they have to be precise and comprehensive (but brief) - whereas many people understand ‘concepts’ much more easily when ‘illustrated’ (i.e. when coupled with an example).

“Don’t worry that English is not your mother tongue but take what care you can with grammar and spelling” is the ‘theory’ end of the spectrum, whereas:

“Don’t use all caps. Don’t use textspeak. Use conventional capitalisation for trade names. If by “i” you mean ‘me’ be sure to use “I”. Consider passing through a spell checker or get someone with better English to vet your proposed Q. (and dozens more.)” is the ‘example’ end, for that particular concern. A page per concern would give space for “because it is like shouting and puts off people ever reading your Q, making it less likely you will receive a good answer, quickly.”; “because if you write word when (you know) you mean the Microsoft word processing software you are being ambiguous and may confuse someone who would otherwise be prepared to offer a solution to your problem”. And in general because if you don’t take care you are not encouraging those that may have an answer for you to give you priority over other questioners who have taken care.

It seems like some explanations for downvotes would be general (would apply on most/all sites) and some would be site-specific – and all should be available right there on the site in question, so somebody not aware of the broader network or third-party sites doesn’t need to go find them. I think that means we want a body of help that can be community-maintained, and an easy way to point users to it. Version one is a link manually pasted into a comment, but down the road we should think about a general “link to help” interface that lets the user choose a topic from a list of commonly-cited topics or something along those lines.

1 Like

We will have different categories of post types, like Q&A, discussion, paper, etc. What you describe sounds like it can be handled with a post in the paper category. Posts in the various categories can easily reference each other. This mechanism was originally motived by the desire for canonical posts, but should serve what you describe just as well.

1 Like

Thank you. If then the A to the Q of this thread is, in effect, “We already have” then that’s good enough for me!

I definitely agree. I’d like consideration be given to such a list being numbered so related Comments need be no more than, say, “[#2.9]” with that a magic link and automatically prefaced with “Please refer to:”. The ‘major’ part (before the dot) could be, or match, the Close reason (possibly reserving “[#0.n]” for general guidance, such as https://stackoverflow.com/help/how-to-ask) the ‘minor’ all the specific rationale, further advice and examples. Only “FAQ quality” links would be ‘magic’.