补充一下,如何提供代码, 要点就是SSCCE: Short, Self Contained, Correct (Compilable), Example
If you are having a problem with some code and seeking help, preparing a Short, Self Contained, Correct Example (SSCCE) is very useful. But what is an SSCCE?
It is all in the name, really. Take a look at each part. The version prepared for others to see should be:
Short (Small) - Minimise bandwidth for the example, do not bore the audience.
Self Contained - Ensure everything is included, ready to go.
Correct - Copy, paste, (compile,) see is the aim.
Example - Displays the problem we are trying to solve.
Short, Self Contained, Correct (Compilable), Example
If you are having a problem with some code and seeking help, preparing a Short, Self Contained, Correct Example (SSCCE) is very useful. But what is an SSCCE?
It is all in the name, really. Take a look at each part. The version prepared for others to see should be:
- Short (Small) - Minimise bandwidth for the example, do not bore the audience.
- Self Contained - Ensure everything is included, ready to go.
- Correct - Copy, paste, (compile,) see is the aim.
- Example - Displays the problem we are trying to solve.
详见 http://sscce.org/Stack Overflow也有一个类似的MCVE, 详见 How to create a Minimal, Complete, and Verifiable example
一周热门 更多>