reusable coding and programming?

K

Kevin

Hello!~

To make a program or some classes / functions better reuseable (or
other people can easily build their code on them), what are the major
points to pay attention to? Any "fast cooking list and recipe" for it?

Thanks a lot.
 
N

Niels Dybdahl

Kevin said:
Hello!~

To make a program or some classes / functions better reuseable (or
other people can easily build their code on them), what are the major
points to pay attention to? Any "fast cooking list and recipe" for it?

- A welldocumented interface
- Default settings that work, so that you do not have to call numerous
"set..." functions to make it work with the simplest task
- Code examples on how to make it work

Niels Dybdahl
 
D

Deeva Tatiana

+1

And remember: other programmers (which want to re-use Your classes or
libraries), can make mistakes (and You too, of course)!

So, try to make Your classes and libraries "foolproof" as much as possible.
 
W

Wibble

Deeva said:
+1

And remember: other programmers (which want to re-use Your classes or
libraries), can make mistakes (and You too, of course)!

So, try to make Your classes and libraries "foolproof" as much as possible.
Don't spend alot of time making something reusable
that wont really ever be reused. It make take
alot less time to refactor the small amount of
code to be resused than to make everything reusable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top