<?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>Object Mentor Blog: Tag Fast</title>
    <link>http://blog.objectmentor.com/articles/tag/fast</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>On Being Stupid</title>
      <description>&lt;blockquote&gt;
This was posted originally to a mailing list, but is reproduced here essentially unchanged by request of a friend. 
&lt;/blockquote&gt;

	&lt;p&gt;I frequently see code (written by others) that is completely
double-spaced, heavily commented, loaded with many abbreviated or meaningless variable names, and hundreds of lines long.
In order to read the function and understand what it&amp;#8217;s doing, poor Tim
must wear out a mouse, skip comments, and track the variables on
paper.  A &amp;#8220;smarter&amp;#8221; programmer could just load it into his head, I
suppose, but not the simpleton who writes this email.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not smart enough to just read it from top to bottom and
understand it. Sadly, when I read through and understand what in the
heck the thxIniFvt variable is doing, I will forget it by the time I
figure out the purpose(es) of pszVbt.  I can spend all day, or even a
few days to figure out a method, and that&amp;#8217;s an admission of
feeble-mindedness to be sure.  I guess I&amp;#8217;m not up to the level of some
of the rapid hackers. That&amp;#8217;s a limitation I face most days.&lt;/p&gt;


	&lt;p&gt;I find that I can sometimes understand a method like that only  if I just delete all the blank lines and comments first, then reformat to break lines, then inline all methods with seven or more parameters, and then start renaming variables, extracting explanatory variables, and
extracting explanatory methods. I may have to break the method into
classes even.   I guess I&amp;#8217;m not one of the smart kids.&lt;/p&gt;


	&lt;p&gt;I used to be one of the smart kids.  I once built a module so complex and fragile that nobody but me could figure out what to do with it.  It was all tables and indicators, and stunningly clever.  I am so ashamed that I wrote it. It was such a mistake that they eventually disabled it rather than field it in such a state. That was years ago, but so memorable to me. Other programmers said it was like the inside of a swiss watch, all
delicate and perfectly balanced, and scary to mess with unless you first knew exactly what each part was doing, and why.&lt;/p&gt;


	&lt;p&gt;I would like to be faster than I am both mentally and in the sense
of quickly producing code. I&amp;#8217;d like to be a little less intimidated at
the start of a project. .But I would not want those things if it meant
building crap that people who are not appreciably more talented than
myself would trip over every day.  Instead, I sometimes wish I could
teach the really fast, smart kids how to dumb down the code for the
rest of us morons to read.&lt;/p&gt;


	&lt;p&gt;The funny thing is that dumbing code to my level doesn&amp;#8217;t make it
