SSCCE (Simple Self Contained Compilable Example), a term coined by Andrew Thompson to describe the desired form of code snippets posted in newsgroups.
If someone asks for a snippet or an short example to demonstrate a problem, they really mean a SSCCE, but just don’t want to use a potentially unfamiliar term.
When you post some code on the Internet, your odds of getting help with it are greatly improved if:
When you post an error message, include the complete and exact text copy/pasted. It will mean far more to experienced people than to you. Since listings don’t have any line numbers, you need to manually indicate which lines error messages and stack traces point to.
Some people have taken offense at my advice, and counter I can post any damn question I want, any way I want. I don’t have to follow your prissy power-trippy rules! That is quite correct, you don’t; it is just your odds of getting good responses are better if you follow this advice. Consider that some posts on the newsgroups attract the most experienced people who debate among themselves the optimal solution. Other posts are ignored or attract only a few not very helpful responses. Some questions get few responses simply because they are too difficult. Others do poorly for lack of following the advice above or for ignoring the additional advice I give in the newsgroups entry. It is your choice. If you want better responses to your questions, this is what in my experience, both as questioner and answerer, will get them for you.
In the process of creating the SSCCE, you often strip out the thing that is causing the trouble. 90% of solving a problem is knowing precisely what is broken.
Once you have your SSCCE you can post it to a newsgroup. Unfortunately, your newsreader (or the newsreaders of those reading your SSCCE) may break lines at odd points. Or the file may simply still be a bit too fat to post. You can then post it on your website (plain or zipped) and post its URL (Uniform Resource Locator) or post your SSCCE on Google docs, and post the URL on the newsgroup. You can also post your code snippet on Pastebin or in a GitHub repository or even my website mindprod.com. Just email me your snippet and I will post it using JDisplay .
Since the acronym SSCCE is used only on newsgroups, you are free to pronounce it to yourself any way you please. I suggest sskkee, a long hissing s, stuttered k, then ee as in tree. Some suggest ess ess cee cee ee.
When you send someone an SSCCE by email, don’t just embed it in the text of the message. The lines will wrap and it won’t compile. Further, there is a good chance you will forget to send everything, e.g. the imports. Send it as:
available on the web at:
optional Replicator mirror
Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : . If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Your face IP:[184.108.40.206]
|Feedback||You are visitor number 37,894.|