I often see questions with code samples depending on external resources (libraries, images). Those code samples are not self-contained, often more complicated to understand, and cannot be turned into executable snippets.
Now, I found such a question and resolved the dependencies by removing them (they were superfluous) and by adding the missing resources to the post (uploading an image).
However, the edit was rejected by the community. Unfortunately, I don't understand why the edit was rejected. When should I make edits to code does not specify whether or not cleaning up external dependencies to make code samples self-contained is an acceptable edit.
IMHO we should be allowed to resolve or remove external dependencies to make other people's code samples self-contained as long as
- ...the resulting code helps better understand the question
- ...the resulting code is easier to run, read and understand
- ...the resulting code still exhibits all characteristics relevant to the question
I think this will help to make questions more appealing to future readers with the same issues and encourages more, better quality answers.
What are your thoughts on the matter?