Ah, snippets: they’re bits of reusable code that you can copy and paste to your heart’s content. Because I definitely fancy myself more of a designer than a developer, when it comes to programming I’m very dependent on code snippets- and I’m so grateful to people who actually take the time to create snippet repositories. Here are five of my favorite:
Snipplr
I’m not sure whether Snipplr’s been around longer than the other sites on my list, but it’s definitely the one I’ve been using the longest. Easy to use, with a really wide library of snippets, Snipplr also has a WordPress plug-in that I’ve used a few times, and a bundle for TextMate users. I like how Snipplr features both the most recent and the most popular snippets on their front page- it makes for fun browsing when I’m feeling somewhat geeky. Visit Snipplr »
Snipt
With a tagline that reads “long-term memory for coders”, Snipt is a site I visit over and over again. The snippets are nicely organized and clearly presented, with links for instant embedding or copying at the bottom of each snippet. Visit Snipt »
Google Code Search
It seems I’ll never tire of recommending Google products, but the Code Search service from the big G is great because it lets you search the entire web for function definitions and sample code. Be sure to use their recommended syntax to search. Visit Google Code Search »
DevSnippets
DevSnippets is no relation to Devlounge- what it is is an awesome gallery for code and design snippets- from CSS to jQuery, Prototype to Mootools. Unlike some of the other sites I mention here, DevSnippets doesn’t host the code- they link to code and tutorials around the web. Visit DevSnippets »
CSS Tricks’ Code Snippets
My favorite of all, this one’s almost a daily visit for me. I love how simple it is to find the snippets you need, and appreciate that the WordPress snippets- which, lets face it, are what I use the most- are just one click away. Visit CSS Tricks’ Code Snippets »
Do you use snippets?