Over a million developers have joined DZone.

Troubleshooting: Share Your Code

· DevOps Zone

The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today

There are lots of times when you need to share code snippets, a good example is when you are troubleshooting a problem and need to ask for help. Instead of just explaining the problem you have to someone, it's 1,000 times easier to show them what the problem is.

I get a couple emails a day from people asking for help with problems they are having with CSS or JavaScript. An example would be something like "I can't get your code snippet to work ... what is the problem?" There is no way I'll be able to help with a question like that because I can't see what is wrong or don't know if they have made any changes to the code.

If you are asking for help with your code, some people will just paste the code to you in an email or on a forum, this is a bit more helpful as I can take this code, run it and see if I can find out what's going wrong. But this relies on me having all the exact code that they're using, which might be lost while copying and pasting code from their editor, to an email, or to my editor.

The best way of asking for help with your front-end code is to be able to share your exact code. But this is hard to do as most development problems should occur on your local machine with all the code on your local computer. The solution to this is to use web editor that allows you to share your code and the result, something like jsFiddle or CodePen.

  • Go to jsFiddle or CodePen
  • Enter the HTML, CSS and Javascript.
  • Hit run to test you can recreate the problem.
  • Save to a URL
  • Share the URL

This way, the person you are sharing with can see the exact code you are using and can see the same problem you are trying to solve.

Here are some of the services you can use for free to share your code.







JS Bin

JS Bin
JS Bin



The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today


Published at DZone with permission of Paul Underwood, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}