Changing Shared Code is Inherently Hard Why do we want to reuse stuff? Because we want to be able to change fast. Now here comes the paradox — by reusing code that has been already written we are able to save some coding time but everything that is shared inherently becomes itself harder to change.
Then, if you need it a third time, it's time to create a library and reuse some code. In general, I find this to be excellent philosophical guidance. Code reuse is not a worthwhile goal. Avoiding duplication is a worthwhile goal.
Programmers have always reused sections of code, templates, functions, and procedures. Software reuse as a recognized area of study in software engineering, however, dates only from 1968 when Douglas McIlroy of Bell Laboratories proposed basing the software industry on reusable components.
Function calls are another way of reusing the code from various parts of your application. You create small code blocks of an algorithm or logic-based source code and provide it a name, identifier. That identifies your code and can describe the process too.
A couple of years ago the media was rife with all sorts of articles on how the idea of code reuse was a simple way to improve productivity and code quality.
From the blogs and sites I check on a regular basis it seems as though the idea of "code reuse" has gone out of fashion. Perhaps the 'code reuse' advocates have all joined the SOA crowd instead? :-)
Interestingly enough, when you search for 'code reuse' in Google the second result is titled:
"Internal Code Reuse Considered Dangerous"!
To me the idea of code reuse is just common sense, after all look at the success of the apache commons project!
What I want to know is:
Discuss?
I am fully aware that there are many open source libs available and that anyone who has used .NET or the Java has reused code in some form. That is common sense!
I was referring more to code reuse within an organizations rather than across a community via a shared lib etc.
I originally asked;
From where I sit I see very few example of companies trying to reuse code internally?
If you have a piece of code which could potentially be shared across a medium size organization how would you go about informing other members of the company that this lib/api/etc existed and could be of benefit?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With