<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>The Efficient Coder</title>
    <link>http://www.efficientcoder.net/</link>
    <description>There has got to be a better way of communicating with our computers!</description>
    <language>en-us</language>
    <copyright>Kevin D. Wolf</copyright>
    <lastBuildDate>Tue, 10 Apr 2007 03:03:22 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.2</generator>
    <managingEditor>kevinw@software-logistics.com</managingEditor>
    <webMaster>kevinw@software-logistics.com</webMaster>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=f631d591-5738-4986-8152-14c5a7c0a6fa</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,f631d591-5738-4986-8152-14c5a7c0a6fa.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,f631d591-5738-4986-8152-14c5a7c0a6fa.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f631d591-5738-4986-8152-14c5a7c0a6fa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="4">Test Driven Development In the Real World</font>
        </p>
        <p>
      Well its been a couple years now and I've got enough experience doing TDD to feel
      that I can speak intelligent about what works (at least for me) using this development
      methodology.  I've seen some people say that they should never write a line of
      code before writing the tests, well that might be all-and-good for if your primary
      goal is to get an A on your test this semester, but in the real world, I'm not sure
      this is the best use of time.  Again, this is speaking from my past experience
      and the way I develop systems so your mileage may vary.<br /><br /><img src="http://www.efficientcoder.net/content/binary/logo.gif" border="0" /></p>
        <p>
      In my experience, as software developers we have to assume a certain level of stability
      in the building blocks we create.  Should we create test cases around our business
      objects that ensure when we execute a SQL Command against the database the SQL Connection
      object opens the connections and successfully executes the command?  
   </p>
        <p>
      Let's look at the Red-Green refactor cycle.  At any one time when you are developing
      software you are attempting to solve a specific problem.  If you aren't sure
      of the problem you are trying to solve you might not be ready to start coding, it
      might be time to drop back to the white-board and draw some boxes/puffy clouds,
      or you may need to revisit your data model.  Either way just getting that little
      green light to come on within your screen may prove your current API is valid, but
      I'm guessing that, the API may change a little bit once you continue on in your efforts.
   </p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/StopLight.jpg" border="0" />
        </p>
        <p>
      So if you made it this far, you have an open mind and we can continue our discussion...so
      let me say this, is there a place for TDD?  Abso-fricky-lutely I just did a little
      effort that was really built as more of a test concurrent type of development effort,
      but it's almost the same thing.  This was a very complex process where we had
      a disconnected database on a remote device that synchronized with a server. 
      We had to create some new "stuff' on the device that all needed to work locally before
      we could talk to the server.  No problem you say right?  Well where it gets
      interesting is the fact that the server uses integers to establish the relationships
      between the tables, that means if I create a new record on the device, I can't use
      an integer as the primary key, because that will only be available once we look at
      the identity column on the server database.  We need to build up all our referential
      integrity on the device database using Guido's then replicate those changes back to
      the server, create the "real records" send those "real records" back down to the device
      and make sure all our relationships are still happy.  For about the past year,
      I've been very happy using NUnit, however the client I'm building this for uses VSTFS
      so built the testing using this technology...really about the same thing, just slightly
      different syntax.  My new favorite little utility <a href="http://www.testdriven.net/">TestDriven.NET</a> works
      like a charm with both.  So anyway, I was able to create some really nice scenarios
      that create the item on the device, add this to it, add that to it, change this, change
      that, then synchronize with the server and make sure the data I had on the device
      was the same as after I synchronize.
   </p>
        <p>
      Another awesome experience I had with TDD was the development of a binary serialization
      algorithm for DataSets.  This I did as a pure TDD experience, I built my tests
      for the different data types I needed to serialize, then I created the methods and
      work on this until each of the unit tests passed.
   </p>
        <p>
      My other experience wasn't so much with TDD but more of a formalized Unit Testing
      via NUnit.  I created a VB.NET ASP.NET 2.0 application, with about 150 unit tests,
      I'm not sure I gained a ton in development efficiency, however it did same my rear-end
      a couple times with my build cycle.  As part of the continuous integration environment
      that was in place for this project, we ran the unit tests, if they didn't succeed,
      we knew we shouldn't deploy.  Worked out slick and once the test were built
      it worked for "free" so that was kind of nice.
   </p>
        <p>
          <img src="http://www.efficientcoder.net/content/binary/ToolChest.jpg" border="0" />
        </p>
        <p>
      So what's my final opinion on TDD?   Well just as in anything moderation...and
      finding the right tool to solve the right problem.  I'm not convinced you
      need to write a test case to make sure the set and get properties work on your business
      objects, however if you have a complicated workflow, it is certainly worth the investment
      in time.
   </p>
        <p>
      -ec
   </p>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=f631d591-5738-4986-8152-14c5a7c0a6fa" />
      </body>
      <title>Test Driven Development In the Real World</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,f631d591-5738-4986-8152-14c5a7c0a6fa.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,f631d591-5738-4986-8152-14c5a7c0a6fa.aspx</link>
      <pubDate>Tue, 10 Apr 2007 03:03:22 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font size=4&gt;Test Driven Development In the Real World&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   Well its been a couple years now and I've got enough experience doing TDD to feel
   that I can speak intelligent about what works (at least for me) using this development
   methodology.&amp;nbsp; I've seen some people say that they should never write a line of
   code before writing the tests, well that might be all-and-good for if your primary
   goal is to get an A on your test this semester, but in the real world, I'm not sure
   this is the best use of time.&amp;nbsp; Again, this is speaking from my past experience
   and the way I develop systems so your mileage may vary.&lt;br&gt;
   &lt;br&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/logo.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   In my experience, as software developers we have to assume a certain level of stability
   in the building blocks we create.&amp;nbsp; Should we create test cases around our business
   objects that ensure when we execute a SQL Command against the database the SQL Connection
   object opens the connections and successfully executes the command?&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
   Let's look at the Red-Green refactor cycle.&amp;nbsp; At any one time when you are developing
   software you are attempting to solve a specific problem.&amp;nbsp; If you aren't sure
   of the problem you are trying to solve you might not be ready to start coding, it
   might be time to drop back to the white-board and draw some boxes/puffy&amp;nbsp;clouds,
   or you may need to revisit your data model.&amp;nbsp; Either way just getting that little
   green light to come on within your screen may prove your current API is valid, but
   I'm guessing that, the API may change a little bit once you continue on in your efforts.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/StopLight.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   So if you made it this far, you have an open mind and we can continue our discussion...so
   let me say this, is there a place for TDD?&amp;nbsp; Abso-fricky-lutely I just did a little
   effort that was really built as more of a test concurrent type of development effort,
   but it's almost the same thing.&amp;nbsp; This was a very complex process where we had
   a disconnected database on a remote device that synchronized with a server.&amp;nbsp;
   We had to create some new "stuff' on the device that all needed to work locally before
   we could talk to the server.&amp;nbsp; No problem you say right?&amp;nbsp; Well where it gets
   interesting is the fact that the server uses integers to establish the relationships
   between the tables, that means if I create a new record on the device, I can't use
   an integer as the primary key, because that will only be available once we look at
   the identity column on the server database.&amp;nbsp; We need to build up all our referential
   integrity on the device database using Guido's then replicate those changes back to
   the server, create the "real records" send those "real records" back down to the device
   and make sure all our relationships are still happy.&amp;nbsp; For about the past year,
   I've been very happy using NUnit, however the client I'm building this for uses VSTFS
   so built the testing using this technology...really about the same thing, just slightly
   different syntax.&amp;nbsp; My new favorite little utility &lt;a href="http://www.testdriven.net/"&gt;TestDriven.NET&lt;/a&gt; works
   like a charm with both.&amp;nbsp; So anyway, I was able to create some really nice scenarios
   that create the item on the device, add this to it, add that to it, change this, change
   that, then synchronize with the server and make sure the data I had on the device
   was the same as after I synchronize.
