    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: minimalism</title>
        <link>https://members.accu.org/index.php/articles/420</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Design of applications and programs + Overload Journal #47 - Feb 2002</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c67/">Design</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c198/">47</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c67-198/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c67+198/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;minimalism</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 26 February 2002 16:46:08 +00:00 or Tue, 26 February 2002 16:46:08 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
<h3>the imperial clothing crisis</h3>
</div>
<p>Marx and Engels [<a href="#Marx-1848">Marx-1848</a>] were ahead
of the object crowd:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>The history of all hitherto existing society is the history of
class struggles.</p>
</blockquote>
</div>
<p>A spectre is haunting software development - the spectre of
design. There is a growing recognition that design is the essence
of software development and, consequently, the missing link, or
ingredient, in much software. Much of what has passed for design or
design movement has just been theory without practice, rhetoric or
fashion - design is the pictures that you draw, reuse is a
principal foundation of object orientation, component-based
development leads to flexible architectures. None of these views is
particularly useful, and they can sometimes be considered
harmful.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e32" id="d0e32"></a>design
considered useful</h2>
</div>
<p>In software, design has often been seen as filler between a
misunderstood concept of analysis and a view of implementation
reminiscent of industrial manufacturing. Design has been seen as a
phased activity divorced from code, associated with the power of
pure thought and the production of never-to-be-quite-built
blueprints. An air it retains today even in many iterative and
incremental lifecycles - the old divisions are often still there,
just more thinly sliced.</p>
<p>In the past, design has also suffered from an image problem: it
has often been branded <span class=
"emphasis"><em>formal</em></span> - sometimes, too <span class=
"emphasis"><em>formal</em></span> - equating it to a set of rules,
conventions and etiquette, and therefore, by association, stuffy,
impenetrable and elitist. To counterbalance - and hopefully
displace - these rigid views, design can be considered an endeavour
that is continuous and embraces both the code and the
conceptualisation of the system. We can use models - drawings or
prototypes - to demonstrate things that cannot be shown directly or
conveniently in code. But design is a federal concept, and such
models may be a part but they are not - except in hegemonies like
RUP (the Rational Unified Process) - the whole. It is pragmatism
that has acknowledged a more inclusive definition of design,
placing it at the centre, recognising that design is indeed formal,
but in the same sense that code is formal and in the sense of the
word that means &quot;concerned with form&quot;.</p>
<p>What properties should we expect of a good design? The
influential ten-volume <span class="emphasis"><em>de
Architectura</em></span>, by first century BC Roman architect
Marcus Vitruvius Pollio, suggested that all construction should
possess &quot;strength, utility and beauty&quot; (sometimes translated as
&quot;firmness, commodity and delight&quot;). We can relate these directly to
code: robustness is clearly something that we value; use is the
measure of what is built; and, yes, aesthetics matter, although a
full exploration of beauty is outside the scope of this
article.</p>
<p>I don't want to go on record as saying that a two-thousand year
old book on the built environment has the last word on what
software design is all about, but you have to admit that it's not a
bad start. Are there other things that we should be looking for
that could not be re-shelved under one of those headings? Quite
possibly, but it would be fair to say that the quest for goodness
in design has attracted a number of camp followers - wannabes that
aspire to inclusion on that A-list of desirable properties. Not all
are bad, but some have made more progress than they should -
cyberspace is right next door to hypespace - and it's time we
cleaned up a little. In particular, I would like to think that the
grim reaper is slowly stalking the mantras of <span class=
"emphasis"><em>reuse</em></span> and <span class=
"emphasis"><em>flexibility</em></span>.</p>
<p>Reuse has proven to be a false idol to worship. It is at best an
illdefined term, and at worst an incorrect one. Moving to objects
or components because of reuse is like buying a car because the
advert says it's the best: for some people it is wishful thinking,
for others it is grasping at straws, and for a few it is simply
gullibility. What exactly is <span class=
"emphasis"><em>reuse</em></span>? If we define it with respect to
our experience, it would seem that reuse is often a time waster, an
obfuscator, and more of a problem than a solution. I made this
claim recently on a course and got a round of applause. What was
telling is that most of the applause came from the managers in the
group; the precise target audience for much of the reuse hype that
kicked off in the late 1980s and is still rolling today.</p>
<p>The word <span class="emphasis"><em>flexible</em></span> is like
reuse: it should alert you that something nebulous is probably up.
Classes and functions are not designed to be flexible, they are
designed for a purpose: flexibility is not a purpose, nor is it
either a quality or a quantity; it is a bucket term, a catch all,
snake oil.</p>
<p>All of this is not to say that we cannot reuse software or that
software cannot be flexible. Far from it, it is just that in common
parlance they are either vague hand-waving terms (&quot;Our architecture
is flexible&quot; - what does that mean? Can it bend over backwards so
that it touches its own heels?), or incorrect (&quot;We reused the
third-party library&quot; - err, doesn't that just mean you used it...
for the purpose for which it was intended?). Without qualification
these words mean nothing - but have tremendous power to mislead -
and with qualification they do not turn out to be the gleaming
foundations of a discipline for software development. Like the
emperor's new clothes, there is not much there. When it comes to
answering the question &quot;What is important in design?&quot; we should
perhaps avert our eyes and look elsewhere.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e70" id="d0e70"></a>simplicity
before generality</h2>
</div>
<p>A point I am often at pains to make is that minimalism in
software is not about throwing everything out leaving you with
nothing. That is nihilism. The emperor needs some clothes, just not
too many, and obviously not none. And, of course, it is best if the
clothes fit - a few clothes that fit is better than an apparent
wealth of clothing that does not.</p>
<p>However, my real motivation in bringing the emperor story into
all of this is not specifically the emperor's attire - or lack
thereof - as related to a pragmatic interpretation of minimalism,
but to point the finger and declare &quot;This has no clothes, there's
nothing there!&quot;. To be precise - as you may have already
established - two fingers. The two virtual properties of
reusability and flexibility are twinned with <span class=
"emphasis"><em>generality</em></span>, and from generality flows a
river of good intentions so deep you could - and many do - drown in
it. It might at first glance be assumed that reuse would form the
cornerstone of a minimalist philosophy of software development, but
the opposite transpires.</p>
<p>I confess that the promise of reuse was never one that attracted
me, and was a topic that I never felt entirely at home with, at
least not in the sense that it was most talked about. My
traditional stance was that reuse was a social issue not a
technological one, a matter of culture rather than of mechanism -
mechanism could assist but it could never cause. This view was
still reachable from the published party line, although in truth
most others in the party did not follow the line either.</p>
<p>In recent years I have called into question many of the
buzzwords that pass for communication (but pass all understanding).
The realisation has crept up on me that even the mainstream
nonmainstream view, so to speak, is inaccurate and insufficient.
These days, I adopt a more republican stance: when it comes to
clothing, so to speak, we should not even be talking about the
emperor. It doesn't help. Reuse is not the main challenge facing
software engineering; typing is not the main bottleneck in software
development (which means that most third-party code generation
tools are actively solving the wrong problem); bureaucracy is not
the missing link in the development process. Sometimes the shine is
taken off our ability, as a profession, to solve problems by a
frequent and uncanny knack of identifying the wrong problem to
solve. Let's try to simplify before we generalise.</p>
<p>The following is from an email I sent Bruce Eckel following a
request on his list for design principles to include in his book,
<i class="citetitle">Thinking in Patterns</i> [<a href=
"#Eckel">Eckel</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Simplicity before generality: A common problem we find in
frameworks is that they are designed to be general purpose without
reference to actual systems. This leads to a dizzying array of
options that are often unused, misused or just not useful. However,
most developers work on specific systems, and the quest for
generality does not always serve them well. The best route to
generality is through understanding well-defined specific examples.
So, this principle acts as the tiebreaker between otherwise equally
viable design alternatives. Of course, it is entirely possible that
the simpler solution is the more general one.</p>
</blockquote>
</div>
<p>The slightly flippant tone of the last sentence may hide my
degree of conviction: it is not just that it is &quot;entirely
possible&quot;, it is actually &quot;quite likely&quot;.</p>
<p>Many things that are designed to be general purpose often end up
satisfying no purpose. Software components should, first and
foremost, be designed for use, and to fulfil that use well.
Designing for all seasons is both difficult and not always
desirable, a realisation that helps explain the small markets for
thermal bikinis and Ford Edsels, as well as the challenge of
designing general-purpose software components.</p>
<p>Reflecting both on my work in library and framework development
and on my role as a user of such commodities, I have seen the
strong temptation and wasteful consequences of general featurism. I
have also seen a more restrained approach bear fruit. It may be a
clich&eacute;, but less really can be more.</p>
<p>Generality is not, of itself, necessarily bad, but we can often
identify the odour of <span class="emphasis"><em>speculative
generality</em></span> [<a href="#Fowler1999">Fowler1999</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Brian Foote suggested this name for a smell to which we are very
sensitive. You get it when people say, &quot;Oh, I think we need the
ability to this kind of thing someday&quot; and thus want all sorts of
hooks and special cases to handle things that aren't required. The
result is often harder to understand and maintain. If all this
machinery were being used, it would be worth it. But if it isn't,
it isn't. The machinery just gets in the way, so get rid of it.</p>
</blockquote>
</div>
<p>Generality should equate to simplicity and simplification.
Generalisation can be used as a cognitive tool, allowing us to
reduce a problem to something more essential, a clearer abstraction
that offers greater compression [<a href=
"#Henney2001">Henney2001</a>]. However, too often generalisation
becomes a work item in itself, and pulls in the opposite direction,
adding to the complexity rather than reducing it. The initial
sweetness of a general solution can become overwhelming as it
grows, to the point that we feel like we are drowning in syrup.</p>
<p>Design is compromise, and all flexibility is a double-edged
sword. Many people mistakenly see design decisions made in the name
of flexibility as win-only situations, a narrowness that belies
reality. If we equate flexibility with degrees of freedom, then the
degrees of freedom in a design should be reasonable - which I mean
that in the deepest sense of the word: based on reason. In pursuit
of arbitrary flexibility you can often lose valuable properties,
accidental or intended, of alternative designs [<a href=
"#Petroski1999">Petroski1999</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>In the mid-twentieth century it became the fashion in library
architecture to design buildings as open-floored structures in
which furniture, including bookcases, could be moved at will. The
Green/Snead Library of Congress bookstack that six decades earlier
had been declared &quot;perfect&quot; was now viewed as disadvantageously
locking a stack arrangement into the configuration of its
construction. In the new approach, reinforced concrete floors carry
the loads of bookshelves, so that they can be arranged without
regard for window placements. This apparently has the appeal of
flexibility in the light of indecision, for planners need not look
at the functional and aesthetic requirements of their space and its
fittings with any degree of finality; they can always change the
use of the space as whim and fashion and consultants dictate. It is
unfortunate that such has become the case, for it reflects not only
a lack of sensitivity to the historical roots of libraries and
their use but also rejects the eminently sensible approach to using
natural light as a means of energy conservation if nothing else.
There is little more pleasing experience in a library than to stand
before a bookshelf illuminated not by fluorescent lights but by the
diffused light of the sun.</p>
</blockquote>
</div>
<p>And speaking of libraries, it is worth noting that one the
strange things about a so-called reuse library is that it's one of
the few libraries people only seem to deposit things in but never
take things out. A more honest term is <span class=
"emphasis"><em>reuse repository</em></span>.</p>
<p>A more pragmatic and minimal design style does not mean writing
code that hugs its assumptions so closely that only major surgery
will separate the two in the event of change. It is not about
hardcoding everything: it is about both sufficiency and finding the
right amount of space between the elements of your solution,
offering the right amount of slippage or wriggle room. The
challenge of design is in seeking and maintaining local minima of
sufficient simplicity with sufficient generality that the integrity
of the design is not easily disturbed, and the energy required to
adapt to change is proportionate to the degree of change.</p>
<p>Generic programming often provides good examples of sufficient
generality. Note that <span class=
"emphasis"><em>generic</em></span> is not the same as <span class=
"emphasis"><em>reusable</em></span>: something may be generic to
express the simplest and most stable model. But at the same time,
genericity can be a hard tap to turn off, whether expressed through
template parameters, function arguments or an interpreted
interface. It is tempting to create some kind of final solution - a
killer class template that is parameterisable beyond belief, or
indeed comprehension. In practice such parameterisation severely
reduces the utility of code. One size does not fit all: I don't
shop at a single place to buy all of my goods - food, cars, etc -
and although this is possible, one is left with a sense of
diminished quality through lack of appropriate specialisation. I
get better fruit from the local grocer. Likewise, restaurants: if
they try to cater for all types of food, they do so blandly and
uniformly, squeezing out the variety and standardising the
experience.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e140" id="d0e140"></a>ex
libris</h2>
</div>
<p>The benefits of libraries are different to those of reuse
repositories. The idea that an arbitrary piece of code is a
candidate for reuse differs from the idea of taking a piece of code
and generalising it - promoting it through practice and empiricism-
into a library, or conceiving of a code library that scratches a
particular design itch, expresses a particular design idea,
refactors a common code chunk.</p>
<p>You cannot reasonably refer to <span class=
"emphasis"><em>reuse</em></span> in the context of a library - &quot;We
are reusing the AWT.&quot; &quot;Oh, and what did you do with it the first
time around?&quot; - because there are only three things you can do with
a library: use it; misuse it; not use it. Some might attempt to
<span class="emphasis"><em>leverage</em></span> a library, but it
transpires that this is just a neologistic circumlocution for use.
(Aside: In addition to a popular suggestion that its use as a verb
should be banned, there could be an additional fine on native
English speakers pronouncing it &quot;l<span class=
"emphasis"><em>evv</em></span>erage&quot; if their common cultural
pronunciation is &quot;l<span class=
"emphasis"><em>eev</em></span>erage&quot;. You could probably raise a
lot of good money for charity with an office swear box filled on
such jargon.)</p>
<p>Libraries offer value based on use, not reuse. And library
architecture, whether in a loose confederation of parts or the more
tightly knit community of a framework, is based ultimately on
modular concepts. But what kind or scale of module forms the basis
of design? Often use at the level of the small is dismissed as
insignificant. And yet this is the level at which most libraries
and infrastructure projects have been most successful. The view
that we are striving ever upwards, always building neatly on the
layer below, moving towards a greater object society or component
order seems to have ensnared a mindshare. It has created a mantra
all of its own: once I worried about structured control flow; then
I worried about my classes; and then I worried about components;
but now life is easy, all I need to worry about is how to interface
and tune these off-the-shelf distributed systems - I no longer need
to worry about any details. It's not true in software and it's not
true elsewhere [<a href=
"#Salingaros-2001">Salingaros-2001</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>A free design process that allows for numerous subdivisions
permits mathematical substructure on many different scales. By
abandoning an empty modularity, one has access to solutions based
on a far richer approach to design that creates visually successful
buildings. Art Nouveau architects like Antoni Gaud&iacute; used
small modular elements (such as standard bricks) to create curved
large-scale structures. This freedom of form contrasts with those
instances where a building reproduces the shape of an empty
rectangular module. The small scale can link to the large scale
mathematically, because scaling similarity in design is a
connective mechanism of our perception. Therefore, the materials
can and do influence the conception of the large-scale form, and
the larger a module, the stronger the influence. When one chooses
to use large, empty rectangular panels, these will necessarily
influence the overall building; often implying a monotonous, empty
rectangular fa&ccedil;ade.</p>
</blockquote>
</div>
<p>Uncannily, this sounds like many contemporary large-scale
component-based architectures. It is not modules but inappropriate
modularisation that causes problems: it can be as bad as the
absence of modularity. On the one hand you have a monolithic slab
of code and on the other lots of prefabricated slabs that somehow
just don't seem to quite fit or make sense together [<a href=
"#Salingaros-2001">Salingaros-2001</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>There are arguments to be made in favor of modularity, but not
for the way it is used in many buildings. If we have a large
quantity of structural information, then modular design can
organize this information to prevent randomness and sensory
overload. In that case, the module is not an empty module, but a
rich, complex module containing a considerable amount of
substructure. Such a module organizes its internal information; it
does not eliminate it. Empty modules, on the other hand, eliminate
internal information, and their repetition eliminates information
from the entire region that they cover. Modularity works in a
positive sense only when there is substructure to organize.</p>
</blockquote>
</div>
<p>Undifferentiated modularity seems to be a genuine problem. We
should work with more than one unit of modularity, and many
programmers do so successfully: method, class, package, component,
etc. Software design, and therefore architecture, is recursive. The
reason many people move to object and component technologies is
precisely because of the many and varied levels of granularity on
offer - a better fit to their grasp of the problem and expression
of a solution, a finer level of control over the detail and its
relevance, better choice of abstraction, better resulting
compression. Rather than the brusque and FORTRAN-esque levelling of
program then function, we have a view that can zoom out or in to
the system to the level that we find appropriate to understand a
particular behaviour or solve a particular problem.</p>
<p>And, to be effective, a good grasp of modular diversity must be
coupled with an appropriate sensibility, an understanding of its
intent and reach [<a href="#Gabriel-2000">Gabriel-2000</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>The real problem with modular parts is that we took a good idea
- modularity - and mixed it up with reuse. Modularity is about
separation: When we worry about a small set of related things, we
locate them in the same place. This is how thousands of programmers
can work on the same source code and make progress. We get in
trouble when we try to use that small set of related things in lots
of places without preparing or repairing them.</p>
</blockquote>
</div>
<p>The module, at whatever scale, is one of our best tools. But
identifying good modules is hard; software development is a matter
of design. It may seem almost counterintuitive, but a design born
of a minimal and pragmatic approach will often have more modular
parts than one that does not. However, the parts will not all serve
the same purpose - and nor will they serve any arbitrary purpose -
and they will not all be the same size.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e187" id=
"d0e187"></a>commodity</h2>
</div>
<p>So if it is not reuse and flexibility, what role then do
libraries and related infrastructure play? Commodity - which can be
found, by happy coincidence, in the alternative translation of
Vitruvius' three essential architectural properties. A commodity is
quite a different thing to something that is reusable. A commodity
is something of value and of - and for - use. A commodity defines a
stable platform, something that can be assumed or taken for
granted. A commodity is a product that has been built (or mined and
refined) intentionally, rather than an accidental but serendipitous
artefact. In real world terms we would never confuse the quite
different ideas of commodity and reuse. Whilst there is certainly
overlap, they are not even mistakably synonymous.</p>
<p>We can see that developing a commodity is quite a different
undertaking to developing reusable code. A lot of per-project code
that is designed to be reusable simply isn't, and is often
borderline useable. The open pursuit of reuse is unfocused and adds
an inappropriate overhead to some projects, often to the point of
compromising quality or schedule. The return on investment - time,
effort, complexity, money - is often not recouped. Far better to
create code that is fit for purpose and fits with its purpose. If
you follow some of the common practices for decoupling - easier
testing, less impact of change - it is more likely that the code
will see more general use, perhaps even as a commodity. Some
projects recognise that it will cost them extra to get some kind of
reuse, but if they replaced the word <span class=
"emphasis"><em>reusable</em></span> with <span class=
"emphasis"><em>commodity</em></span> they might reconsider how much
extra was really needed to be effective.</p>
<p>In a single project you don't have reuse if a piece of code is
used in more than one place, that's just what should be going on.
This is just good local design: usage with minimum duplication. A
definition of reuse based on the simplistic and unqualified
definition of &quot;use more than once&quot; would be trite and quite useless
- what value would be gained by replacing &quot;function <span class=
"emphasis"><em>A</em></span> calls function <span class=
"emphasis"><em>B</em></span>&quot; with &quot;function <span class=
"emphasis"><em>A</em></span> reuses function <span class=
"emphasis"><em>B</em></span>&quot;?</p>
<p>If you view a system in terms of layering there is an
interesting relationship between the use of refactoring and the
balance of logic in the system [<a href=
"#Collins-Cope-2000">Collins-Cope-2000</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Refactoring visibly lowers the centre of gravity of the
application by finding the commonality and factoring out the
difference.</p>
</blockquote>
</div>
<p>This is like annealing. Refactoring provides enough energy to a
system for it to relax into a new and more comfortable state, a new
local minimum. The effect of refactoring commonality is to tame the
complexity of your system. Repeated tempering, with a conscious
effort to reshape, is more likely to move code towards commodity
than a vague 'plan' or 'strategy' based on reuse.</p>
<p>And, as already noted, if you use a library or framework then
this again is not reuse, this is the idea of commodity and
platform. Features migrate into platforms over the years, e.g.
threading, networking, GUIs, etc. Using an application server is
not reuse, it is use of a commodity as was intended by its
design.</p>
<p>Most concepts of reuse are invalid or unachievable in practice.
Therefore, by definition, most <span class="emphasis"><em>reuse
strategies</em></span> are destined to fail. Consider the inherent
contradictions or muddled goals that sometimes pop up on company
technology adoption plans: &quot;We will start with a pilot project to
demonstrate code reuse on a threeprogrammer four-month
development&quot;. Often what started out as the path of least
resistance can become the path of least convenience.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e231" id="d0e231"></a>accidentally
on repurpose</h2>
</div>
<p>It appears, in part, that the problem is one of vocabulary: we
are misusing words. For some reason, <span class=
"emphasis"><em>reuse</em></span> is seen as a more glamorous and
elevated term than <span class="emphasis"><em>use</em></span>. We
can reduce most uses of reuse to something more precise: use of a
commodity, such as a library, or the result of refactoring to avoid
duplication of logic within a system. We're in programming not
marketing: precision matters. At least <span class=
"emphasis"><em>refactoring</em></span> now has a certain cachet.
(Perhaps there's something going on with the prefix <span class=
"emphasis"><em>re</em></span>-? <span class=
"emphasis"><em>Rework</em></span>? <span class=
"emphasis"><em>Recode</em></span>? <span class=
"emphasis"><em>Retest</em></span>? Hmm, then again, perhaps
not.)</p>
<p>So how did we end up with the reuse groupthink? And why has it
so often been allied with inheritance in object-oriented
approaches? Both hindsight and foresight suggest that it is a
damaging mindset that upsets both schedules and design. We know
that hype merchants are responsible in part, but the cause can also
be traced to the more honest confidence and ebullience of expert
individuals [<a href="#">Meyer1997</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Here are the most important external quality factors, whose
pursuit is the central task of object-oriented software
construction....</p>
<p><span class="bold"><b>Reusability</b></span></p>
<p>Reusability is the ability of software elements to serve for the
construction of many different applications.</p>
</blockquote>
</div>
<p>A few choice words come to mind when I read this, even without
the exploration I have just undertaken of what reuse is not.
However, a quick count to ten and I can respond with something a
little more moderate: there is no such thing as reusable software,
only software that has been reused. This response is adapted from
the porting maxim that &quot;there is no such thing as portable code,
only code that has been ported&quot;. However, unlike reusability,
portability is actually a quality that has some meaningful
quantification, both empirically and theoretically, and can be
reasoned about without resort to theological debate.</p>
<p>Whilst the definition given of <span class=
"emphasis"><em>reusability</em></span> is not necessarily a bad
one, the problem is that it is listed as being a core goal and
activity of object development. The problem is then compounded by
sewing up this tidy view of the world with the following mythtake
[<a href="#">Meyer1997</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Progress in either reusability or extendibility demands that we
take advantage of the strong conceptual relations that hold between
classes: a class may be an extension, specialization or combination
of others. We need support from the method and the language to
record and use these relations. Inheritance provides this
support.</p>
</blockquote>
</div>
<p>The perspective given, which some might consider as charmingly
na&iuml;ve and others would view as downright misleading, is
countered by a wealth of theory and practice that suggests that
such an approach to development, and especially such a view of
inheritance, is unsound. Commentary reflects this [<a href=
"#Murray1993">Murray1993</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>A myth in the object-oriented design community goes something
like this:</p>
<p>If you use object-oriented technology, you can take any class
someone else wrote, and, by using it as a base class, refine it to
do a similar task.</p>
</blockquote>
</div>
<p>Even in the design of commodity items such as class libraries -
commonly and mistakenly equated with reuse - inheritance is not
necessarily viewed in glowing terms, as witnessed by Martin Carroll
and John Isner, designers of USL C++ Standard Components [<a href=
"#Gabriel1996">Gabriel1996</a>]:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>We take the minimalist approach to inheritance. We use it only
when it makes our components more efficient, or when it solves
certain problems with the type system.</p>
<p>We do not intend for our components to serve as a collection of
base classes that users extend via derivation. It is exceedingly
difficult to make a class extensible in abstracto (it is tenfold
harder when one is trying to provide classes that are as efficient
as possible). Contrary to a common misconception, it is rarely
possible for a programmer to take an arbitrary class and derive a
new, useful, and correct subtype from it, unless that subtype is of
a very specific kind anticipated by the designer of the base class.
Classes can only be made extensible in certain directions, where
each of these directions is consciously chosen (and programmed in)
by the designer of the class. Class libraries that claim to be
&quot;fully extensible&quot; are making an extravagant claim which frequently
does not hold up in practice.... There is absolutely no reason to
sacrifice efficiency for an elusive kind of &quot;extensibility.&quot;</p>
</blockquote>
</div>
<p>Yes, reuse does happen, but it is not in the tidy centralised or
library-governed vision that you may have been sold, framed
originally by many High-Modernist Object Gurus. It is normally a
more ad hoc, grassroots, opportunistic and - yes - cut-and-paste
affair [<a href="#Raymond2000">Raymond2000</a>]. It has a
haphazardness to it that belies the feed-forward, deterministic
nature of many software development lifecycles that claim to
address reuse. It is not sufficiently deterministic or controllable
to form the basis for project planning or an economic model of
software development. <span class="emphasis"><em>Reuse
strategy</em></span> is practically an oxymoron. How can you have a
reasonable strategy based on good luck? We normally insure against
accident, not for it.</p>
<p>Reuse in the outside world is also a less organised affair
[<a href="#Brand1994">Brand1994</a>], sometimes built almost purely
on compromise. It is normally concerned with recycling and
repositioning; not necessarily the glamorous vision of rapid
development, but a matter of development by necessity and disparate
parts, subdivision and differentiation. The charm of something that
is reused often arises from its accidental properties rather than
from a reduced Cartesian order.</p>
<p>But I do not wish to misrepresent the object community. For most
of us the reason to adopt an OO or related style has been about the
qualities that it gives development, not the quantities. You can
say what may actually amount to the same thing in two radically
different ways: &quot;I use <span class="emphasis"><em>X</em></span>
because it is more expressive, allowing me to articulate a more
eloquent design&quot; versus &quot;I use <span class=
"emphasis"><em>X</em></span> because it makes me more productive&quot;.
The former is about the individual, the human, and the latter is
about an automaton; more cog than cogitation. I tend to find
surveys and articles that talk about productivity do so from a
pseudoscientific point of view. Such dehumanisation is also found
in the rebranding of programmers as plug-and-play <span class=
"emphasis"><em>resources</em></span>. Being a resource is not the
same as being resourceful: oil, coal and tin are natural resources;
a third-party code library is a software resource; even our skills
and experience can be considered knowledge resources. However, we,
as individuals, are not resources: it is our use of resources that
makes us resourceful. The <span class="emphasis"><em>productivity
of a resource</em></span> does not sit on one side of an equation
with reuse on the other. It would be a tidy but deceptive
fiction.</p>
<p>But I digress. Where any form of reuse can be of assistance is
in the reduction of a problem to something similar, something
familiar. Where reuse is most prevalent is in our knowledge, the
use of experience to resolve similar and out-of-context problems.
In each case, the reuse is a matter of adaptation, repurposing,
learning. It is distinctly unmodular, and rarely preplannable at a
detailed level. But the absence of a fixed and fine plan does not
denote chaos, any more than the omission of a detailed leaf plan
filed in your local town hall suggests that trees do not represent
some form of order.</p>
<p>So remember, design is central to software development and most
of the worthwhile reuse and flexibility in software development
comes from your side of the keyboard.</p>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e334" id="d0e334"></a>references</h2>
</div>
<div class="bibliomixed"><a name="Brand1994" id="Brand1994"></a>
<p class="bibliomixed">[Brand1994] Stewart Brand, <span class=
"citetitle"><i class="citetitle">How Buildings Learn</i></span>,
Phoenix, 1994.</p>
</div>
<div class="bibliomixed"><a name="Collins-Cope-2000" id=
"Collins-Cope-2000"></a>
<p class="bibliomixed">[Collins-Cope-2000] Mark Collins-Cope and
Hubert Matthews, &quot;Let's Get Layered: A Proposed Reference
Architecture for Refactoring in XP&quot;, XP 2000, <span class=
"bibliomisc"><a href="http://www.oxyware.com/Publications.html"
target=
"_top">http://www.oxyware.com/Publications.html</a></span>.</p>
</div>
<div class="bibliomixed"><a name="Eckel" id="Eckel"></a>
<p class="bibliomixed">[Eckel] Bruce Eckel, <span class=
"citetitle"><i class="citetitle">Thinking in Patterns</i></span>,
work in progress that can be downloaded from <span class=
"bibliomisc"><a href="http://www.mindview.net/Books/TIPatterns/"
target=
"_top">http://www.mindview.net/Books/TIPatterns/</a></span>.</p>
</div>
<div class="bibliomixed"><a name="Fowler1999" id="Fowler1999"></a>
<p class="bibliomixed">[Fowler1999] Martin Fowler, <span class=
"citetitle"><i class="citetitle">Refactoring: Improving the Design
of Existing Code</i></span>, Addison-Wesley, 1999.</p>
</div>
<div class="bibliomixed"><a name="Gabriel1996" id=
"Gabriel1996"></a>
<p class="bibliomixed">[Gabriel1996] Richard P Gabriel, &quot;Patterns
of Software: Tales from the Software Community&quot;, Oxford, 1996.</p>
</div>
<div class="bibliomixed"><a name="Gabriel-2000" id=
"Gabriel-2000"></a>
<p class="bibliomixed">[Gabriel-2000] Richard P Gabriel and Ron
Goldman, &quot;Mob Software: The Erotic Life of Code&quot;, delivered by
Richard Gabriel as a keynote at OOPSLA 2000, <span class=
"bibliomisc"><a href=
"http://oopsla.acm.org/oopsla2k/postconf/Gabriel.pdf" target=
"_top">http://oopsla.acm.org/oopsla2k/postconf/Gabriel.pdf</a></span>.</p>
</div>
<div class="bibliomixed"><a name="Henney2001" id="Henney2001"></a>
<p class="bibliomixed">[Henney2001] Kevlin Henney, &quot;Minimalism:
Omit Needless Code&quot;, <span class="citetitle"><i class=
"citetitle">Overload 45</i></span>,</p>
</div>
<div class="bibliomixed"><a name="Marx-1848" id="Marx-1848"></a>
<p class="bibliomixed">[Marx-1848] Karl Marx and Friedrich Engels,
<span class="citetitle"><i class="citetitle">The Communist
Manifesto</i></span>, Phoenix, originally published 1848.</p>
</div>
<div class="bibliomixed"><a name="Murray1993" id="Murray1993"></a>
<p class="bibliomixed">[Murray1993] Robert B Murray, <span class=
"citetitle"><i class="citetitle">C++ Strategies and
Tactics</i></span> , Addison-Wesley, 1993.</p>
</div>
<div class="bibliomixed"><a name="Petroski1999" id=
"Petroski1999"></a>
<p class="bibliomixed">[Petroski1999] Henry Petroski, <span class=
"citetitle"><i class="citetitle">The Book on the
Bookshelf</i></span>, Vintage, 1999.</p>
</div>
<div class="bibliomixed"><a name="Raymond2000" id=
"Raymond2000"></a>
<p class="bibliomixed">[Raymond2000] Eric S Raymond, <span class=
"citetitle"><i class="citetitle">The Cathedral and the
Bazaar</i></span>, O'Reilly, 2000, <span class=
"bibliomisc"><a href="http://www.tuxedo.org/~esr/writings/cathedralbazaar/"
target=
"_top">http://www.tuxedo.org/~esr/writings/cathedralbazaar/</a></span>.</p>
</div>
<div class="bibliomixed"><a name="Salingaros-2001" id=
"Salingaros-2001"></a>
<p class="bibliomixed">[Salingaros-2001] Nikos A Salingaros and
Debora M Tejada, &quot;Modularity and the Number of Design Choices&quot;,
<span class="citetitle"><i class="citetitle">Nexus Network
Journal</i></span> 3(2), 2001, <span class="bibliomisc"><a href=
"http://www.nexusjournal.com/Sali-Teja.html" target=
"_top">http://www.nexusjournal.com/Sali-Teja.html</a></span>.</p>
</div>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
