Posting code samples (and log entries) Suggestion

for everything else
Post Reply
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Posting code samples (and log entries) Suggestion

Post by tod »

When asking for help, code samples are often invaluable. Sometimes a few lines of real code will do other times a more complete sample would really help. Posting a large code sample (or log samples) into the forum itself is somewhat problematic especially for those who read the forum via email. I was responding to a post by Christoph recently where he used gist.github to post a complete code sample of his problem. I thought this was an excellent idea that I would like to see gain wider currency. If you aren't familar with GitHub it doesn't much matter. You only need your browser to use Gist, you don't need to download or install Git. "Gist is a simple way to share snippets and pastes with others." You set up a free account (.3 Gig space) and then you paste your code into the text box and hit one of the create buttons. You can create private and public gists. A public gist can be searched, a private one won't. (NOTE: private isn't very private once you post it in a public forum)

Here is a private gist that contains C++ code..
Here is a public gist that is just text.

When I want to link a private or public gist to here like I did above, I just grab the URL from my browser's address bar.
Post Reply