Which principles, code qualities, practices, aproaches, language or framework features help you to reuse effectively functions, classes etc in wider range of cases. All of the situations are interesting: either you can modify both implementation and interface of the code to enable/improve reuse, or only implementation, or nothing at all. The key indicators of effectiveness of reuse are (as for me):
- how much it reduces effort for implementing and maintanance
- quality of application does not degrades
- how much complexity is reduced
(all comparing to reimplementing from lower level).
PS. If possible please specify one factor per answer with description how it helps in your case.