Dennis Forbes wearing his thinking cap
> "such a shame he doesn't post here anymore"
But anyway. About 10 years ago I wrote a similar article titled "Why code re-use doesn't work". Those were the days of COM, Corba and 'Component Based Development' and having 'reusable' components was a unique selling point. Being a little younger at the time I, at first, gullibly adopted the phrase and applied it to every piece of code I wrote until I realized that our reusable library realy did only one thing: it grew. The only parts that were actually being reused were the very small basic utility functions/components that were bound to be implemented in the next generation of software development tools.
So I wrote the article and published within the company. Boy did that hurt my reputation as young talented super developer ;)
Since then I grew up (a little). My current mantra is:
Do NOT reuse code, reuse (or lend, or steal) ideas.
Locutus of Borg
July 25th, 2007 7:38am
>such a shame he doesn't post here anymore.
You bein' funny boy? Because I ain't laughin.
July 25th, 2007 9:22am
"It always amazes me how someone as deeply insane as dennis could be such a clear thinker."
Always felt the same way about you, wsv. :)
July 25th, 2007 9:24am
Yeah, I THOUGHT "DF" was still Dennis Forbes.
"The question every organization needs to ask itself, then, is what value they could sell their "reusable code" for - what, realistically, would competitors and new entrants in the field offer for it?
The answer, in almost every case, is $0, and they wouldn't want it even at that price.
There is extraordinarily little code theft in this industry (even though we're in the era of burnable DVDs and USB keys) because most code - above and beyond the industry-wide frameworks and libraries - has no value at all outside of a specific project with a specific group of developers. Trying to use it for other projects is often worse than starting with nothing at all."
Absolutely brilliant insights. I've been working on a NASA project, built in the 1990's, that uses Tools.h++ Rogue Wave libraries, wrapped with another 'internal framework' library, wrapped with 'custom code' that runs the application.
A typical dependency tree has a single .cpp file depending on more than a hundred .H files, each one representing a re-useable piece of code or data structure or both.
This thing "grew" organically, with the assumption that all this code re-use was saving effort. In fact, all this code re-use makes it extremely difficult to maintain the application, makes it very brittle when changes are made, and creates a HUGE learning curve before you're able to make an effective change. And the application is now IMPOSSIBLE to apply flexibly to other applications.
For other applications, the whole mess is worth $0, and would be a detriment to TRY to apply.
July 25th, 2007 9:31am
"Yeah, I THOUGHT "DF" was still Dennis Forbes."
Cheezit! What a clever disguise! I never suspected...
July 25th, 2007 9:53am
> The greater the bulk of code you accumulate, the more intrinsically you tie yourself to your current developers
True. You should tie yourself to developers you don't have.
> Such frameworks and libraries often come with enormous learning curves for new hires
As apposed to the frameworks that have no learning curve. Lots of those.
> The question every organization needs to ask itself, then, is what value they could sell their "reusable code"
Code has no value. Delivered applications have value. What gets you to your next revenue producing application faster rather than the typical programmers wet dream of a code green field.
> There is extraordinarily little code theft in this industry
For the same reason there's little theft of oxygen. Code is a small part of delivered value. It's like separately valuing the paint in a painting.
> Trying to use it for other projects is often worse than starting with nothing at all.
That's why Cisco starts fresh for every release of a new router. Not.
> Perhaps I'll augment these thoughts
Hopefully with something sensible...but I see not
> maybe you should look at the Microsoft Data Application Blocks
Sure, someone elses crappy legacy code is OK, but yours has not value. I guess the grass is always greener.
> The goal should always be to minimize the amount of
> code in internal libraries to that which truly gives
> a strategic or tactical advantage, leveraging
> the talents (and agility) of the industry to
> the greatest extent possible.
You must write for Al Gore. What a pile. Nobody ever looks at code and says this gives me a tactical advantage. They make code make a feature work. If they are any good they try to do it cleanly. But trying to embody our code base with all the wonderfulness that exists nowhere else in the world is not a cargo cult, it's called utopia. That's human nature as well.
son of parnas
July 25th, 2007 10:50am
All true, SoP, except "Code Reuse" is one of the main justifications for OOP approaches. And my company WAS willing to 'bid low' on a contract, assuming that the code-base developed for that contract would lower costs on a follow on contract. Didn't happen.
"Code Reuse" HAS been seen as a very nice Silver-Bullet for high code costs. Dennis pointing out that the reality has been FAR from the theory is a worthwhile statement to make.
July 25th, 2007 10:56am
> And my company WAS willing to 'bid low' on a
> contract, assuming that the code-base developed
> for that contract would lower costs on a follow
> on contract.
People are always willing to do all sorts of nonsensical things. This approach reveals a fundamental misunderstanding of how software works. Which isn't surprising.
son of parnas
July 25th, 2007 11:03am
I see you're on par with your normal lack of reading comprehension, SoP.
>True. You should tie yourself to developers you don't have.
Many managers desperately want to build an ever growing internal "framework" under the flawed premise that it decouples them from their current developers -- all of that enterprise and domain knowledge will be crystallized into the as-we-go built "framework", and then Joe Programmer can be turfed at will. The reality is quite the opposite, and with every line of "framework" you increase the difficulty of staff changes.
Which is exactly what I said, yet amazingly you completely misunderstood it.
>Code has no value. Delivered applications have value. What gets you to your next revenue producing application faster rather than the typical programmers wet dream of a code green field.
That doesn't make any sense. "Money has no value. A loaf of bread has value. What gets me to my next loaf of bread?". Try to achieve at least some consistency in your verbal spews.
>For the same reason there's little theft of oxygen. Code is a small part of delivered value. It's like separately valuing the paint in a painting.
Again, your ability to completely miss the point just boggles my mind.
>Nobody ever looks at code and says this gives me a tactical advantage.
Uh...okay. Are you actually a developer? I suspect not.
Seriously, SoP, I love that you dislike me, and I assure you that I return the favor. At least try to have some value in the prattle you post to try to attack me, however, because all you've demonstrated above is that you're either *very* dumb, or so blinded by your desperate attempts to diminish that you don't bother will silly reality.
July 25th, 2007 11:16am
> Seriously, SoP, I love that you dislike me
I am happy you at least have some love in your life.
son of parnas
July 25th, 2007 11:35am
>I am happy you at least have some love in your life.
Awwwwww. I hope that warms the cockles of your heart to say stuff like that.
July 25th, 2007 11:59am
good article, though i think the main point of code reuse was missed:
reused code tends to be less buggy.
there have been times when i've considered refactoring a pile of crap code and changed my mind because it was simply easier to copy and paste it rather than go through another QA process.
July 25th, 2007 12:01pm
"The only parts that were actually being reused were the very small basic utility functions/components that were bound to be implemented in the next generation of software development tools."
Not me. I've got reuse of those utilities, yes, but also entire custom frameworks for various specialized things, and lots of custom math libraries, etc. Tons of reuse here, but it needs to be well factored to work this way.
July 25th, 2007 12:01pm
If you're not writing assembler you're reusing code.
July 25th, 2007 12:14pm
son of parnas
July 25th, 2007 12:21pm
The article is two years old.
Any followup, Dennis?
July 25th, 2007 1:21pm