6

I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc., and I obviously cannot put all these into libraries. I need a practical method to index all of them, and to be able to make this index available to others.

  1. What must such an index contain to make searching easiest?
  2. Are there any such repositories available on the web? (So I can test the techniques they use.)
  3. Are there any applications already written that implement this that I can have a look at?

Possible duplicate: https://stackoverflow.com/q/90300/15161

Community
  • 1
  • 1
slashmais
  • 7,069
  • 9
  • 54
  • 80

5 Answers5

2

If you're working with .NET / Visual Studio, you could look at adding them as code snippets

Code Keep is a pretty good online repo for CodeSnippets and has plugins for VS2008

What we've done at work is created a common account for the dev to use, so everyone submits to codekeep under a common login and then can retrieve everyone elses snippets.

Also it might be worth your while creating a developer wiki on your dev network. Somewhere that the old hands can leave documentation on your regularly used patterns & snippets and new team members can check for help. We use TRAC in house as an all in one WIKI / Issue Management / SVN Integration and it does the job nicely

Eoin Campbell
  • 43,500
  • 17
  • 101
  • 157
  • It's a mixed environment, mostly linux, also windows and web-dev, but your links are the kind of stuff I'm looking for - to get ideas from, thanks. – slashmais Oct 26 '08 at 13:22
2

Another similar result from searching StackOverflow: Best Application For Storing Code Snippets

Community
  • 1
  • 1
Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
  • This is useful - found links in a couple of the answers that I can go & study. (I searched for 'reuse' on SO, so did not find all those which refer to snippets.) – slashmais Oct 26 '08 at 13:29
1

You might want to try refactormycode.com or set up your own wiki for it. A wiki actually sounds like a good application here.

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
  • Another neat resource! thanks! A wiki could work, as you and Eoin Campbell suggest. (The real trick though, would be to get everybody to contribute & not just ask (verbal) explanations from there neighbours - basically to make it work as well as SO does.) – slashmais Oct 26 '08 at 13:47
0

I find the only way to manage source code is in the source control repository. This includes templates and pseudo code algorithms. How it's different from the rest of your code ? I'm familiar with cvs that can be hosted for example here (setting up cvs server is not to complex task either) you can search the repository using cvsearch and browse it using cvs web client.
I'm not saying cvs is a best option just another one that fulfill all your need.

Code snippets is a not a good option, IMHO.

Ilya
  • 3,104
  • 3
  • 23
  • 30
  • Jesus Christ! Use Git. – diimdeep Jul 03 '13 at 10:03
  • It was 2008 if you noticed... any way in real world you use tools selected by company and not what you like. I'm using perforce right now can't say i'm happy but it is what it is ... – Ilya Jul 03 '13 at 14:10
0

You can do a full-text index of your hard drive using a tool like Copernic, Windows Live Search, or Google Desktop. Then whenever you want a code snippet that does a specific thing, just search for the relevant keywords and there it goes.

JosephStyons
  • 57,317
  • 63
  • 160
  • 234