News for hackers. Stuff that matters.

Ask HN: How do you share code for stackoverflow questions.

Often times, I stumble in my web development and need an expert to answer, so I ask on stackoveflow. However, explaining a question without the other party recreating the situation is a tough problem. So, my question is...how do you share your code and development/test environment with others on internet?

(Assume the code is open source..so no restrictions on sharing it).

( 2 comments | on HN )
Re:Ask HN: How do you share code for stackoverflow questions. by wimplash on Wednesday February 19, 2014 @12:11PM (#7264629)
For questions in Java/JavaScript where the sample code can easily be boiled down, I usually see that the inline code formatting is sufficient. For web-related questions, usually involving HTML, CSS, and JavaScript, use http://jsfiddle.net.
Re:Ask HN: How do you share code for stackoverflow questions. by rgovind on Wednesday February 19, 2014 @12:36PM (#7264810)
Thanks. jsfiddle looks interesting. I will try it out. Unfortunately, for HTML/CSS/Javascript, we cannot boil down code into small parts, given the visual aspect of things. So, I agree with what you are saying.