&lt;/p&gt;
&lt;p&gt;
   Another awesome experience I had with TDD was the development of a binary serialization
   algorithm for DataSets.&amp;nbsp; This I did as a pure TDD experience, I built my tests
   for the different data types I needed to serialize, then I created the methods and
   work on this until each of the unit tests passed.
&lt;/p&gt;
&lt;p&gt;
   My other experience wasn't so much with TDD but more of a formalized Unit Testing
   via NUnit.&amp;nbsp; I created a VB.NET ASP.NET 2.0 application, with about 150 unit tests,
   I'm not sure I gained a ton in development efficiency, however it did same my rear-end
   a couple times with my build cycle.&amp;nbsp; As part of the continuous integration environment
   that was in place for this project, we ran the unit tests, if they didn't succeed,
   we knew we shouldn't deploy.&amp;nbsp; Worked out slick and once the test&amp;nbsp;were built
   it worked for "free" so that was kind of nice.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.efficientcoder.net/content/binary/ToolChest.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   So what's my final opinion on TDD?&amp;nbsp;&amp;nbsp; Well just as in anything moderation...and
   finding the right&amp;nbsp;tool to solve the right problem.&amp;nbsp; I'm not convinced you
   need to write a test case to make sure the set and get properties work on your business
   objects, however if you have a complicated workflow, it is certainly worth the investment
   in time.
