BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

CodeCube Offers Shareable, Runnable Code Samples

| by Brian Rinaldi Follow 0 Followers on Oct 25, 2013. Estimated reading time: 1 minute |

CodeCube is a new service and open source project that aims to improve collaboration by allowing developers to both share and run code samples in a secure manner via the browser.

The initial release of the service, available at codecube.io, supports sharing and running of Ruby, Python, Go and C code. Creator Harry Marr has also released it as an open-source project on GitHub, though without any specific license.

In a recent post announcing the project, Harry noted that many development communities collaborate and share code using Gists, a service from GitHub that allows the sharing of snippets and pastes of code. However, Gists do not have the ability to be run without first downloading and setting up the shared code locally. As Harry states, “Reproducing the output is often extremely difficult, as it can be hugely dependent on the environment the code was run in.”

In creating CodeCube, Harry was inspired by similar tools used by developers in Go (Go Playground) and in JavaScript (JSFiddle) that allow users to run the code entered within the editor. He aimed to recreate this for other languages, but had to overcome the security complications of running arbitrary, user-submitted code on the server.

In order to overcome this security limitation, CodeCube relies on an open source project called Docker. As Harry explains:

[Docker] enables creation and teardown of relatively secure sandboxed environments in a fraction of a second. Each time a code snippet is run, a docker container can be created, started, used to run the untrusted code, then killed and destroyed.

While the CodeCube service and project are already available, future updates are planned to include user authentication, collaborative editing, additional language support and an improved user interface.

Reaction to the announcement has been almost universally positive on Hacker News and across Twitter, where it received the most attention.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT