... all swell - in theory. Arguing against code re-use would be like arguing against motherhood and apple pie. Like most things in life, the devil's in the (implementation process) details. We'd all like to do it, BUT ...
I think that the biggest restrictions on code re-use are:
#1 FINDing appropriate solutions and
#2 documentation.
Regarding #1, would a central code directory service be neat?
Regarding #2, even when best intentions exist to document, when updates/revisions/refactoring occurs, documentation is seldom updated, concurrently ... rendering the original good documentation intentions out of date. Let's face it, coders are not natural documentors; they HATE documenting. They don't even comment their code when on their best behavior, like providing code examples for books they write! So, how might they take advantage of the automatic documenation (updating) schemes, which depend upon commented code? Looking at most code, you'd think we were back in memory-constricted assembly language days.
In the absence of great documentation, most think "I could re-write this faster than I could figure out how this code works."
Just like good testing involves coding to test code, good documentation starts with coding to designs (e.g. UML diagrams or whatever). How many abide by these 'best practices'?
Last 10 Comments
1
2