5

I tried to include a link to the place1 where I build my Minimal, Complete, and Verifiable example of the code I included in a question, to make it easier for the reader, however the site couldn't load.

Is there a place that could be used to build Minimal, Complete, and Verifiable examples, to which later a link could be included in the question?


1. cpp.sh

1

2 Answers 2

12

All necessary code to understand the question should be in the question itself and not dependent on availability of a third party resource.

As an additional bonus you could copy it to http://ideone.com for a runnable sample.

1
  • 2
    Not ideal. No unit test support. No multiple file support. Lots of advertising.
    – Espinosa
    Commented Apr 29 at 12:17
3

What about GitHub Codespaces? But it's more like a browser-based, full featured IDE and looks a bit too heavy. I am not sure how much it is long-term "free" and "durable" option.

We should always place the core part of the solution here at SO, so if the external link becomes broken, the answer would be still usable.

So any additional code example should be treated as an optional addition.

Benefits of Codespaces (and similar external services):

  • runnable tests
  • better source code highlighting
  • multiple files support
  • show file structure
  • show imports of eventual dependent libraries

I think Stack Overflow should partner with a reputable external provider. Like they did with Imgur in regard to referenced images.

Partner with someone reputable to guarantee that the source examples won't go offline or behind a paywall; to ensure that the sources would be accessible at least in the read-only mode even if the external provider goes out of business.

You must log in to answer this question.

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