Code Share: Real-time Code Sharing (like Pastebin)

As a contract developer, I work remotely a lot. Additionally, I share code with a lot of fellow developers across Instant Messeaging (AOL, Yahoo, MSN, IRC, etc.). One of the tools I utilize is called Pastebin. It’s a site where you can post code, and it’ll give you a unique URL. You can then send that URL other others via IM by pasting it in. They can then see your code that you pasted, formatted and highlighted all pretty (since Pastebin knows a bunch of programming languages). It even has diff support (to see differences in code if someone modifies what you posted). Quick, simple, fast.

Additionally, you can host Pastebin on your own site.

I wanted to see if I could do it in Flex utilizing Flashcom to enable it real-time. Although Pastebin is fast, it still requires you to do a page refresh to see the most up to date postings. Since Flashcom is push based, I can see code as it’s posted, real-time.

It doesn’t have diff support, but it does format ActionScript, Java, PHP, and Python using Igor Dimitrijevic’s phat Flash Text Formatter. Using Kevin Lynch’s deep linking, you can get a URL so you can send it to your colleagues’, and they can paste it into the browser and see your code that you posted.

Any comments, problems, or suggestions let me know!

3 days, 2 hours a night. I love Flex & Flashcom.

Code ShareUse App | Source Under Creative Commons (ZIP)

Known bugs:

  1. No code in there currently to get around Firewalls via HTTP Tunneling.
  2. Sometimes, Firefox’s URL does not update when you click on a code posting.
  3. Sometimes the view doesn’t change to show the code you just posted.

7 Replies to “Code Share: Real-time Code Sharing (like Pastebin)”

  1. I’m going to give this a whirl, if I make any improvements to the FCS code, I’ll send it off to you (to repost if you feel it’s worthy).

    I think I might work on a flash version (non-flex) because I can’t afford flex on my server and I’m sure there are lots that feel the same.

    Thanks J, nice work!


  2. good question… threats of broken knees and burning bamboo under the fingernails I think would be best.

    I thought it was more of an ‘internal’ application anyways? As in, you’re groupin’ with a bunch of other devs around the world, so there would be a trust factor there.

    For something completely public, then I guess there would just be an admin panel for the admin, or have people sign up for an account of some sorts..

  3. how about also adding in a roll-back feature ?
    kinda like a wiki thing so even one script get deleted people can still see it from history area or some other places.

    btw, this is really a cool app :-)

Comments are closed.