    <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  :: Of Minimalism, Constructivism and Program Code</title>
        <link>https://members.accu.org/index.php/journals/415</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>


        <h2>Journal Articles</h2>


<div class="xar-mod-head"><span class="xar-mod-title">Overload Journal #47 - Feb 2002 + Design of applications and programs</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/journals/">All</a>

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

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

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

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

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

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

                                            <a href="https://members.accu.org/index.php/journals/c198-67/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/journals/c198+67/">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;Of Minimalism, Constructivism and Program Code</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 26 February 2002 16:46:09 +00:00 or Tue, 26 February 2002 16:46:09 +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="d0e18" id="d0e18"></a></h2>
</div>
<p>In part this essay is a continuation of Kevlin Henney's
arguments in &quot;minimalism - omit needless code,&quot; but it is also, in
part a response and counter argument. Let me say up front: I like
minimalism, I like Kevlin's piece and I agree with much of what he
says.</p>
<p>However, I worry about some of the advice. I worry about the
direction of <span class="emphasis"><em>modern C++</em></span>, I
worry about what I perceive to be an increasingly elitist attitude
in C++ coding. I worry about all these things because of
accessibility.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e27" id="d0e27"></a>Less is
more</h2>
</div>
<p>First let me take Kevlin's loop example. To remind you, this is
a for-loop that prints out the content of a vector, example 1 is
Kevlin's first pass using an integer to access the vector.</p>
<pre class="programlisting">
// example 1
std::vector&lt;std::string&gt; items;
... // populate items
for (std::size_t at = 0;
              at != items.size(); ++at)
  std::cout &lt;&lt; items[at] &lt;&lt; std::endl;
</pre>
<p>Next the code is changed to use an iterator:</p>
<pre class="programlisting">
// example 2
std::vector&lt;std::string&gt; items;
... // populate items
for (std::vector&lt;std::string&gt;::iterator at = items.begin();
     at != items.end(); ++at)
  std::cout &lt;&lt; *at &lt;&lt; std::endl;
</pre>
<p>What has this change given us? In terms of functionality:
nothing; in terms of performance, well maybe we save a couple of
index operations; in terms of style it is more &quot;modern&quot; - that is
to say it looks more like <span class="emphasis"><em>modern
C++</em></span> because we are using iterators.</p>
<p>But in our haste for fashion what have we lost? We have
increased code complexity, we are demanding a more detailed
knowledge of C++ and its library than we did previously. This isn't
a crime, after all, if you don't know iterators how can you claim
to know C++?</p>
<p>On balance I think this is a judgement call, it depends on the
style of the program. I can't get worked up about this.</p>
<p>After a couple more iterations Kevlin gives us:</p>
<pre class="programlisting">
// example 3
std::vector&lt;std::string&gt; items;
... // populate items
typedef
  std::ostream_iterator&lt;std::string&gt; out;