harder for the smart kids to use it, and sometimes allows a compiler
to do a better job with it.  I guess stupid isn&amp;#8217;t so stupid after all.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 10:16:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0b06c5f0-9426-40f9-add4-95c9b20a56ac</guid>
      <author>Tim Ottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/09/10/on-being-stupid</link>
      <category>Tim's Tepid Torrent</category>
      <category>naming</category>
      <category>dumb</category>
      <category>moron</category>
      <category>clever</category>
      <category>refactoring</category>
      <category>comments</category>
      <category>coding</category>
      <category>Fast</category>
      <category>whitespace</category>
      <category>dumbing</category>
      <category>down</category>
      <category>code</category>
    </item>
    <item>
      <title>Not A Task, But An Approach</title>
      <description>&lt;p&gt;Transitions are tough. It seems that lately I&amp;#8217;ve been getting a lot of contact from frustrated people who don&amp;#8217;t really have a good handle on the &amp;#8220;drive&amp;#8221; part of Test Driven Development.  A question heard frequently is: &amp;#8220;I&amp;#8217;ve almost completed the coding, can you help me write the &lt;span class="caps"&gt;TDD&lt;/span&gt;?&amp;#8221;&lt;/p&gt;


	&lt;p&gt;It seems like Test Driven Development is taken backward, that the &lt;em&gt;developers&lt;/em&gt; are &lt;em&gt;driven&lt;/em&gt; to write &lt;em&gt;tests&lt;/em&gt;.  The practitioner winces, realizing that he again faces The Great Misunderstanding of &lt;span class="caps"&gt;TDD&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt; stands for Test-Driven Development, which is not as clear as &lt;span class="caps"&gt;TFD&lt;/span&gt; (Test-First Development). If the consultant would strive to always say the word &amp;#8220;first&amp;#8221; in association with testing, most people would more surely grasp the idea.  In fact, I&amp;#8217;ve begun an experiment in which I will not say the word &amp;#8220;test&amp;#8221; without the word &amp;#8220;first&amp;#8221; in close approximation. I&amp;#8217;ll let you know how that works out for me.&lt;/p&gt;


	&lt;p&gt;If the tests are providing nothing more than reassurance on the tail end of a coding phase, then the tests aren&amp;#8217;t driving the development.  They are like &lt;em&gt;riders&lt;/em&gt; instead of &lt;em&gt;drivers&lt;/em&gt;.  Test-Ridden Development (TRD)[1] would be a better term for such a plan. Even though it is better to have those tail-end tests than to have no automated testing, it misses the point and could not be reasonably be called &lt;span class="caps"&gt;TDD&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;An old mantra for &lt;span class="caps"&gt;TDD&lt;/span&gt; and &lt;span class="caps"&gt;BDD&lt;/span&gt; is &amp;#8220;it&amp;#8217;s not about testing&amp;#8221;. The term &lt;span class="caps"&gt;BDD&lt;/span&gt; was invented largely to get the idea of &amp;#8220;testing&amp;#8221; out of the way.  People tend to associate &amp;#8220;test&amp;#8221; as a release-preparation activity rather than an active approach to programming. &lt;span class="caps"&gt;BDD&lt;/span&gt; alleviates some of that cognitive dissonance.&lt;/p&gt;


	&lt;p&gt;In &lt;span class="caps"&gt;TDD&lt;/span&gt;, tests come first. Each unit test is written as it is needed by the programmer.  Tests are just-in-time and are active in shaping the code. Acceptance Tests likewise tend to precede programming by some short span of time.  [2]&lt;/p&gt;


Through months of repetition I have developed the mantra:
&lt;blockquote&gt;
&lt;span class="caps"&gt;TDD&lt;/span&gt; isn&amp;#8217;t a task. It is not something you do.  It is an approach.  It is how you write your programs.
&lt;/blockquote&gt;

	&lt;p&gt;I wonder if we shouldn&amp;#8217;t resurrect the term Test-First Programming or Test-First Development for simple evocative power. Admittedly there are some who would see that as a phase ordering, but maybe enough people would get the right idea.&lt;/p&gt;


	&lt;p&gt;Brett Schuchert(with some trivial aid from your humble blogger) has worked up an acronym to help socialize the basic concepts which are somehow being lost in translation to the corporate workplace.&lt;/p&gt;


	&lt;p&gt;The teaser:
    Fast, Isolated, Repeatable, Self-validating, and Timely.&lt;/p&gt;


	&lt;p&gt;As a reader of this blog, you are probably very familiar with all of the terminology and concepts behind &lt;span class="caps"&gt;TDD&lt;/span&gt;. I beg of you, socialize the idea that testing comes first and drives the shape of the code.  If we can just get this one simple idea spread into programming dens across our small spheres of influence, then we will have won a very great victory over Test-Ridden Development.&lt;/p&gt;


	&lt;p&gt;&amp;#8220;And there was much rejoicing.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;&lt;small&gt;
1 Jeff Langr will refer to this &lt;span class="caps"&gt;TRD&lt;/span&gt; concept as &amp;#8220;Test-After-Development&amp;#8221;, which he follows with a chuckle and a twinkle, &amp;#8220;which is a &lt;span class="caps"&gt;TAD&lt;/span&gt; too late.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;2 Of course, one still needs QC testing as well, however &lt;span class="caps"&gt;TDD&lt;/span&gt; is about driving development, not testing its quality post-facto.
&lt;/small&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 02 Aug 2007 22:14:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:bd848598-96fa-4e15-84e8-ccba83ab4325</guid>
      <author>Tim Ottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/08/02/not-a-task-but-an-approach</link>
      <category>Tim's Tepid Torrent</category>
      <category>FIRST</category>
      <category>testing</category>
      <category>mentoring</category>
      <category>TDD</category>
      <category>TRD</category>
      <category>TAD</category>
      <category>Fast</category>
      <category>Isolated</category>
      <category>Repeatable</category>
      <category>Self</category>
      <category>validating</category>
      <category>Timely</category>
    </item>
  </channel>
</rss>
