Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News CodePaste.NET, a Website for Exchanging Code Snippets

CodePaste.NET, a Website for Exchanging Code Snippets

Leia em Português

This item in japanese

Rick Strahl has created CodePaste.NET, a website that allows .NET code snippets to be shared among social networking and IM users.

It is difficult to insert code in social networking web pages and IM windows because the code formatting usually gets lost or the number of characters is limited, or other similar reasons. CodePaste.NET lets anyone to paste code snippets in a text box, then hit the Paste button. The snippet receives a URL that can be copied from the browser’s address bar and distributed. Anybody can view that snippet, and signed-in users can comment and edit it. This way, snippets can be sent even over Twitter.

The website offers syntax highlighting for the following languages: C#, VB.NET, JavaScript, HTML, ASP.NET, JavaScript, XML, CSS, Sql, T-SQL, and FoxPro. Code line numbering can be turned on or off, and the code can be copied to the clipboard with a click.

The snippets can be retrieved as JSON, XML using “?format=json” (or xml) after the URL like this: RSS and ATOM support was added to retrieve lists of snippets.

The entire website’s source code is available for review.

Pastie, a similar site, offers the same service but for a much larger choice of languages including Java, Ruby, C++, Python, Perl, PHP, Pascal, YAML, and others.

Rate this Article