|
-
Code Reuse
Hi Again,
The mantra of code reuse and the claimed benefits have been around since the
days of "structured design", yet study after study reveals that actual code
reuse is quite low, 20% or so. Why do you think code reuse is so low?
To me, it's because code reuse just doesn't work on a large scale. It works
great on small, sharply-focused components, but the larger or more complex
the object is, the harder it is to integrate, debug and test in the overall
system, not to mention being more bug-prone. You end up adjusting the object
to make it fit the new system and then Poof! the benefits of code reuse are
gone.
Granted, 20% reuse can be a significant help on some types of projects, but
it's way short of the reuse nirvana that vendors and academics keep
promising.
Mark
-
Re: Code Reuse
I was just reading an article on Next Generation Windows Services (NGWS) last
night, and the author said that NGWS would finally accomplish the promise
of code reuse. I had to hold back a chuckle because I knew it wasn't true.
The reason why code reuse does not happen is because programmers do not have
a vested interest in producing code that is reusable. It is not that programmers
are not forward-thinking. Rather, they have a problem to solve now, usually
within a budget and a deadline, and planning out a component so that it can
be used in the next ten or twenty projects is just not high on the list of
priorities.
Code reuse does exist, but it exists at the component tools level. All of
the VBX's, OCX's, commercial DLL's, and other ActiveX controls that you buy
from vendors are implementations of code reuse. You buy them once, and you
use them in dozens of projects. The vendors of these components have an
economic interest in providing useful reusable components. When I work on
projects, I do not have that same interest.
In a way, COM really did help to advance code reuse because it provided a
standard way for developers of applications to easily integrate components
made to solve a common problem. I am sure that NGWS will advance code reuse
a little bit more, but we are talking about single-digit percentage points
here.
I once watched a promotional video that showed two programmers building an
application, one on a NeXT workstation, and one on a SUN workstation. The
video was produced by NeXT, and of course the NeXT programmer finished the
project in one-millionth the time of the SUN programmer. Although they never
used the expression "code reuse," they did talk about including pieces already
available on the system (components?) in your program, such as a FAX server
piece. Code reuse existed long before NGWS, long before COM, even long before
VBX's. But I bet the percentage of code developed for a project and reused
has not increased dramatically.
I often reuse pieces of other projects in new projects, but it is generally
at the source code level. I once wrote a great ActiveX control in VB5 that
had all of the features I wanted. But when the Windows Common Controls supplied
in VB6 included much of the same features, I modified my hosting program
to use the Windows control instead of my own. I ended up reusing Microsoft's
code instead of my own, but the application works just great, so the customer
is satisfied.
-----
Tim Patrick
tim@vbstyleguide.com
Similar Threads
-
Replies: 246
Last Post: 10-26-2002, 12:30 AM
-
Replies: 125
Last Post: 10-05-2002, 04:34 PM
-
Replies: 150
Last Post: 03-04-2002, 05:40 PM
-
By devi in forum VB Classic
Replies: 3
Last Post: 07-09-2001, 03:25 PM
-
By Steven Bell in forum .NET
Replies: 260
Last Post: 06-01-2001, 04:32 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks