A paste bin is a very handy tool when you’re working as part of a team, especially if there’s any remote work involved. Basically, they’re web-based clipboards where you can paste in snippets of text—JavaScript, CSS, markup or whatever—and then share the URL in an email or a chat message (a lot cleaner than pasting code straight into an email or chat window). Often you can specify a life span for the snippet so, for example, if nobody visits the page for a three month period, the URL rots.
At Clearleft, we often use pastebin.com though I’ve also used dpaste in the past. I like the way that pastebin allows you to create subdomains on the fly: just type in the URL to create it.
These services are great for collaborative debugging but they have one slight flaw when it comes to client-side work. JavaScript and CSS don’t exist in isolation; they are used to enhance an existing HTML document. So passing around a snippet of JavaScript or CSS might not be much good unless it is accompanied by the corresponding markup.
Enter JS Bin from Brighton’s own Remy Sharp, the man behind the superb microformats bookmarklet. This is a paste bin with a twist. As well as being able to share a snippet of JavaScript, you provide the markup that the JavaScript is acting on as well. If you’ve been sent a JS Bin URL, you can play around with the JavaScript and/or the markup, saving as you go.
There are some other nice touches too, like the ability to include a JavaScript library at the flick of a dropdown. For a proper explanation, be sure to watch the screencast that Remy has recorded.