Code Snippets - Anti Pattern or Productivity Secret?

Staten Island, New York (PressExposure) May 17, 2009 -- Code Snippets have been criticized as the tool of the copy paste programmer, who instead of writing code themselves, copies pieces of code from the internet without understanding how it actually works. When this style of programming is used frequently, it is sometimes referred to as "copypasta," which defines as "the spaghetti code resulting from repeatedly copy/pasting lines of code within a program."

Searching for "Code Snippets" on Google returns 5.75 million results. Snippets of code can be found in technical blogs, open source projects, and articles on technical web sites. The quality of this code varies widely. Scott Hanselman coined the term "Bathroom wall of Code" on his blog to refer to the amount of trust you should put into code found online.

Despite this bad reputation, code snippets are seeing a renaissance online, with several online communities dedicated to sharing code snippets gaining popularity. Sites like DZone Snippets, Snipt and Snipplr allow users to share code snippets in a wide variety of languages. The number of users and snippets for sites like these grow every day.

One of those code sharing sites, Snipplr is home to over 13,000 snippets that were saved by over 12,000 users. Almost 8,000 snippets have been added in the last year alone. That's not only a lot of code, but a lot of interest in code snippets.

"The reason code snippets will always be popular is that they usually work," says David San Filippo, creator of Snip-It Pro, a tool dedicated to organizing code snippets. "Using snippets is easy and saves time. Remembering the syntactic sugar needed in most modern programming languages is hard work. Most programming problems have been solved already. If a code snippet can save someone hours of debugging, and lost productivity, how could you not search for a solution online?"

The tool his company makes, Snip-It Pro, is one of many tools designed to organizing code. Most Integrated Development environments have some sort of text saving feature, but stand alone products like Snip-It Pro take it a step further, with support for code snippet templates and the ability to automatically comment a snippet with a unique ID and the url of the site where it was found. Snip-It Pro even integrates with Snipplr, allowing you to access all your favorite snippets and publish your own snippets easily.

The number of websites and communities growing to share code snippets will ensure that the amount of code found online will only increase. And while these tools and websites make it easier to find and use code found online, they don`t address the quality issue. In the end, it doesn`t matter so much where a snippet came from, as long as the person using it actually understands it.

If you'd like more information about this topic, or to schedule an interview with David San Filippo, please call 917-720-7225 or e-mail David at

About mtelligent Solutions llc

mtelligent Solutions llc

Press Release Source:

Press Release Submitted On: May 24, 2009 at 10:29 pm
This article has been viewed 4312 time(s).