Tagged Code Snippet Repository

Peter Cooper has developed a simple source code snippet repository with tagging that I like. It’s far from perfect, the syntax highlighting is often squirrelly and if you enter in a multi-word tag like this “unit test” when you go to edit the code you get your tag back as two separate words so you always have to put the quotes back in place. Nevertheless, it works and it’s a good start. Plus people aren’t being shy about putting code out there.
What we need at this time are a small army of Java developers putting their code snippets into this repository. In no time it could be the place to go for a quick routine to fix a problem.
Here are my snippets thus far:

They will even give you a feed for when I post new snippets. Unfortunately they don’t have feeds for individual tags (e.g. Java) working yet. That’s a shame and it’s actually one of several glitches I’ve noticed. But even with the bugs this is still a more believable code snippet repository than many I’ve seen over the years. The tags go a long way towards making it really searchable and usable. But it will only be really useful if _everybody_ enters in some of their favorite utility functions and classes. So go sign up this minute and put in just three Java code snippets! It will take you less than 15 minutes and we will all benefit.
If there aren’t any more improvements or he never releases the source code or it never gets full text search then maybe I’ll move my snippets to another repository in the future. But it needs to be one with syntax highlighting, an easy framework for inserting the code in the first place (this is very very easy), and tagging.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s