Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated MCVE to reprex to mirror StackOverflow's changes #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions stackoverflow/nomcve.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
---
title: No MCVE
byline: lacking an MCVE makes it hard to answer
title: No reprex
byline: lacking a reprex makes it hard to answer
permalink: nomcve/
categories: "Stack Overflow"
redirect_from:
- NoMCVE
- nomvce
- NoMVCE
- NoREPREX
- noreprex
---
## Without a Minimal, Complete, Verifiable Example, it is hard to know what is wrong {#introduction}
## Without a Minimal, Reproducible Example, it is hard to know what is wrong {#introduction}
{::comment}In this paragraph, give the user the tl;dr lowdown. {:/}
A question without any code, or where the code provided is not
* minimal – as little code as possible that still produces the same problem
* complete – contains all parts needed to reproduce the problem
* verifiable – would compile if run, and exhibits the problem described in the question
cannot be easily, if at all, answered.
* reproducible – would compile if run, and exhibits the problem described in the question

When a code sample has these qualities, it is generally referred to as an [MCVE](https://stackoverflow.com/help/mcve).
When a code sample has these qualities, it is generally referred to as a [reprex](https://stackoverflow.com/help/minimal-reproducible-example).

## Why this is a problem {#whythisisaproblem}
{::comment}In this section, detail why the post has problems{:/}
Without code, users will have to guess what might be wrong with a person's code. With too much code, the problem may be lost like the proverbial needle in the haystack. If you post code that is lacking the section that actually exhibits the issue, then what is included is practically worthless. And, if the code is full of compile errors or artificial bugs caused by translation to the question, these may hide the actual problem.

## Why this is worth a downvote {#whythisisworthadownvote}
{::comment}In this section, you can describe why the problem is worth a downvote within the community in which it was posted{:/}
Without an MCVE included in a question, it is much harder to answer. This also means it is now much more unlikely the question will get an answer. Experienced users may be able to determine the problem, but it will take them longer than necessary to do so. Or, they may be reduced to guessing at possible reasons until they guess right, or give up. This is considered rude as it wastes the time of those trying to help.
Without a reprex included in a question, it is much harder to answer. This also means it is now much more unlikely the question will get an answer. Experienced users may be able to determine the problem, but it will take them longer than necessary to do so. Or, they may be reduced to guessing at possible reasons until they guess right or give up. This is considered rude as it wastes the time of those trying to help.

Another huge benefit of an MCVE is that people can just copy paste the code and run it to observe it's exact behavior. Many times when people help, they write code in order to help find a solution. Having an MCVE spares them the work of converting example code into an application that exhibits the problems described in the question.
Another huge benefit of a reprex is that people can just copy paste the code and run it to observe its exact behavior. Many times when people help, they write code in order to help find a solution. Having a reprex spares them the work of converting example code into an application that exhibits the problems described in the question.

## What to do next {#whattodonext}
{::comment}In this section, cover how the problem can be fixed.{:/}
Create an MCVE! There are a [number](https://stackoverflow.com/help/mcve) of [tutorials](http://www.sscce.org/) available, some of which are part of larger "how to ask a good question" guides, such as [this one](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) (see the "Sample code and data" section). Read them! They are there to help you.
Create a reprex! There are a [number](https://stackoverflow.com/help/minimal-reproducible-example) of [tutorials](http://www.sscce.org/) available, some of which are part of larger "how to ask a good question" guides, such as [this one](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) (see the "Sample code and data" section). Read them! They are there to help you.

Once you have a good grasp of the concept, go back and edit your question. If you have too much code, clean it up! Remove everything that doesn't have to do with the logic that the question asks about. For example, remove empty lines and comments, if not relevant to the question. If the code contains HTML markup, remove CSS and layout details that aren't part of the question.
Once you have a good grasp of the concept, go back and edit your question. If you have too much code, clean it up! Remove everything that doesn't have to do with the logic that the question asks about. For example, remove empty lines and comments if they're not relevant to the question. If the code contains HTML markup, remove CSS and layout details that aren't part of the question.

If you don't have code, create a [prototype](https://en.wikipedia.org/wiki/Software_prototyping) that only covers exactly what your logic is trying to do. Make it as clean and simple as possible, and make sure it reproduces your error. You may be surprised to find out that you discover what your problem was by simply taking this step! But, if not, you can then use this prototype to add code to your question.

Expand Down