Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

What do you want on Snippets? (See related posts)

I apologize for the temporary interruption in the code here, but I want to extend Code Snippets further, and am seeking the wisdom of the community here. Please post comments!

Also, thanks to all of you who've made this site what it is. I love looking through the code here.

Comments on this post

oronoa posts on Feb 01, 2006 at 15:48
Peter, it's a great idea. well executed, and the new design makes it even better.

Some suggestions

-- my snippets - where I can collect what's interesting for me like del.icio.us my bookmarks
-- tag suggestions, to make the tag space less noisy

Oron
mrnicksgirl posts on Feb 01, 2006 at 16:18
Searching? unless I'm missing something, I can't find a way to search for a snippet. It would be nice to be able to specify a certain category to search within as well.
bradphelan posts on Feb 01, 2006 at 17:12
Add back the ability to narrow a tag ala

tags/ruby/arry.

from the UI

The problem at the moment is that I click "ruby" then I want to see all the snippets on ruby arrays. However if I now click "array" I get a whole load of non ruby associated snippets. This problem will grow as the number of snippets in the database increases. Eventually some snippets will become inaccessible. For example if there are 5000 snippets posted with the tag array but you just want stuff about C arrays the current UI will not allows trivial access ( short of typing the url manually ).

Perhapps two icons for each tag. One for a narrowing jump and the other for a a top level jump.

Regards

Brad
nihilist posts on Feb 01, 2006 at 18:21
Oron totally hit what I was thinking on the head,
-- my snippets - where I can collect what's interesting for me like del.icio.us my bookmarks

I'd love this.
kmart posts on Feb 01, 2006 at 20:52
1. Concat the rails and rubyonrails sections (tags) into one.

2. Possibility to list all entries for one section in one page.

3. Provide a REST api.
peter posts on Feb 01, 2006 at 21:13
brad: You can do that already, but we removed the links which made this obvious in Snippets 2. I'm not sure why! I guess I should add them back.. :) For an example: http://www.bigbold.com/snippets/tags/ruby/array .. it's a tag combo :)

oronoa: I've been thinking about this myself. I've seen a bunch of stuff I want to 'remember' and realized that Snippets doesn't let me do that. It'll be implemented.

And, yes, searching is important. Not that hard to add either, so that'll happen too. Thanks for the pointers guys!
peter posts on Feb 01, 2006 at 21:13
kmart: What would you find the API useful for? Just wondering. I like APIs too :)
jnewland posts on Feb 02, 2006 at 06:15
I'll third the request for "my snippets". That'd be hot. A combined feed of the posts I've made and other's post that I've marked as favorites would be one hell of a feature.
mloskot posts on Feb 02, 2006 at 06:16
First, thanks Peter for CS!

Here are my ideas:

1. More clean categorization to make less nois

I think it could be good to have a list with available categories to select while posting new snippet.
What I mean nois is e.g:
rails rubyonrails
file files
lighthttp http
both categories are for the same topic

Such huge flexibility in categories can be replaced by good search engine, so if I search for http then lighthttp will be matche and I don't need to have separate category for lighthttp :-)

May be a kind of categories tree could be nice, just like on the SF.net:
http://sourceforge.net/softwaremap/trove_list.php

What about some highest level categories like Operating System with Unix, Windows, All etc.
I think it could be available for selection, because may be useful to know if particular snipped is platform dependant or portable etc.

Finally, no matter what is the case of category name given by user make all categories lower-case.
Just like so called unix-name on the SF.net, every project has its unix-name which always is lower case.
That helps much to keep things clean and in order :-)

2. Comments Threading

Possibility to replay for particular post in comments and then to display comments as tree of threads.

3. Snippet Request

Instead of posting working snippet, users could be able to post a request for new snippet
e.g. Looking for regular expression to find all URLs in HTML source.
Then somebody who knows how to solve the requested problem can provide snipped.
After snipped is provided by someone, the request changes to entry with working snippet.

For now, that's all from my side. Thanks!
Cheers
kmart posts on Feb 02, 2006 at 07:08
peter: One usage that I can think of with an API interface, is the abilitiy to make a command line interface to the service (please don't laugh).

I.e. $ snippets list tags
tag1, tag2, tag2
$ snippets list tag2 content
heading1, heading2
$ snippets show tag2 heading2
 and the cut-and-paste...

And imagine what grep can do with the output above...
ntk posts on Feb 02, 2006 at 08:54
Just a pointer to what a Ruby-based API could look like: http://jots.com/about (a social bookmarking website)!
ntk posts on Feb 02, 2006 at 10:16
The full correct URL is: http://jots.com/pages/xmlrpc_api.html
paka posts on Feb 02, 2006 at 18:22
"source code soon to be available"

when it is, we will be happy to give you a hand with some of these !
georgesb posts on Feb 03, 2006 at 01:42
CodeSnippets is great! I'd like to see it get more usage. I only landed on it by accident by snooping around del.icio.us. If it had a simple, catchy domain name and more publicity on related websites, it might get more traffic from both amateur and professional coders.
vicknice posts on Feb 03, 2006 at 01:49
An "Email this snippet" might be useful to some.
willcodeforfoo posts on Jun 18, 2006 at 23:19
Another vote for an API.

It'd be great to be able to post from other than the website (I'm thinking of TextMate in particular, but Quicksilver could also work).

A good example of something similar is the Flickr API. I created an AppleScript/Ruby script that runs the screencapture utility, saves it to ~/Pictures/Screenshots with the date, uploads it to Flickr, sets it to private, and tags it with 'screenshot'. Finally, I bound it to Shift-Command-5 with a Quicksilver trigger. The power of OS X!

Now, how great would it be to dump snippets this way?
timmorgan posts on Jun 19, 2006 at 04:23
Alpha sort the tag listing on my snippets page.
timmorgan posts on Jun 19, 2006 at 19:11
RSS feed for comments (either for the whole site, just comments on my snippets, or both)
nothingless posts on Jun 20, 2006 at 11:10
I would very much love a Search as well - preferably with the option to search only your own snippets, or to search everyone's. Sometimes I see a piece of coding go by that I want to find again later, and it's nearly impossible to do that now unless you remember who posted it - which I don't always do!

Other than that, awesome job on the site, I really love it. :D
dirtyaffairs posts on Jun 21, 2006 at 14:29
Another vote for search.

The API can be interesting to integrate your service with an external programmer's editor (one of my favourites features of Smultron is text snippets).

Thanks for your job.

Edu, Barcelona, Spain
timmorgan posts on Aug 23, 2006 at 20:45
I created a feed for the comments using feed43.com:

http://feed43.com/8055673348816228.xml
ovhaag posts on Aug 24, 2006 at 20:01
mark snippets, taht are interesting for me (see frist entry by "oronoa")

"/2-bug": tag_xxx -> user_yyy leads to http://www.bigbold.com/snippets/user/user_yyy
thats intendet and ok. But
tag_xxx -> older snippets -> user_yyy leads to http://www.bigbold.com/snippets/user/user_yyy/2
with a wrong "/2" at the end. (This is the only bug i've seen so far - the main functions work perfect and overall "snippets" is great!)

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts