Sublime Forum

How to create a MVCE (Minimal Verifiable Complete Example)?

#1

I usually create a MVCE with 2 strategies:

  1. The first one is to write/create a new program from scratch.
  2. The second one is to create a full backup of the current program, and start deleting everything until I get the minimal program which still triggers the issue, i.e., I delete a few lines and test whether the issue still happening. I keep with this strategy until I cannot remove anymore things from the program without being able to reproduce the issue.

I usually use the second strategy when I cannot successfully create a minimal program using the first strategy. And usually when using the first strategy, I figure out how to fix the issue without asking for help, because with a minimal example, it becomes clear what the problem is and how to fix it.

More information:

  1. https://stackoverflow.com/help/mcve
  2. https://meta.stackoverflow.com/questions/366988/what-does-mcve-mean
0 Likes