Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I index and make available reusable code? [closed]

Tags:

code-reuse

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

like image 635
slashmais Avatar asked Oct 26 '08 12:10

slashmais


People also ask

How do you make a reusable code in Python?

And when it comes to reusing code in Python, it all starts and ends with the humble function. Take some lines of code, give them a name, and you've got a function (which can be reused). Take a collection of functions and package them as a file, and you've got a module (which can also be reused).

Which feature allows you to reuse the code?

Static Code Analysis Makes Code Reuse Easy You can use static analysis to reuse code easily.


2 Answers

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

like image 122
Eoin Campbell Avatar answered Oct 25 '22 15:10

Eoin Campbell


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

like image 20
Paul Tomblin Avatar answered Oct 25 '22 17:10

Paul Tomblin