The Reuse Fallacy, Or “This Will Work Because It Will Be Good If It Did” 26
Cat.: Then you win.18. August 2005
I’m indebted to Ryan for bringing Clay Shirky’s online catalog of articles to my attention. While reading Clay’s “Semantic Web, Syllogism, and Worldview” article (a totally smashing, almost to the point of being devastating piece of writing, by the way!), I almost jumped out of my chair when I ran into the “this will work because it will be good if it did” fallacy. Yes, the field of software is littered with these kinds of fallacies.
Take the myth of the code reuse, for example. It is clearly one such fallacy – “it would be nice if we didn’t have to expend any effort in creating software code, and so reusing existing code will work.” And because everybody nowadays seems to adhere to the code reuse fallacy, the state of the software industry is nothing short of dismal.
Now, me being the most rabid, foaming at the mouth less-code evangelist, you would expect me to automatically be a huge reuse champion. However, I’m not. How can that be?
The explanation is very simple: I’m not sure I understand what reuse is. You see, instead of glossing over the meaning of the word and simply riffing on it like most other software people seem to be doing, I have this nasty habit of looking deeply into the meaning of the word, before I hang up a shingle with that word proudly displayed on it (like, a hypothetical “Alex’s Reuse Shop”, for example).
So, I always tend to go for the easiest angle, and look into the real world, common-sense examples first. What is the meaning of reuse in my everyday affairs? OK, the first thing that comes to mind is my chair. I was using this chair yesterday, then I left it at the office and went home. Today, I came back into the office and started reusing this chair.
But wait. In common parlance, this is not how we speak. I’m not reusing this chair, I am merely using it. And I’m doing it over and over again. But notice how despite the repeatability and the predictability, it still doesn’t qualify as being reused.
Am I today reusing my kidneys and my lungs, or merely using them? I know this may sound overly pedantic at a first glance, but it is very important to make this distinction.
Similarly, if I drop a calendar control into my app, am I reusing that piece of code, or using it?
I was using Microsoft Word application to produce a document yesterday. I liked the experience, so today I’m again at it, typing up this document. Am I at this point reusing Microsoft Word?
My intuition is telling me that in all those cases, I am merely using objects and concepts that become available in my daily existence. I’ve never been, so far, in the situation where I was reusing anything.
So the question is: why should my activity of software development all of a sudden be completely centered on some phantom, piss-poorly articulated concept of wishy-washy reuse? Why should I force myself to think that the code I’m writing right now must be able to be reused later on? Is there a real justification for such a taxing burden that’s been thrown upon our meager shoulders?
Why not, instead, simply focus on the task at hand? Try and solve this concrete task that is before me the best I can, without worrying about whether my design will be a good candidate for some whimsical concept of reuse.
As I’ve explained in my previous article, when I’m developing my PowerPoint presentation, I never think of reuse. Never do I stop and think “hey, but what if later on I, or someone I don’t even know, whish to reuse this slide, or this portion of the slide, or this group or cluster of slides?” I could never get bothered by such concerns, and so my mind is free to fully concentrate on delivering the highest possible quality of presentation.
Same is with any other activity. If I engage in explaining to the customer how will our approach benefit them better than IBM’s WebSphere portal approach, I never stop and think whether all or some parts of my present activity will be reusable in the future. I just concentrate on doing the best possible job, and then move on.
Software development should be the same. Shed off any extra taxing burden of worrying about the future that never comes, stop asking yourself “what would ‘…’ (enter the name of your software guru de jour here) do”, and simply do the thing that you’re good at doing.
I guarantee you that you will produce much higher quality code that way.