Question: I need to share my code (config files, log files, source code etc.,) with group of people to get their feedback for debugging purpose. Can I put the code somewhere online and give a link to others to review, comment, or modify the file? What is your recommendation?
Answer: When you are troubleshooting an issue and need some help, you may be posting your question on some public forum or blog.
If you want to attach config files or log file, you may even post that in the forum question itself, which may make the particular post very long. This will force other readers to scroll down the page to read your question.
Instead of pasting the log files in the post, you can put it on a website called pastebin.com and give the link to the log file in the forum or blog post.
pastebin.com also offers syntax highlighting for various programming languages. If someone edits your file, you can perform a diff to identify the changes.
pastebin is here to help you collaborate on debugging code snippets. If you’re not familiar with the idea, most people use it like this:
* submit a code fragment to pastebin, getting a url like http://pastebin.com/1234
* paste the url into an IRC or IM conversation
* someone responds by reading and perhaps submitting a modification of your code
* you then view the modification, maybe using the built in diff tool to help locate the changes
You can also get your own private pastebin area with your own subdomain. For example, I choose thegeekstuff.pastebin.com, where I’ve pasted a shell script code. I was also able to highlight the line that has the problem by prefixing it with @@.
To understand more on how pastebin.com works, playaround with this problematic shell script I uploaded to the pastebin website. Feel free to edit this file, if you know how to fix the issue that is highlighted. (i.e line#10): Bash Script – Not working
I can simply post this link to a forum or blog, where I’m requesting help. Other readers who know the answer to problem can modify the shell script directly on the pastebin website.
In a nutshell, pastebin.com makes the collaborative debugging process easy.