Troubleshooting: Share Your Code

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 1000 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 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 copy and pasting code from their editor, to an email, 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.

jsFiddle

jsfiddle
jsFiddle

CodePen

CodePen
CodePen

CSSDeck

CSSDesk
CSSDeck

JS Bin

JS Bin
JS Bin

Dabblet

dabblet
Dabblet

Advertise here 50% Off

Comment