Logistics of code reuse (OOP)
Posted
by
Ominus
on Programmers
See other posts from Programmers
or by Ominus
Published on 2011-06-23T14:12:36Z
Indexed on
2011/06/23
16:31 UTC
Read the original article
Hit count: 299
code-reuse
One of the driving points behind OOP is code reuse. I am curious about the actual logistics of this and how others both in team or solo handle it. For example lets say you have 5 projects you have worked on and between them you have a ton of classes that you think would be useful in other projects.
How do you store them? Are they just in the normal project repository or do you break out the relevant classes and have them (as now copies) in another unique source repository that only houses code pieces that are intended to be reused?
How do you go about finding or even knowing that there is a good piece of code out there that you should reuse? It's easier if your solo because you remember that you have coded something similar but even then it becomes kind of a stretch.
If there is some way that you are storing these pieces of code do you then also have them indexed and searchable by tag or something. I fear that it just boils down to some tribal knowledge that you just know that for situation A i need solution B and we have a good piece of code that already can help here.
A bit verbose but I hope you get what I am aiming at. If you think of a better way to make the question clearer please have at it :)
TIA!
© Programmers or respective owner