One can think of reusable code from the perspective of the code that will call it to perform its service. This reusable code is a black box that accepts a known input value and returns a known output value. What happens inside the box (how the procedure actually works) is irrelevant to the code that calls it.
It is really a matter of how to approach for solving a problem. It is important to understand how to create and use class modules, this helps a programmer in writing reusable code.
A programmer should at least follow the following guidelines
write code that uses a consistent naming convention;
is indented properly; and
contains useful comments.
Following are some of the points which can help a programmer to write a program which can be reused
keep the code simple;
don't repeat ;
write a method/class for one objective;
make these methods/classes easy to test;
treat these methods/classes as independent software components;
use Interfaces and Abstract classes.;
Write code that can easily be extended in the future;
Remove code which is not needed;
Try to increase cohesion and reduce coupling (very important);
Follow Modular approach; and
Write code as if you are preparing a method/class which will be used in software
Are you revering to source code of some piece of software or a compiled library (dll, jar etc.)?
Your question isn't specific enough for anyone to give a conclusive answer.
What kind of software component? What do you mean by reconfigure? Do you mean if it can be altered for a different purpose? If that is the case, you will need the source code.
If you have the source code you can package each component as Milan said. A good article on wikipedia speak about this issue http://en.wikipedia.org/wiki/Component-based_software_engineering
One can think of reusable code from the perspective of the code that will call it to perform its service. This reusable code is a black box that accepts a known input value and returns a known output value. What happens inside the box (how the procedure actually works) is irrelevant to the code that calls it.
It is really a matter of how to approach for solving a problem. It is important to understand how to create and use class modules, this helps a programmer in writing reusable code.
A programmer should at least follow the following guidelines
write code that uses a consistent naming convention;
is indented properly; and
contains useful comments.
Following are some of the points which can help a programmer to write a program which can be reused
keep the code simple;
don't repeat ;
write a method/class for one objective;
make these methods/classes easy to test;
treat these methods/classes as independent software components;
use Interfaces and Abstract classes.;
Write code that can easily be extended in the future;
Remove code which is not needed;
Try to increase cohesion and reduce coupling (very important);
Follow Modular approach; and
Write code as if you are preparing a method/class which will be used in software
If you mean by SW component reusing code, Mr. Kirmani and the other gentlemen answered you. But if you meant component-based SW this is another story. Component here is built to be reuse, you can read about (CBSE). Configuration is another issue, there are many configuration management tools (CM) to manage and keep track changes in SW systems and of course mainly large systems . But there are no tools that support configuration component-based system development (CBD) and research is ongoing to enhance methods of tracking component-base system changes.
From a practical view point. As mentioned before code shall be independent from a machine or an operationg systems. Applying an abstractions from the machine or the operating system for example by using Virtual Machines like JAVA this should be possible. But if you want to use java programms you need an implemented virtual machine for the specific machine and operation system.
Reusing software on source code level is even harder. I've learned during my studies 4 different programming paradigms, Logical, Functional, Imperative and Object Oriented programming later also Aspect oriented an extension of the Object Oriented paradigm. The different paradigms are provided by several programming languages. So the main problem is the Zoo of language and programming paradigms. A solution to this problem is to use Generics or Templates. The description of the algorithm is independet of the used data nd releates to the description of the algorithm.
Reusing software as "Black Box" includes the risk of not knowing how the code behaves. Therefore the code has to be qualified by testing. But a 100% coverage is not effortable. But by wraping the "Black Box" Software with a wrapper reduces the risk.