&lt;/p&gt;
&lt;p&gt;
   -ec
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=f631d591-5738-4986-8152-14c5a7c0a6fa" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,f631d591-5738-4986-8152-14c5a7c0a6fa.aspx</comments>
      <category>Software Engineering;Test Driven Development</category>
    </item>
    <item>
      <trackback:ping>http://www.efficientcoder.net/Trackback.aspx?guid=782414ae-7aad-4b8e-9820-e963c22f4c15</trackback:ping>
      <pingback:server>http://www.efficientcoder.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.efficientcoder.net/PermaLink,guid,782414ae-7aad-4b8e-9820-e963c22f4c15.aspx</pingback:target>
      <dc:creator>kevinw@software-logistics.com (Kevin D. Wolf)</dc:creator>
      <wfw:comment>http://www.efficientcoder.net/CommentView,guid,782414ae-7aad-4b8e-9820-e963c22f4c15.aspx</wfw:comment>
      <wfw:commentRss>http://www.efficientcoder.net/SyndicationService.asmx/GetEntryCommentsRss?guid=782414ae-7aad-4b8e-9820-e963c22f4c15</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Visual Studio .NET 2005 provides a very powerful frameworks for performing web testing.
   </p>
        <p>
      Here are some tips to make the most out of these features:
   </p>
        <ul>
          <li>
         When creating controls on your forms, make sure each control gets an ID even if these
         controls get created dynamically.  This will give a consistant name for checking
         fields on post-backs.  If you don't do this VS.NET generates a name like ctl00. 
         If you move things around on your page, this may become ctl01 and your test will break. 
      </li>
          <li>
         Besure to take advantage of Context Parameters, these allow you to quickly define
         constants to be used across tests.</li>
        </ul>
        <img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=782414ae-7aad-4b8e-9820-e963c22f4c15" />
      </body>
      <title>Web Testing in VS.NET 2005</title>
      <guid>http://www.efficientcoder.net/PermaLink,guid,782414ae-7aad-4b8e-9820-e963c22f4c15.aspx</guid>
      <link>http://www.efficientcoder.net/PermaLink,guid,782414ae-7aad-4b8e-9820-e963c22f4c15.aspx</link>
      <pubDate>Mon, 20 Mar 2006 14:32:54 GMT</pubDate>
      <description>&lt;p&gt;
   Visual Studio .NET 2005 provides a very powerful frameworks for performing web testing.
&lt;/p&gt;
&lt;p&gt;
   Here are some tips to make the most out of these features:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      When creating controls on your forms, make sure each control gets an ID even if these
      controls get created dynamically.&amp;nbsp; This will give a consistant name for checking
      fields on post-backs.&amp;nbsp; If you don't do this VS.NET generates a name like ctl00.&amp;nbsp;
      If you move things around on your page, this may become ctl01 and your test will break. 
   &lt;li&gt;
      Besure to take advantage of Context Parameters, these allow you to quickly define
      constants to be used across tests.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.efficientcoder.net/aggbug.ashx?id=782414ae-7aad-4b8e-9820-e963c22f4c15" /&gt;</description>
      <comments>http://www.efficientcoder.net/CommentView,guid,782414ae-7aad-4b8e-9820-e963c22f4c15.aspx</comments>
      <category>Test Driven Development</category>
    </item>
  </channel>
</rss>