[thelist] Enterprise Red Tape was: Web Based Employee Directory- prt 2
Luther, Ron
ron.luther at hp.com
Wed Sep 15 14:39:41 CDT 2004
Ken Chase quoted from Steve Lewis thusly:
<snip>
> In essence, it should bring the concept of code reuse out of the box
> and into the organization's culture.
<snip>
... and added:
>>Bingo! This is the message that we always receive from our tech shop
>>managerial types (***NOT THE CODERS***). The promise is that eventually,
>>through code re-use, development costs will be drastically reduced.
[Emphasis added by me because I think this is a management pipe-dream
that the coders quite rightly realize to be ridiculous.]
Hi Gang,
'Luddite' Ron here again. ;-)
Excluding for a moment what might be the world's best example of
'code re-use', the use of CSS files to template and use across your
entire site, and thinking instead more of 'general purpose' coding ...
Have you folks *really* seen this happen?
_Dramatic_ cost reductions directly attributable to code re-use?
Personally, I think this benefit has been drastically oversold to
management. I think I've run into three categories of situations where
this is a load of snake oil:
['modular' doesn't mean 'well-written']
We found a bug in a nice modular "C" program someone had written a few
years back. I volunteered to take a look at the logic to track this
bug down, so I asked for a copy of the code to print out. I was sent a
file containing roughly five lines. [Please excuse any syntax errors ...
I'm most definitely NOT a "C" person.]
The file (file "a") looked something like this:
{begin}
call module a1
call module b1
call module c1
{end}
The first module (file "a1") looked something like this:
{begin}
call module a11
call module a21
x=x+1
call module a31
{end}
It took days (and dozens of emails) for me to track down the 60 or so
files I needed in order to print out all 89 pages of code associated with
this "program"! It was quite a put-off to this 'modular' approach for me.
I could have literally saved a week of time if all of the code had been
in one file. If that's "modular" ... then I don't want it.
Maybe that was an anomalous example of poorly written "C" code. I don't
know. I try to avoid looking at "C" code whenever possible. But it's
generally what I think of when folks start talking about how wonderful
modular code is. Yuck!
[artificial structure]
I have some web-based reports where we have re-used some 'common' end-user
controls. That's a 'good thing' and the users like that.
However, it's meant that we also had to re-use loader scripts and re-use
data aggregation strategies (whether needed or not for whatever new thing
we were doing) because the control itself "required" them.
Not a huge point ... just a recognition that code itself isn't 'plug and
play' ... you have to meet all the pre-requisites for use.
It can take time and resources to get all that 'preliminary' junk set up
so that you _can_ 'save time' by re-using the control code. I think there
are situations where that 'preparation to save time' may take more time
than coding something new.
[testing costs]
Ever had an enhancement, a feature add, some scope creep that required
the modification of one of these "commonly used" code elements?
Here's what I've usually seen in those cases ... the code monkey makes
his/her change to facilitate the functionality in the new piece ... and
then proceeds to test that change thoroughly ---- but *only in the new
piece*.
You can see it coming, right? The change goes into production and 47
things that used to work fine now suddenly break because they relied
on the un-modified common component.
If you change something used in 100 places, you (a) have to *know* that
it's used in all those places, [that isn't something that is always easy
to find out] and (b) have to test that change in all of them.
There _is_ a cost to that testing.
RonL.
(I'm not saying it's 'a bad thing" ... maybe code re-use works better in a
very specialized industry, like oil, where you might have a very complex
equation that you could code once and call from multiple sources ... I just
think the benefits of code re-use have been severely oversold.)
More information about the thelist
mailing list