<?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>BlackBox : Writing Tips #3: Code first, write later</title>
    <link>http://www.warneronstine.com/blog/articles/2007/06/19/writing-tips-3-code-first-write-later</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Where technology and art disappear</description>
    <item>
      <title>Writing Tips #3: Code first, write later</title>
      <description>&lt;p&gt;I&amp;#8217;m going to share one of the tips that I got from fellow writer &lt;a href="http://raibledesigns.com/"&gt;Matt Raible&lt;/a&gt;. I&amp;#8217;m drastically paraphrasing of course as I can&amp;#8217;t remember if he gave me this advice in e-mail or chat.&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;I recommend that you do a project first and then use that project as the basis for the work. It&amp;#8217;s much easier. This is what I did with &lt;a href="http://appfuse.org/"&gt;AppFuse&lt;/a&gt; and &lt;a href="http://www.sourcebeat.com/books/springlive.html"&gt;Spring Live/Primer&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I liked this approach and decided to take it with &lt;a href="http://www.sourcebeat.com/books/tapestrylive.html"&gt;Tapestry 101&lt;/a&gt; with (I feel) good success. I think it was successful on two fronts; first in learning a framework, second in teaching that framework to others. &lt;/p&gt;

&lt;p&gt;This is contrasted to deciding what you are going to write about and designing a code example around that. From my perspective this is problematic for several reasons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What you&amp;#8217;re showing isn&amp;#8217;t necessarily a &amp;#8220;real-world&amp;#8221; scenario that a developer would find in their day-to-day activities.&lt;/li&gt;
&lt;li&gt;You will discover tips, tricks, and problems that you wouldn&amp;#8217;t have run into in a pre-defined task.&lt;/li&gt;
&lt;li&gt;Using a project (especially just one or two) throughout a book helps the reader through the &lt;a href="http://pragdave.pragprog.com/pragdave/2007/03/sywtwab_3_the_h.html"&gt;Hero&amp;#8217;s Journey&lt;/a&gt; showing them the way through the tangled forest by building on the knowledge they&amp;#8217;ve just used.&lt;/li&gt;
&lt;li&gt;Clearly defined problems are easy for reader&amp;#8217;s to understand rather than just &amp;#8220;Here&amp;#8217;s something cool that you could use to do X&amp;#8221;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently I do a mix between using a pre-built project and writing on the fly. I know the project I want to build and generally what I want to show with it and then I start coding with a clear (non-book-related) goal in mind. But I don&amp;#8217;t generally code all of it at once (as Matt suggested), instead I code the part just before I write the chapter. This helps solidify the ideas that I want to present in the chapter and helps me in my coding as well.&lt;/p&gt;

&lt;p&gt;When coding I rely heavily on TDD now and it helps me immensely when I need to go back and try and explain something, I always start with the test. This is something relatively new that I will take with me on future projects (programming and writing). &lt;/p&gt;

&lt;p&gt;Writing overall has definitely made me a better programmer as it has allowed me to dig deeper into a language than perhaps I would have if I weren&amp;#8217;t writing about it. This in turn has made me a better writer because I am exposed to new ideas that I can share with the reader.&lt;/p&gt;</description>
      <pubDate>Tue, 19 Jun 2007 19:48:47 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:b61b224f-1faa-4480-8e2c-dcbef31ee930</guid>
      <author>Warner Onstine</author>
      <link>http://www.warneronstine.com/blog/articles/2007/06/19/writing-tips-3-code-first-write-later</link>
      <category>writing</category>
      <category>writing_tips</category>
      <trackback:ping>http://www.warneronstine.com/blog/articles/trackback/302</trackback:ping>
    </item>
  </channel>
</rss>
