<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Plasmic Peach: Drawing and Programming</title>
    <link>http://www.plasmicpeach.com/articles/2006/12/17/drawing-and-programming</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Momo Web Blog</description>
    <item>
      <title>Drawing and Programming</title>
      <description>&lt;p&gt;Even though one fairly well-known &lt;a href="http://paulgraham.com/hp.html"&gt;programmer&lt;/a&gt; has already pointed out the similarities between programming and art, most people, I would say, still do not appreciate how similar they are.&lt;/p&gt;


	&lt;p&gt;One thing that struck me recently is how good programmers and good drawers approach their work &amp;#8211; and how they differ from the inexperienced.  In both fields, people who are skilled know where to begin.&lt;/p&gt;&lt;p&gt;Inexperienced drawers tend to approach the task pretty randomly.  Let&amp;#8217;s say they want to draw a picture of a cat.  They&amp;#8217;ll get a piece of paper, a pencil, and maybe even a cat to look at, and off they go drawing.  Maybe they&amp;#8217;ll start with an ear or an eye, or even the tail.  And they&amp;#8217;ll progress from that point, filling in a lot of detail as they go.  They&amp;#8217;ll probably erase a lot of mistakes.  Soon enough they look at their eraser-smudged picture and say, &amp;#8220;It&amp;#8217;s coming out all wrong.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;Their cat doesn&amp;#8217;t look like a cat.  Its ears are too big.  Its feet are way too small for its body.  Its tail is going off the page.  And there isn&amp;#8217;t any room left for the sofa that the cat&amp;#8217;s meant to be sitting on.&lt;/p&gt;


	&lt;p&gt;Experienced artists do it differently.  They start with the most basic shapes in rough, sketchy form, making sure they&amp;#8217;ve got the perspective and proportions right and that the object is positioned correctly on the page.  They&amp;#8217;ve studied art, so they know something about animal anatomy and perspective.  And they start filling in detail only when they&amp;#8217;re happy with the basic form.  When they&amp;#8217;re done, the picture is balanced, everything fits, and the eye is drawn to the right details.&lt;/p&gt;


	&lt;p&gt;I think there&amp;#8217;s a similar pattern at work in programming.  People new to programming often start in the wrong place &amp;#8211; with a trivial feature that seems cool, say.  And they fill in too much detail too early, before they&amp;#8217;ve even written the application&amp;#8217;s core engine.  Before they know it, they&amp;#8217;ve programmed themselves into a corner &amp;#8211; they realise that the architecture&amp;#8217;s wrong, or that the way they implemented those features depends on too much repetition of code.&lt;/p&gt;


	&lt;p&gt;Programmers with more experience tackle the core of the application first and keep a close eye on how they will reuse the components they write.  They make mistakes, but they sort out the critical ones before they&amp;#8217;ve written much, so making changes is relatively easy.  It&amp;#8217;s also easier to &lt;em&gt;see&lt;/em&gt; mistakes when there&amp;#8217;s not much code &amp;#8211; the core architecture of an application is much easier to understand when it&amp;#8217;s not very detailed yet.&lt;/p&gt;


	&lt;p&gt;One mistake that intermediate programmers can make is to assume that planning guarantees success.  It doesn&amp;#8217;t.  For one thing, plans are usually wrong, sometimes in minor ways, sometimes in major ways.  So it&amp;#8217;s still important to be able to change the actual code early, and for the early code to represent the core of the application, not trivial high-level features.&lt;/p&gt;


	&lt;p&gt;In both art and programming, there is an amount of theory that is extremely helpful for producing good work.  I think the importance of theory &amp;#8211; or &amp;#8220;science&amp;#8221; &amp;#8211; in art is greatly underappreciated.  But in both fields, practice is the vital ingredient that leads to an instinctive understanding of where to begin.&lt;/p&gt;</description>
      <pubDate>Sun, 17 Dec 2006 00:41:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1642e294-f871-4d24-8b2f-25073f68a6fd</guid>
      <author>Momo</author>
      <link>http://www.plasmicpeach.com/articles/2006/12/17/drawing-and-programming</link>
      <category>programming</category>
    </item>
  </channel>
</rss>