std::copy(items.begin(),
          items.end(),
          out(std::cout, &quot;\n&quot;);
</pre>
<p>Now we have less code still. However, we have significantly
increased the amount of context information required to understand
the code. We must now understand std::copy, std::ostream_iterator
and the magic typedef. Further, we have lost our end-of-line
abstraction, std::endl, now we must know the correct end of line
terminator - CR? LF? CR and LF? Is this output intended for the
screen where it hardly matters? Or is it intended for a file where
it is more important?</p>
<p>So, although we have less code we actually require more
information to understand it. This cuts to the heart of one of the
fundamental problems of code reuse: to reuse code, that is, to be
able to write less code, we must know more, that is we must
increase our knowledge. In this case it is the standard C++
library, yes, every C++ programmer should know the library, but I
ask you: do you know the entire library?</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e55" id="d0e55"></a>Is this really
minimalism?</h2>
</div>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;The aim of Minimalism is to allow the viewer to experience the
work more intensely without the distractions of composition, theme
and so on [<a href="#ii">ii</a>].&quot;</p>
</blockquote>
</div>
<p>Using this definition example 3 is not minimalist because it is
full of distractions, to understand the code we must understand the
context it is written in - the theme is critical to understanding
the code. Example 1 may contain less code but it is actually closer
to a minimalist solution.</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;Constructivist art is marked by a commitment to total
abstraction and a wholehearted acceptance of modernity....
Objective forms which were thought to have universal meaning were
preferred over the subjective or the individual. The art is often
very reductive as well, paring the artwork down to its basic
elements [<a href="#iii">iii</a>].&quot;</p>
</blockquote>
</div>
<p>In fact, example 3 is more constructivist in nature than
minimalist. It is reduced to the basic elements using every
abstraction available. One of the best known constructivists,
Wassily Kandinsky, created whole pictures from his context
theories:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;elementary shapes were yellow for the triangle, red for the
square and blue for the circle, mixtures of colour would need to
follow from mixtures of form. A pentagon mixes a square and
triangles: it must therefore be orange [<a href="#iv">iv</a>].&quot;</p>
</blockquote>
</div>
<p>As in art such minimalism or constructivism can make program
code difficult to comprehend.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e82" id="d0e82"></a>Need for
context</h2>
</div>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;For me it was minimalism. I felt at home with it, felt I might
of invented it. Yet I have totally failed to write about it.....
[the ultra minimalist sculptor] Sandback can transfix and subjugate
me with a length of twine strung across a corner of a room but I
have found no way to write about the experience [<a href=
"#v">v</a>].&quot;</p>
</blockquote>
</div>
<p>So wrote the art critic David Sylvester in 1996. Let us examine
this for a moment. Here is an acclaimed art critic, a man who is
paid to understand and explain modern art, one who we expect to
understand Pop Art, Conceptual Art, Abstract Art and more, yet here
he is holding up his hands and saying &quot;I can't explain minimalist
art.&quot;</p>
<p>As we push further and further onwards in the direction of
minimalism it becomes less and less accessible. This is true of
art, literature and program code.</p>
<p>Simply claiming that program code is not written by dummies, for
dummies is not enough. As professional developers we have a
responsibility to ensure our code is maintainable. To paraphrase
Arthur C Clarke: &quot;<span class="quote">any sufficiently advanced
software implementation is indistinguishable from unmaintainable
code [<a href="#vi">vi</a>]</span>&quot;.</p>
<p>Let us suppose you write your masterpiece of a system and you
then leave the project. Who are you going to hand it over to? If
you are lucky you have a team of equally capable developers who are
ready to take over. More likely as Steve Maguirevii points out it
is junior developers, we have a responsibility to these people to
ensure the code is accessible.</p>
<p>If you are in a position to choose your own replacement you may
be able to manage this situation. More likely you aren't, the
company will go out and hire another contractor. Suppose you give
them a few months notice, and suppose they choose a good employee
and send him on the appropriate C++ courses. Can he now maintain
your program? How many years' experience does someone need to
maintain your masterpiece?</p>
<p>As I have observed before, we do not develop in a vacuum, we
must be aware on the context we develop in. Are our universal forms
truly universal or do they form a barrier to understanding?</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e109" id="d0e109"></a>Maintenance
and reuse</h2>
</div>
<p>There is not much maintenance in the arts community.
Rauschenberg's <span class="emphasis"><em>White
Painting</em></span> owned by San Francisco Museum of Modern Art is
an exception; the artist has given instructions that this all white
piece should, and has been, from time to time repainted.</p>
<p>Software development, like art, as an exercise is almost pure
intellectual creativity. But unlike artists we have to produce
works that are practical, useful and maintainable.</p>
<p>As an exercise in intellectual effort art has already visited
many of the same ideas as software. Dan Flavin, for example,
practises component reuse, using standard neon-light tubes (which
may be readily purchased by anyone) he constructs pieces such as
his Monument to V. Tatlin.</p>
<p>Carl Andre (considered a minimalist) has pieces made in a
factory. Consider Maholy-Nagy (a constructivist):</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;just before he left for the Bauhaus [he] ordered a series of
three paintings by telephone, giving a factory that made enamel
signs precise verbal instructions and leaving the manufacture up to
them [<a href="#viii">viii</a>].&quot;</p>
</blockquote>
</div>
<p>As software developers we are in this space: we want to use
standard components, we want to be able to produce software from
precise specifications - some would even argue for a code factory.
But, much of the art that arises from these techniques is
considered inaccessible, this is not a quality we want in our code.
Ironically, minimalist paintings created to be free on context are
difficult to understand exactly because of the lack of context!</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e131" id="d0e131"></a>There is more
than one way to skin a cat</h2>
</div>
<p><span class="emphasis"><em>Sculpture, minimalism, installation,
ready-mades</em></span> - these are the languages of modern art.
They allow artists to express their ideas. C++, Java, Python, Perl
- these are the languages of software. They allow developers to
express their ideas.</p>
<p>We choose a language that is expressive enough to manipulate our
ideas, we choose Java for internet applications, Visual Basic for
desktop application and so on. None of these languages yield more
computing power, they are all Turing equivalent, no more no less.
Yet each in its own field is more expressive, the power of
expression is what gives one language power over another. The
expressiveness means nothing to the machine; it is expressive power
to the human developer.</p>
<p>This richness of expression comes at a cost: the size and
complexity of the language increases. Wirth's language family has
gone down the path of minimalism, yet Oberon and Modula-3 are
seldom used outside research environments. Oberon is so minimalist
it eliminates the enumeration types and the for-loop, in becoming
so minimalist it has removed the expressive power of its users.
This pursuit leads to Orwell like <span class=
"emphasis"><em>NewSpeak</em></span> where it is not possible to
think an incorrect thought because the language does not permit
it.</p>
<p>Instead the successful languages allow expression - and they
allow us to make mistakes. Maybe the balance has gone the wrong
way; maybe we do have too many features. Ironically many of these
features are aimed at allowing reuse. In example 3, code reduction
occurs because we use a ready-made algorithm. Yet the price of this
is that we must understand the context.</p>
<p>Reuse is the Holy Grail of software development, yet we must not
forget that the first reuse of our code occurs in the maintenance
phase, MegaCalc version 1.1 reuses almost everything from version
1.0. Making code more accessible, that is, more understandable,
benefits reuse in version 1.1 and in MegaWord 1.0. We want to reuse
and have added vocabulary to our language to allow expression of
reuse. However, growing the language does not lead to minimalism,
it leads to constructivism because we have increased the amount of
context information required to understand the code.</p>
<p>The superfluous has no place in minimalism, constructivism or
program code. However, we must consider our audience. We can do
this through shared context or through explicit statements. Our
shared context, our universal truth, is our language. But this
truth is not singular, it is many and we cannot expect even a true
believer to know the entire truth.</p>
<p>We can reduce the physical amount of code but if we
simultaneously increase the amount of knowledge required to
understand it what have we gained?</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;C++ supports the notion of gradual introduction... programmers
can remain productive while learning C++ [<a href=
"#ix">ix</a>].&quot;</p>
</blockquote>
</div>
<p>Of the examples above no one piece of code is superior: they are
simply different. They may simply be examples written by developers
at different points in their learning cycle. To tell the author of
example 1 that she should have written example 3 adds nothing to
the code but you may have an adverse effect on her self esteem, her
attitude and how she views you.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e161" id="d0e161"></a>The place for
minimalism</h2>
</div>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;The results were shown... in New York in 1966... the artist
[Andre, Judd, Morris, Flavin] shared a concern with stripping
sculpture down to its essence [<a href="#x">x</a>].&quot;</p>
</blockquote>
</div>
<p>Most developers have rejected minimalism languages. Minimalism
at the code level is self-defeating. Constructivist code is both
advantageous and dangerous.</p>
<p>The place for minimalism is in our designs. A design should
stand alone without distractions. Our design is the kernel of our
system and as such we should ensure it is extendable. Extending a
design should not introduction distractions and complications.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e174" id=
"d0e174"></a>Conclusion</h2>
</div>
<p>There is nothing wrong with minimalism. I too feel at home with
it, I too feel I could have invented it. However we must direct it
precisely to avoiding feature creep. We must delve down into the
essence of our problem domain and sculpt our solution. We need the
expressive power of our language but this brings the responsibility
to ensure that we use it correctly.</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;In the development of our understanding of complex phenomena,
the most powerful tool available to the human intellect is
abstraction [<a href="#xi">xi</a>].&quot;</p>
</blockquote>
</div>
<p>Constructivism and minimalism are examples of abstraction. They
are also tools in their own right, which can be used to explain and
understand software. Our challenge is to keep our products
accessible, the blind pursuit of abstraction, minimalism or
constructivism is evil when it deprives us of context or burdens us
with too much context.</p>
<p>For me, Wassily Kandinsky could have been talking about software
development when he said:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;The 'artist' gives birth to a creation in a mysterious way full
of secrets and enigmas. Freed from him, it attains an independent
life, becomes a personality, a subject whose spirit breathes on its
own but also lives a real material life; who is a being [<a href=
"#xii">xii</a>].&quot;</p>
</blockquote>
</div>
<p>How many of us know the life our creations are leading
today?</p>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e197" id="d0e197"></a>References</h2>
</div>
<div class="bibliomixed"><a name="i" id="i"></a>
<p class="bibliomixed">[i] Kevlin Henney, <span class=
"citetitle"><i class="citetitle">Overload 45</i></span>, October
2001</p>
</div>
<div class="bibliomixed"><a name="ii" id="ii"></a>
<p class="bibliomixed">[ii] <span class="bibliomisc"><a href=
"http://www.artmovements.co.uk/minimalism.htm" target=
"_top">http://www.artmovements.co.uk/minimalism.htm</a></span></p>
</div>
<div class="bibliomixed"><a name="iii" id="iii"></a>
<p class="bibliomixed">[iii] <span class="bibliomisc"><a href=
"http://www.artmovements.co.uk/constructivism.htm" target=
"_top">http://www.artmovements.co.uk/constructivism.htm</a></span></p>
</div>
<div class="bibliomixed"><a name="iv" id="iv"></a>
<p class="bibliomixed">[iv] Frank Whitford, <span class=
"citetitle"><i class="citetitle">Bauhaus</i></span>, Thames and
Hudson, 1984</p>
</div>
<div class="bibliomixed"><a name="v" id="v"></a>
<p class="bibliomixed">[v] David Sylvester, <span class=
"citetitle"><i class="citetitle">Curriculum Vitae</i></span>, About
Modern Art, Pimlico, 1997</p>
</div>
<div class="bibliomixed"><a name="vi" id="vi"></a>
<p class="bibliomixed">[vi] I originally made this observation on
the ACCU-general mailing list in September 2001, Ric Parkin was
good enough to provide the original quote <span class=
"bibliomisc">&quot;<span class="quote">Any sufficiently advanced
technology is indistinguishable from magic.</span>&quot;</span></p>
</div>
<div class="bibliomixed"><a name="vii" id="vii"></a>
<p class="bibliomixed">[vii] Steve Maguire, <span class=
"citetitle"><i class="citetitle">Debugging the Development
Process</i></span>, Microsoft Press, 1994</p>
</div>
<div class="bibliomixed"><a name="viii" id="viii"></a>
<p class="bibliomixed">[viii] Frank Whitford, <span class=
"citetitle"><i class="citetitle">Bauhaus</i></span>, Thames and
Hudson, 1984</p>
</div>
<div class="bibliomixed"><a name="ix" id="ix"></a>
<p class="bibliomixed">[ix] Bjarne Stoustrup, <span class=
"citetitle"><i class="citetitle">The C++ programming language,
third edition</i></span>, Addison-Wesley, 1997</p>
</div>
<div class="bibliomixed"><a name="x" id="x"></a>
<p class="bibliomixed">[x] Anna Moszynska, <span class=
"citetitle"><i class="citetitle">Abstract Art</i></span>, Thames
and Hudson, 1990</p>
</div>
<div class="bibliomixed"><a name="xi" id="xi"></a>
<p class="bibliomixed">[xi] C. A. R. Hoare, &quot;Notes on Data
Structuring&quot;, in <span class="citetitle"><i class=
"citetitle">Structured Programming</i></span>, Dahl, Dijkstra and
Hoare, Academic Press. Thanks to Rob D'Entremont and Peter S
Tillier on ACCUgeneral for providing the source of this quote.</p>
</div>
<div class="bibliomixed"><a name="xii" id="xii"></a>
<p class="bibliomixed">[xii] Quoted at Berkeley Art Museum,
2001</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>
