Snipt Helps Programmers Share Code Snippets

Allen Tipper
Apr. 26 2011, 03:00PM EDT

Snipt is a web service that attempts to solve a simple problem: storing commonly used snippets of code, and sharing them with your fellow coders. It seems to do that pretty well, with lots of good options for storing and sharing. Better yet, it has its Snipt API so coders can use this simple storage engine within their own programs.

As they say on their site:

So, what exactly is Snipt good for?
It's good for storing small pieces of code or commands that you use rather frequently, and will probably forget.

The Snipt API is a RESTful service that allows responses to be formatted in json, xml, yaml, or pickle. The pickle representation is a remarkably useful idea, allowing people to store small, usable python scripts and then directly access them within a python script. Due to the nature of Python, an intelligent coder could extract the code from these and even execute it within a program, thus leading to a program that could automatically update without even requiring a user download, although it would make the program only work when internet connected.

There are a few similar services, including the similarly-named Snipt.org API and Snipplr API. The Geekorium compared snipt.net to snippler back before the API launch:

Snipt.net is very pretty. It has a lovely ajaxy interface that swooshes and swashes around when you add and edit code, and just exudes polish. It has an embed function that allows you to post to a website and have the code remain up-to-date no matter how many revisions you make. Someone has also made a WordPress plugin that makes the embedding even easier (which is nice for my purposes). What it lacks right now is an API (they’ve asked for help from the community, but there doesn’t seem to be much there right now).

Well, now there's an API. The API is also completely open source, for those of you who might be interested. Find the source on Github.

Allen Tipper Allen Tipper is a Computer Science generalist with a wide range of interests. After graduating in 2008, he's been programming for and specializing in mobile devices, as well as social media websites. As a programmer, APIs are rather important to him, as he finds using them in his software amazingly fun.

Comments

Comments(3)