<?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>8th Light Blog: Tag Paul</title>
    <link>http://blog.8thlight.com/paul</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In the minds of the craftsmen...</description>
    <item>
      <title>Apprenticeship month one report</title>
      <description>&lt;p&gt;8th Light has an apprenticeship program whereby an 8th Light craftsman will mentor an individual for three months.  During that time, the craftsperson becomes responsible for a single apprentice.  I am one month into a mentorship with an apprentice.  This blog is about observations I have made about myself as a mentor.&lt;/p&gt;

&lt;h3&gt;Curiosity&lt;/h3&gt;

&lt;p&gt;He asks me questions that I wouldn&amp;#8217;t ask myself.  I had him do an exercise about &lt;a href="http://en.wikipedia.org/wiki/Law_Of_Demeter"&gt;Law of Demeter&lt;/a&gt; , to find Law of Demeter violations in my code base.  He found something like:&lt;/p&gt;

&lt;p&gt;Law of Demeter&lt;/p&gt;

&lt;p&gt;&amp;#8220;Ted Williams&amp;#8221;.to_s.strip.upcase&lt;/p&gt;

&lt;p&gt;He was counting the periods, which is what I explained is often good measurement of Law of Demeter violations.  Yet this is not a Law of Demeter violation.  Each one of those methods returns itself (a string) in a changed state.  It is not a string of implementation details- this example is just changing a single object.  The pivotal piece of information is that all of these methods on string return the string itself.  Also, is anything inside of Ruby core language capable of Law of Demeter?  It is unlikely to change, and is there a problem being coupled tightly to your language?&lt;/p&gt;

&lt;p&gt;I sometimes get desensitized to the original premises of good development.  When I first learn something, I remember the example of the rule more than the value of the rule.  The value of learning about Demeter is rooted in encapsulating logic in such a way to hide implementations from an object&amp;#8217;s clients.  When I first learned about Demeter, all I could do was point out violations.  The more I developed, the more it was internalized as a guide for a higher development idea.  I want to keep my modules as decoupled as possible.  However, that notion only came with development experience.  Now I don&amp;#8217;t think in terms of violations or non-violations of Demeter when I read a piece of code.  It is just ingrained in my developmental context that I should develop my modules in such a way that they are autonomous.  This weeds out most Law of Demeter violations by itself.  Bringing these premises back up in my development as a craftsman gets my curiosity started.  Like a good song or piece of writing, every time I come back to it, I take something different from it, because I am in a state of constant change.&lt;/p&gt;

&lt;h3&gt;Teaching&lt;/h3&gt;

&lt;p&gt;Sometimes I forget how important teaching is to the craftsmanship model, because I am still an extreme novice at it.  It is one of the steps involved with internalizing development skills.  When I pair with my mentor, I am constantly amazed at how he skips steps in the development rational process.  Instead of following a linear thought pattern to a solution, it seems there is a giant shortcut in the rational processes I go through.  That gap is a lookup table of solutions in his head.  It appears so easy and effortless.  Teaching is part of a formula that has given him a development context that is superior to mine.  The more I am able to teach, the more I internalize the ideas about development.  &lt;/p&gt;

&lt;p&gt;There is a &lt;a href="http://sports.espn.go.com/espnmag/story?id=3336514&amp;amp;campaign=rss&amp;amp;source=MLBHeadlines"&gt;baseball story&lt;/a&gt; from about a year ago.  Greg Maddux was warming up before a game and his catcher exclaimed to the pitching coach, &amp;#8220;I bet I could catch him with my eyes closed.&amp;#8221;  Well, after much effort, they convinced Maddux to give it a shot.  The catcher was going to call his pitch, then close his eyes.  When the ball was about to hit his mitt, the pitching coach with his eyes open was going to yell &amp;#8220;now&amp;#8221;, whereupon the catcher would squeeze his glove on the ball.  Well, on the third try, the catcher caught the ball.  The degree of difficulty of the exercise is incredible, but Greg Maddux had spent so many years internalizing the mechanics of his craft that he could effortlessly hit the catcher&amp;#8217;s mitt.  There probably are only a few pitchers in the long history of baseball who could match that exercise.  I am not anywhere near that kind of skill in development, but that is my goal.  When you get the mechanics of your craft to be intuition, it frees your mind to think about and solve larger problems.  I have been fortunate to spend time with enough great developers to see this mastery in action.&lt;/p&gt;

&lt;h3&gt;Communication&lt;/h3&gt;

&lt;p&gt;For me, what is special about teaching is the commitment of thoughts to sound.  Forcing something outside of my internal monologue always changes it, even if it is a small change.  When I explain something, I often have to explain it multiple ways (this is telling of my communication skills, not of my apprentice&amp;#8217;s learning skills).  So, the more I am forced to answer questions on the spot, the better I get at quickly thinking through a question and giving a good answer.  This dialogue is another one of the mental exercises which translates into my everyday development.  It makes me a better pair programmer, better presenter, and better writer.  Being able to accurately explain a problem and a solution using the language of software development is a very important tool in being a successful craftsman, and a tool that I fight uphill to improve upon.  When I go to a talk at a conference and the presenter hits the problem and solution perfectly, it is a wonderful experience.  The same is true when a team member can explain a solution in such intuitive terms that everyone gets it immediately.&lt;/p&gt;

&lt;p&gt;Apprenticeship for me is as much about internalizing and expanding my own skill set as it is about expanding my apprentice&amp;#8217;s.  &lt;/p&gt;</description>
      <pubDate>Tue, 01 Jul 2008 01:14:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:29809293-4427-4262-bc2c-eeda47e56d81</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/07/01/apprenticeship-month-one-report</link>
      <category>Craftsmanship</category>
      <category>Coding</category>
      <category>Paul</category>
      <category>Apprenticeship</category>
    </item>
    <item>
      <title>Developing against web browser navigation</title>
      <description>&lt;p&gt;I find while writing web applications that I end up redefining what it means to go &amp;#8220;back.&amp;#8221;  This means where I want the user to go when they hit the back button.  The creation of AJAX has killed the behavior of the navigation buttons in the browser.  The navigation buttons on a browser are from the time of sundials and static web pages.  We live in the world of atomic watches and dynamic content.  I don&amp;#8217;t want you to go back to the last static web page that was loaded.  More times than not, that messes up the user&amp;#8217;s experience.&lt;/p&gt;

&lt;p&gt;I have seen/implemented some solutions.  One that we have used is when the first page is served up you start some kind of memory.  Start a stack of the user&amp;#8217;s actions, saving them in the session.  When the user tries to go back to the main page, they are redirected to the real last page they were at.  This is good for AJAX intensive applications.  These days I am finding the percentage of AJAX requests is many times higher than AJAX requests when I am trying to create a rich user experience.  The problem is you get into situations where the user really does want to go back to the last domain they are at, but your application, very annoyingly, will not let them leave.  As a user of the internet, I quickly learned that if I hit the back button many times quick enough, the page doesn&amp;#8217;t have time to render the redirect, and I can get back.  The fact I even know that is annoying, let alone what it takes away from my application.&lt;/p&gt;

&lt;p&gt;Another solution is to have lots of static pages.  Don&amp;#8217;t let the user get too far without loading a new page.  This way the back button can really only do minimal damage.  Use lots of client side JavaScript and limit the amount of AJAX calls to the bare minimum.  This has become industry standard for web pages which involve payment processing.  Since the developers can&amp;#8217;t guarantee that a user won&amp;#8217;t hit the back  refresh / or forward buttons, you have to be able to have some kind of state recovery.  If the distance between static pages is short, then you don&amp;#8217;t do too much damage.   However, this constraint limits what you can do with your web application, limiting AJAX calls.&lt;/p&gt;

&lt;p&gt;My favorite solution is to take the browsers out back and teach them about feature envy.  They are telling me to serve HTML/JavaScript/Flash content inside their main pane architecture, and they will take care of the rest.  Well then, keep your hands to yourself!!!  Navigating between web applications(domains) makes sense at some high level, because that is in the job of a web browser.  They get you from one web application to another.  However, inside of my web application, let me decide what I want the back button to do.  I understand some kind of backwards compatibility so the Geocities web page with the contra code on it doesn&amp;#8217;t get lost (like we don&amp;#8217;t all have it memorized).  So, let me turn it off for my domain.  Give me a JavaScript API to say what the back button behavior should be or let me at least turn it off.  There are &lt;a href="http://www.robertpenner.com/experiments/backbutton/backbutton.html"&gt;some attempts&lt;/a&gt; to do just this, but they are not straightforward or part of the core library.&lt;/p&gt;

&lt;p&gt;So, this will require all developers of web applications to implement navigation that makes sense within their web applications.  Great!!!  If they are worried at all about user experience, they have already thought about this and have some solution in place.  Getting rid of the back button just gives them more power.  I have never met a developer who wouldn&amp;#8217;t embrace more freedom in their tools.&lt;/p&gt;</description>
      <pubDate>Fri, 27 Jun 2008 15:07:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e133fb36-4860-4c9e-aba5-fafa73e2dab4</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/06/27/developing-against-web-browser-navigation</link>
      <category>Coding</category>
      <category>Paul</category>
      <category>Browser</category>
    </item>
    <item>
      <title>Some Thoughts On Software Defects</title>
      <description>&lt;p&gt;Software defects are a part of software.  This is a negative subject, but I don&amp;#8217;t want to seem like the software I write is full of defects and bugs.  This blog is addressing how I have seen teams turn a roadblock into a success.  I have read and heard at conferences about teams who take small failures and create a culture of failure around it.  Following are some examples of small failures I have seen and great successes built around them.  Sometimes I see small failures as a path to larger positive culture changes.   &lt;/p&gt;

&lt;p&gt;I think it is safe to say all software that is used and sufficiently complex has defects.  There are many reasons for the defects.  Here are a few of the defect situations I have been in and how our team solved them.  &lt;/p&gt;

&lt;p&gt;I think the important part I learned after evaluating these is that resolution of these situation needs to be fast and high quality.  They need to make the project better off at the end of their resolution.  Success for the customer is the only true result of a project, and defects may not be the most ideal path, but they must lead there.&lt;/p&gt;

&lt;p&gt;The speed is important, but it doesn&amp;#8217;t mean I should rush a solution and throw it in as soon as possible.  To me it means giving the defect the red carpet treatment.  I am trying to capture craftsmanship in the face of adversity.  Every project has its ups and its downs, and a craftsman will take pride in success through any obstacles.  Instead of making defects a slippery slope downhill, they are one step back and we take two steps forward.  &lt;/p&gt;

&lt;h3&gt;Bugs&lt;/h3&gt;

&lt;p&gt;Bugs are a part of every piece of software I have written.  That statement sounds a lot worse than it is.  I have worked on systems where the requirements are dramatically changed week to week (which can be pretty exciting).  There are situations I didn&amp;#8217;t take into account, or some behavior I didn&amp;#8217;t imagine until a real user started hitting the system.  Now, as a developer, I do more mental exercises and think thoroughly through my solutions as I get more experience. This has never made my code bug free.  For that reason, my team needs to know how to deal with bugs (I am fairly certain I am not the only creator of bugs).&lt;/p&gt;

&lt;p&gt;Here is a line from the Pragmatic Programmer  book, &amp;#8220;It doesn&amp;#8217;t matter whether the bug is your fault or someone else&amp;#8217;s.  It is still your problem.&amp;#8221; &lt;/p&gt;

&lt;p&gt;So, the team has a bug list.  We list out the bugs as a todo list in basecamp, so they are not so formal they can be forgotten about.  Then we try to address them and work on new stories.  This worked well enough until there was a big release coming up and our customer came back to us with a big list of bugs.  We put them on the list and continued to fix them, as well as work on stories.  They were getting completed, but there was never an empty bug list.  Then, the customer (who can directly add/edit the bug list) started writing priorities to the bugs.  This one is HIGH priority.  This one is CRITICAL.  This one is IMMEDIATE.  I make the suggestion &amp;#8220;We need some real tool to manage our bug list,&amp;#8221; because I can&amp;#8217;t fit all this in my head.  There isn&amp;#8217;t that much room up there and I need to use it wisely.  One of my team members suggested maybe it wasn&amp;#8217;t the craftsmanship way to have ANY bugs shipped.  I was trying to solve the wrong end of the equation.  So, the team lead put forth a no bugs policy that we all agreed with.&lt;/p&gt;

&lt;p&gt;You can not pick up a new story unless the bug list is empty.&lt;/p&gt;

&lt;p&gt;This made sense to me, but I had reservations about a small/insignificant bug taking priority over a story that is important.  To date, this has not happened, and the bug list has stayed near no bugs.  That doesn&amp;#8217;t mean less bugs are found, it just means they are fixed, and the code is refactored to prevent a future occurrence.  Most importantly, some tool to track bugs never made it into our system.  That was an idea which would have desensitized the team mentality to bugs, whereas with our policy now we are very sensitive to the issue of bugs.  Challenging the craftsmanship of the team members that buggy code is something you should take personally was the right choice.  Bugs got a first class ticket to termination in our system.&lt;/p&gt;

&lt;p&gt;Now, the definition of a bug versus a small feature enhancement is a fine line.  I know I have failed to define it well, and that might contribute to what gets called a &amp;#8220;bug&amp;#8221;.  Often times, the urgency in the customer takes up more mental space than me thinking through it, looking up the acceptance criteria for the story where it was implemented, and going back to  the customer and saying, &amp;#8220;No, that was clearly not a defined scenario, we are going to need a story to turn that button green.&amp;#8221;  Now the next time, it is more than turning a button green, but the precedent has already been set.  All I have been able to do is to strike a balance based upon how much effort it would take to make the bug/feature enhancement work.  If it is a lot of effort, I will double check the bug to make sure it is a bug.  If it is, I fix it.  If not, I will push back to the customer to write a story card.&lt;/p&gt;

&lt;h3&gt;Production Support&lt;/h3&gt;

&lt;p&gt;Once a system goes into production, support begins.  Following along with one of Paul Graham&amp;#8217;s ideas, we have the developers doing the production support.  We are the ones who wrote the system and know the system the best.  When I look at a production support request, I can not only solve it, but make sure it doesn&amp;#8217;t happen again.  Or if it does, make sure it is easy to correct.&lt;/p&gt;

&lt;p&gt;So, during our first deployment of a system, a single team member stepped up as the &amp;#8220;production support&amp;#8221; developer.  I don&amp;#8217;t know if he embraced it or was cornered to it, but as a craftsman, he took the responsibility and ran with it.  As further systems were released, he would sometimes be doing an entire day of production support.  Production support can be a lot of debugging and fixing data, which can be fun, but more times than not is tedious and rhythmic.  Often times when I saw a production support email, I would look to the &amp;#8220;production support guy,&amp;#8221; who could fix it in about half the time I could.  This seems a lot like a silo to me.  Everyone should be able to do production support on any system.  I should have to, because it is a perspective of the system that is important to have.&lt;/p&gt;

&lt;p&gt;In response to this, we came up with a system of triage.  Each day of the week is assigned to a specific developer.  If a support item comes up, it is the job of the triage developer to respond to the client/customer we are working on it.  If it addressed to a specific person, they will inform them. Otherwise it is on the triage developer&amp;#8217;s shoulders to fix the support request before they continue their work for the day.  This ensures the client always has an open line of communication with a developer.  An email never slips through and doesn&amp;#8217;t get addressed.  There is clear responsibility to who should be addressing the support item.  I know the &amp;#8220;production support&amp;#8221; developer is in favor of this system.  As well as the customer, they ask who the triage is for the day and have no qualms about interrupting their work, as they should.&lt;/p&gt;

&lt;h3&gt;Communication and Managing Expectations&lt;/h3&gt;

&lt;p&gt;Recently, I did some integration work with a third party vendor.  They were developing their side of the integration at the same time as us. Not wanting to slow development and wait for their functionality, we decided to write a mock server and integrate with the host according to the spec from the third party vendor.  We received a story from the customer for that and proceeded to make the client for the third party system calls.  We finished our story.  In the demo portion of the iteration planning meeting, we could only demo against our mock server.  This caused some nervousness in the customer (rightly so). I replied, &amp;#8220;Once their side of the system is done, we should be able to send our calls across.&amp;#8221;  Then we received three more similar stories, but different system calls.  We did them, removed the duplication and felt really good about the job we did.  The came their test server.&lt;/p&gt;

&lt;p&gt;Nothing worked!  There were all sorts of communication problems, questions about who implemented the system to what spec, and political questions.  Despite us thinking we were in the right, the stories were signed and the customer said, &amp;#8220;Well, you said this would work.&amp;#8221;  At first, I tried to communicate the reason why it didn&amp;#8217;t work, and how we can move forward.  We came to spend a lot of time on this, and the team felt the integration should be its own story.  The customer pushed back, &amp;#8220;Well, you said this would work.&amp;#8221;  There was some tension, because both sides were right.  We didn&amp;#8217;t believe it was our fault it didn&amp;#8217;t work (neither did the customer), but we told them it would.  Rather than let out the righteous indignation I was feeling, one of the team members mentioned.&lt;/p&gt;

&lt;p&gt;&amp;#8220;We should not have assured you it would work.&amp;#8221;&lt;/p&gt;

&lt;p&gt;That one line brought the real problem to the front for both sides.  We didn&amp;#8217;t know whether it would work or not, just that we wrote the right code to the specification we had at the time.  That code by itself has no value to the customer without it working, though.  Once that line was said, everyone in the room sat for a second, then understood.  The expectation over defect versus behavior was out of sync.  A little ownership over the defect was all we needed to ease the tension and move forward.  It is unproductive to get stuck in a stalemate of expectations.  When in doubt, the customer is always right.&lt;/p&gt;</description>
      <pubDate>Tue, 24 Jun 2008 06:13:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:cb09b310-eb94-4da9-9200-f289d8416d74</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/06/24/some-thoughts-on-software-defects</link>
      <category>Craftsmanship</category>
      <category>Process</category>
      <category>Paul</category>
      <category>Bugs</category>
    </item>
    <item>
      <title>Active Record migration dependencies</title>
      <description>&lt;p&gt;We had a new developer join our project recently, and he needed his computer to be setup with the project.  &amp;#8220;Here is the svn repository, when you check it out, run these rake tasks.&amp;#8221;  It unfortunately, is never that easy.  This project setup revealed something about Active Record and migrations that I didn&amp;#8217;t know about.&lt;/p&gt;

&lt;p&gt;When I create a migration, I will often do data manipulation on the database, or pre-populate some fields with data needed for a lookup table.  Lets look at a sample migration from a trivia game.&lt;/p&gt;

&lt;pre&gt;
class CreateQuestions &lt; ActiveRecord::Migration

  def self.up

    create_table :questions do |t|
      t.column :text, :string
      t.column :answer, :string
      t.timestamps
    end

    Question.populate
  end

  def self.down
    drop_table :questions
  end
end

&lt;/pre&gt;

&lt;p&gt;I want to add some sample questions, so that even if you don&amp;#8217;t have your own questions, you will still be able to play the game.  I added the method to the populate model, because I use it elsewhere in the code, and I try to keep it DRY.  The populate method on the question model looks like this:&lt;/p&gt;

&lt;pre&gt;

class Question &lt; ActiveRecord::Base
  belongs_to :game
  has_many :answers

  def self.populate
    Questions.create(:name =&gt; "What is your favorite color?", :answer =&gt; "I don't know")
    Questions.create(:name =&gt; "Who was the first President", :answer =&gt; "George Washington")
    Questions.create(:name =&gt; "Who was born Samuel Clemens?", :answer =&gt; "Mark Twain")
  end

end
&lt;/pre&gt;

&lt;p&gt;So, later on, I decided to add a degree of difficulty to the questions, so the players can get more points for answering harder questions.  Here is what the migration looked like.&lt;/p&gt;

&lt;pre&gt;
class CreateQuestions &lt; ActiveRecord::Migration

  def self.up
    add_column :questions, :rank, :integer
    Question.destroy_all #In case there are any old ones
    Question.populate
  end

  def self.down
    remove_column :questions, :rank
  end
end
&lt;/pre&gt;

&lt;p&gt;Of which I had to change the populate method on the question class to:&lt;/p&gt;

&lt;pre&gt;
class Question &lt; ActiveRecord::Base
  belongs_to :game
  has_many :answers

  def self.populate
    Questions.create(:name =&gt; "What is your favorite color?", :answer =&gt; "I don't know", :rank =&gt; 1)
    Questions.create(:name =&gt; "Who was the first President", :answer =&gt; "George Washington", :rank =&gt; 3)
    Questions.create(:name =&gt; "Who was born Samuel Clemens?", :answer =&gt; "Mark Twain", :rank =&gt; 8)
  end

end
&lt;/pre&gt;

&lt;p&gt;Then I ran my migrations, and continued development.  Then when developer number 2 came across and checked out the project and ran the migrations, he got the error.&lt;/p&gt;

&lt;p&gt;undefined method rank= for class Question (&amp;#8230;or something very similar)&lt;/p&gt;

&lt;p&gt;The problem is the old migration is dependent on the new model.  All models in rails are just a mirror of the database, so the new model has a forward definition of the data.  The code in the model knows about the rank field, but the schema of the database hasn&amp;#8217;t caught up to create that portion of the mirror yet.  This creates a little bit of a catch 22.  The rails wiki (http://wiki.rubyonrails.org/rails/pages/UsingMigrations) about migrations tells you to redefine the class to stop name conflicts.  This would require me to make my migrations model agnostic, inserting straight to the database.  As a spoiled brat when it comes to databases and rails, I refuse to let go of my Active Record sugary syntax.  Another solution I thought of is to just make the last change to question do the populate, and remove it from the previous versions.  This will become a maintenance nightmare.&lt;/p&gt;

&lt;p&gt;I came to the realization that I want to make a distinction between form and content when it comes to migrations.  Form in this case is schema form, the changes to the database which reflect the data which the Active Records can potential hold.  Content is the specific data which is in the database.  This distinction allows for me to use the power of my model classes in my data migrations, which is the place it is useful.  It maintains backwards compatibility, because before I go touching the data, I have to make sure my schema is right.&lt;/p&gt;

&lt;p&gt;What does this look like in Rails?  I am not sure yet.  Possibly db/migrations/schema and db/migrations/data.  Possible saving the data migrations in each migration as a block and executing those at the end, only when you have the schema is correct.  I am going to try it out!&lt;/p&gt;</description>
      <pubDate>Sat, 14 Jun 2008 02:38:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a2f74c84-789c-4b60-86fb-2ac683c00831</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/06/14/active-record-migration-dependancies</link>
      <category>Coding</category>
      <category>Paul</category>
      <category>Migrations</category>
      <category>Ruby</category>
    </item>
    <item>
      <title>Code Less: A Language Keystroke Expirement </title>
      <description>&lt;p&gt;When I first started writing code in ruby, it was a breath of fresh air after writing C# code for a year.  Ruby had a thesis, a clear purpose, rather than a hodgepodge of features strung together.  It was a language obviously written by someone who cared about what the code looked like.  So I jumped into it and loved writing ruby code (still do!).  Recently I had to write a project in Java using IntelliJ, and the powerful IDE was also a breath of fresh air after using text editors to write ruby code.  The IDE helps me in the same way ruby helped me.  I write less code that does the same thing, without loosing expressiveness or transparency of intent.  Less code in this case meaning less keystrokes.&lt;/p&gt;

&lt;p&gt;So, I am going to do a little experiment using two editors and languages: ruby with textmate and java with IntelliJ.  I want to see how many lines of code I have to write.  The application I am going to start is a simple baseball at bat scorer.  First lets see the ruby version.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img style="border: 0px;" src="/files/ruby_first.gif"/&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;We have about 27 lines of code written, and other than the describe method, which I have a macro for, I typed them all by hand.  Lets look at the java code.  This is just the JUnit test I wrote, there is no production code yet.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img style="border: 0px;" src="/files/java_orig_test.gif"/&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;It is about 16 lines of code, which I wrote all of but the import statement.  By doing a few alt-enters on the squiggly lines, I can get a stub of a class looking like this.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img style="border: 0px;" src="/files/java_class_stub.gif"/&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;That is 13 more lines of code, without really typing, just hitting enter a few times.  Now, lets start to make the method pass.  I am going to write the algorithm without worrying about all the type definition java wants.  Here is what it looks like.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img style="border: 0px;" src="/files/starting_class.gif"/&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;So the code written is around 4 lines of code.  Lets use the IntelliJ autocomplete features to help us make a passing test, which looks like.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img style="border: 0px;" src="/files/java_finished.gif"/&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;So roughly, the ruby version was 23 lines of written code and the java version was about 20 lines of written code.  There is an expense to doing all of the alt-enters to auto-generate the method and variable stubs, but IntelliJ is pretty smart about what it generates.  Also, I understand a single test doesn&amp;#8217;t tell the whole story, but it is a good indication.  I found as I wrote more tests for this application, a smaller amount of keystrokes was needed for the java version, and the same amount was needed for ruby.  This is due to the refactoring tools, and intellisense.  As applications get larger, I find the IntelliJ refactorings become more useful.  Inversely, ruby refactorings become more painful, as they are mostly done by hand.  &lt;/p&gt;

&lt;p&gt;So, in the end the constraints on a static language allows the IDE to make the refactoring tools better.  Specifically, when writing java code, I can lean on the IDE to generate all the uninteresting stubs for me.  All I do is fill in the algorithms: the fun part.  When I start to see places where my code can be cleaned up a bit, I can lean on the IDE again to do those refactorings for me once I recognize the need for them.  Removing and optimizing the code is something which is easily deducible in static languages, as it is mostly pattern matching, with no monkey patches, meta-programming, and evals to worry about.  This is a limitation which frustrates me as a developer who wants to have a large set of tools in my bag, but is helpful when it comes to developing a powerful IDE.  &lt;/p&gt;

&lt;p&gt;The number of lines of code I need to type isn&amp;#8217;t the reason I choose a language over another.  In fact, it would be pretty low on the list of deciding factors.  However, it is interesting to see what each language and its sets of tools do best.  Hopefully the ruby community can take some notes from them.  I would rather solve the other end of the equation, get a powerful ruby IDE.  I know Eclipse and Net Beans have some preliminary refactoring tools, but they are still aways from being as seamless as their java counterparts.&lt;/p&gt;</description>
      <pubDate>Sun, 08 Jun 2008 18:06:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a89cc279-825b-4aac-aa2c-aff5ec4cfd3d</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/06/08/code-less-a-language-keystroke-expirement</link>
      <category>Coding</category>
      <category>Paul</category>
      <category>Ruby</category>
      <category>Java</category>
    </item>
    <item>
      <title>Wake up and code!</title>
      <description>&lt;p&gt;The other day, I was with my team at an interview for an internship.  After we had asked the candidate some questions, he started to reciprocate, asking each one of us a little about our development past.  Every one of the developers stories went something like, I was at the wrong job, and had to get out.  The candidate listened carefully to each story, sat for a minute, then asked the obvious perfect question, &amp;#8220;What makes the right job?&amp;#8221;  &lt;/p&gt;

&lt;p&gt;I heard responses like &amp;#8220;Waking up in the morning and being excited to work, rather than counting the days until the weekend.&amp;#8221;  The reason this struck me as interesting was only when I reflected back to why I loved computers and programming in the beginning.  It was all about the problem.  I went to college, so I could join the CIA or some think tank which wrote software which monitored and defeated the enemies entire world.  About every developer I went to college with got into computer science with some similar grandiose notion.  Most of them were gamers that wanted to work on the next big game.  Yet today, I know no developer who works on games, and I don&amp;#8217;t work for a think tank.  I know lots of developers who are more than qualified to do it, but choose not to.  So, how does this relate to the right job question?&lt;/p&gt;

&lt;p&gt;The answers about the right job question had nothing to do with the problem set being solved either.  Nothing to do with WHAT applications were being written, but the culture and with whom they are being written.  I think this is because each problem set worth application development proposes unique and interesting problems for a developer to solve.  I have never been on a project which didn&amp;#8217;t constantly keep me on my toes as far as problems to be solved.  Even if the business domain is a bit bland, the development domain isn&amp;#8217;t.  I have seen developers to do lists get bigger and bigger from day one on a project, and never shrink.  This has nothing to do with laziness, quite the opposite, it has to do with an insatiable drive to make things better than they are.&lt;/p&gt;

&lt;p&gt;As a developer, my problem set isn&amp;#8217;t the business/science problems I am solving, even though that might be interesting in itself.  My problem set is development itself, the different patterns/practices I use to solve the world&amp;#8217;s [software] problems.  It is like many art forms where the beauty and creativity exists in the process of creation rather than the results.  I am sure you could have asked Pablo Picasso to paint something he didn&amp;#8217;t have any interest in, and he would have been passionate about it and done a wonderful job.  I suspect it is because the importance is in the painting process and the choices you make during each step.  How he chooses to depict the subject is more interesting more than the nature of the subject itself.  I find the same true in development.  The thought that goes into the different development choices I make on a daily basis is the part that drives me to love development. &lt;/p&gt;

&lt;p&gt;Having the right results is only part of the equation (an essential part though).  When I started my path as a developer craftsman, I learned the WHAT in applications is not as important as all the other variables.  I suspect some of the other members on my team would agree, based on their answers to the right job question.  Being part of a company that values the software for its own ends and spends the time and attention to do it right is a privilege to me.  To me, that is the definition of the right job.  I enjoy knowing my software will be used.  Everything I write is valuable to the company for its longevity and success.  It takes people who are similar in values for it to work, but it makes the work fun.  It makes me wake up before my alarm, rather than snoozing.&lt;/p&gt;</description>
      <pubDate>Fri, 09 May 2008 00:34:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c1da41df-47d9-4dec-825e-6dccf0a68e29</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2008/05/09/wake-up-and-code</link>
      <category>Coding</category>
      <category>Etiquette</category>
      <category>Paul</category>
    </item>
    <item>
      <title>Ruby and the Art of Computer Programming</title>
      <description>&lt;p&gt;Recently, I started to read the &lt;a href="http://www.amazon.com/Art-Computer-Programming-Volumes-Boxed/dp/0201485419/ref=pd_bbs_sr_1/104-8075516-3966305?ie=UTF8&amp;amp;s=books&amp;amp;qid=1194361896&amp;amp;sr=8-1"&gt;Knuth&amp;#8217;s Art of Computer Science&lt;/a&gt;.  To spice up the exercises, I am writing them out in ruby.  Thinking about the basic math of programming and how to implement it in a high level language like ruby has been fun.  The evolution of programming languages has gone far since the book was written.  We can use cool new ruby syntax to do multiple steps in an algorithm!&lt;/p&gt;

&lt;p&gt;Also, this is an exercise in writing clean code.  Some of the algorithms in the book are a bit hard to read in there pure math form.  So, when I write them out in ruby, I try to use as much expressiveness without adding clutter.  This is no easy task, and often times I have to walk away from an algorithm for awhile and come back to it, because I will have my head deep in the math and less in the code. Or vice versa.&lt;/p&gt;

&lt;p&gt;I was showing  one of my solutions to a colleague of mine, &lt;a href="http://blog.8thlight.com/doug"&gt;Doug Bradbury&lt;/a&gt;, who saw a better way in ruby to solve the same problem I was with less lines of code and a higher readability.  So, I decided to share one of the problems, and in a few days, I will post my version of the solution.  We can see different solutions in different languages and different styles.  Go ahead and try it out.&lt;/p&gt;

&lt;p&gt;Here is the algorithm as written in the book.&lt;/p&gt;

&lt;p&gt;This is Euclid&amp;#8217;s Algorithm for the greatest common divisor&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
E0 [Ensure m &gt;= n.] If m &amp;lt; n, exchange m &amp;lt;--&gt; n.&lt;br&gt;
E1 [Find remainder.] Divide m by n and let r be the remainder.  (We will have 0 &amp;lt;= r &amp;lt; n.)&lt;br&gt;
E2 [Is it zero?]  If r = 0, the algorithm terminates;n is the answer.&lt;br&gt;
E3 [Reduce.]  Set m &amp;lt;- n, n &amp;lt;- r, and go back to step E1.&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;UPDATE: Here is a solution&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;

def are_whole_numbers?(*numbers)
  numbers.each {|number| return false if number.to_i.to_f != number}
  return true
end

def euclid(m, n)
  raise "Must be whole numbers." unless are_whole_numbers?(m, n)
  return euclid(n, m) if m &lt; n

  remainder = m % n

  return n if remainder == 0
  return euclid(n, remainder)
end

#Here are some examples
puts euclid(35.0, 40.0) #should be 17.0
puts euclid(119.0, 544.0) #should be 17.0
puts euclid(555.0, 666.0) #should be 111.0

&lt;/pre&gt;</description>
      <pubDate>Tue, 06 Nov 2007 15:09:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d1449d6a-dd78-4345-8442-b35f58b442ac</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2007/11/06/ruby-and-the-art-of-computer-programming</link>
      <category>Coding</category>
      <category>Paul</category>
    </item>
    <item>
      <title>Self Shunt</title>
      <description>&lt;p&gt;The self-shunt method of testing has been conflicting for me.  Self-shunt is a good testing pattern to test observers/views.  A colleague of mine has started to convince me that self-shunt has some serious drawbacks.  I want to explore the different ways to address the same pattern and how they fit into the test process and the test content.  Are certain patterns easier to write and certain ones have a better final form?&lt;/p&gt;

&lt;p&gt;Lets look at some code from Michael Feathers self shunt paper (see bottom for link).  I extended it to do the mocking examples.  The user story we are working with is the name of an item must be displayed on the led when the item is scanned.  &lt;/p&gt;

&lt;p&gt;Writing all of the tests did not require a concrete window (Display).  We didn&#226;&#8364;&#8482;t need to create the stub of the file to use; we could just use the interface.  All the test patterns let the test be isolated in the test class/interface/production class triad.  As a developer, it is easier for me to produce faster without quality loss if my context of thought is limited as much to the scope of the test as possible.  Each extra window I switch is more contexts to deal with. &lt;/p&gt;

&lt;p&gt;Here are three different tests:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;public class ScannerTest extends TestCase implements Display
{
    private Item lastItem;

    public void testScan()
    {
        Item item = new Item(&amp;quot;corn flakes&amp;quot;);
        Scanner scanner = new Scanner(this);
        scanner.scan(item);
        assertEquals(item,lastItem);
    }

    public void displayItem(Item item)
    {
        lastItem = item;
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The first test is making user of self-shunt test.  Self-shunt was a quick way to start writing a test.  The implementation on the interface in the test class will give you a good idea on what the implementation of the concrete class should look like when you get there.  Also, the test is simple and the syntax is expressive.  However, the scalability is questionable.  If you had more than one self-shunted interface in a single test file, it would be hard to start differentiating between which variables are used in which.  Also, moving around the file to get a good sense of what a test is doing is misdirectional and distracting.  Ideally, I want to see the entire test on one screen, so I can read it.  If there were many implemented methods in a test file that were not tests or helpers, there is the potential to be confused.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;public class ScannerTest   extends TestCase
{
    public void testScan()
    {
        Item item = new Item(&amp;quot;corn flakes&amp;quot;);
        Display mockDisplay = new MockDisplay();
        Scanner scanner = new Scanner(mockDisplay);
        scanner.scan(item);
        assertEquals(item,((MockDisplay)mockDisplay).lastItem);
    }
}

public class MockDisplay implements Display
{
    public Item lastItem;
    public void displayItem(Item item)
    {
        lastItem = item;
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then I wrote the hand mock test.  This test got rid of the clutter of implementing interfaces in the test and having local variables.  Also, there are no external libraries needed, like a dynamic mocking library.  The test is simple and easy to read.  The biggest drawback is dealing with the hand mock test file.  It is untested code that I have seen a tendency for behavior to slip into, which is disastrous.  It can cause a bug in your tests that take too long to track down.  Ideally this doesn&#226;&#8364;&#8482;t happen, but I have seen it many times. &lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;public class ScannerTest extends TestCase
{
   public void testScan()
   {
       MockControl control = MockControl.createControl(Display.class);
       Display mockDisplay = (Display) control.getMock();
       Item item = new Item(&amp;quot;&amp;quot;);
       mockDisplay.displayItem(item);
       control.replay();
       Scanner scanner = new Scanner(mockDisplay);
       scanner.scan(item);
       control.verify();
   }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally the dynamic mock test was written.  This test was the simplest to write as a matter of process also the fewest lines of code.  I never needed to leave the scope of the test function.  It was just setting up my expectations and letting the test run.  As Micah Martin pointed out to me, the test execution seems backwards and unreadable with dynamic mocks.  The verification statements are at the beginning of the method and the execution is at the end.  This is different than all the other tests in the system that follows an intuitive flow cycle of build, operate, and check.  &lt;/p&gt;

&lt;p&gt;With a little investigation I found Michael Feathers paper on Self Shunt 
(www.objectmentor.com/resources/articles/SelfShunPtrn.pdf).&lt;/p&gt;</description>
      <pubDate>Mon, 11 Sep 2006 16:06:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5643067c-49bc-4f68-910e-f6baf1b097c7</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2006/09/11/self-shunt</link>
      <category>Coding</category>
      <category>Testing</category>
      <category>Paul</category>
    </item>
    <item>
      <title>Sentential Testing</title>
      <description>&lt;p&gt;In a project I have been working on, we recently decided to allow wrapped assertions to customize our unit tests. Our purpose was to make the unit tests be sentential enough to explain the meaning of the assertion in the execution of the assertion.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;We can&amp;#8217;t get rid of all developer comments (variable and method names) because, if we did, we would lose the ability to easily read and, consequently, easily maintain the code. In fact, writing easily readable code is a primary goal of good practices, since it is directly correlated with making code easily maintainable.  This is important because maintenance is the most expensive part of the development process. However, we must be cautious about writting comments, since they can often have the opposite effect&#226;&#8364;&#353; less maintainable code&#226;&#8364;&#353; when they are misrepresentations or plain lies. There is a balance that results in easily read and understood tests.  Investing in writing tests to tell a story to the developers who may have to look at the tests in the future, makes maintenance and TDD easier and with a better flow.&lt;/p&gt;

&lt;p&gt;We chose to achieve this balance by merging the assertions with the comments of the execution of the test, resulting in a pseudo-sentence. The statement is an explanation for the next developer to read. The form we chose is&lt;/p&gt;

&lt;p&gt;Verify.That(positiveAssertionString).ProvedBy(subject).verb(predicate);&lt;/p&gt;

&lt;p&gt;An example of one of these assertions is
&lt;br&gt;
&lt;br&gt;
public void test_PressingBrakesShouldDecelerateVehicle()&lt;br&gt;
{&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; int originalSpeed = vehicle.currentSpeed;
 vehicle.brake();

 Verify.That(&#226;&#8364;&#353;"Brakes decelerate vehicle.").ProvedBy(vehicle.currentSpeed).IsLessThan(originalSpeed);&amp;lt;br&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;} 
&lt;br&gt;&lt;br&gt;
When a developer comes across this story, along with PressingEmergencyBrakeLocksTires(), SlamOnBrakesShouldSkid(), and BrakesShouldAntiLockAtIntervals(), the developer is told a story of what the class is doing. Why do we use custom asserts when good test names will solve the problem? &lt;/p&gt;

&lt;p&gt;Changing tests should be cheap. As new designs and behavior evolve in the system, tests are changed to conform to the new structures. When implementing a new design to an existing system (such as breaking up an inheritance in favor of composition), I change the tests to fit the new structure on a macro level. However, this often implies that I am changing the behavior (if only slightly) to please the new design. Yet, test names, like comments, are not executable, so you can&#226;&#8364;&#353;&amp;#8217;t trust them to tell you what the tests test. On a system with heavy refactorings, a test might have its details changed five times without the developer thinking to verify the integrity of the names. An answer is to write sentential explanation of the test as the assert statement since the assert statement executes.  I will trust execution over comments every time.&lt;/p&gt;

&lt;p&gt;There is a project in its early stages called NSpec(.NET), which is a framework for assertions of a more sentential form.  The project is based on the idea of Behavior Driven Development (BDD).  RSpec, the same project for ruby has a form of BDD assertions which take full advantage of the features of the dynamic language.  It allows you to add the assertion to the object from the test.&lt;br&gt;&lt;br&gt;
&lt;b&gt;For example:&lt;/b&gt;
&lt;br&gt;
def pressing&lt;em&gt;brakes&lt;/em&gt;should&lt;em&gt;decelerate&lt;/em&gt;vehicle &lt;br&gt;
    vehicle.brake&lt;br&gt;
    vehicle.decelerating?.should_be_true &lt;br&gt;
end&lt;br&gt;&lt;br&gt;
This is really cool!  It defines the test as behavior of the object, which it is.  However, when the code isn&#226;&#8364;&#353;&#195;&#8222;&#195;&#180;t ruby, there needs to be other means in place to bind the description of the assertion to something which executes.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
Fri, 20 Jan 2006 05:37:12, nraynaud, Tests in a changing world
You&amp;#8217;re right, we are slowly going to agile world, and for now we have lots of meaningless test taken randomly from existing code (does it makes sense putting a multi megabytes source file in the compiler you test and expecting exactly 2008 errors? without even covering 10% of the compiler). We work on a language, yesterday, I added a restriction to the langugage, it took me 10 minutes to implement and test the change but the rest of the day to change all the others tests. &lt;/p&gt;

&lt;p&gt;Moreover, I thank Intellij Idea that renames not only classes but also varialbes named after that class and even comments, this is on the way you takes.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Fri, 20 Jan 2006 13:13:22, David Chelimsky, should_be_decelerating
I&amp;#8217;ve just submitted a contribution to rspec that will make this even cooler. If vehicle can respond to any of these messages with a boolean value:
vehicle.decelerating&lt;br&gt;
vehicle.decelerating?&lt;br&gt;
vehicle.is_decelerating&lt;br&gt;
vehicle.is_decelerating?&lt;br&gt;
then you can write this in your test:&lt;br&gt;
def pressing&lt;em&gt;brakes&lt;/em&gt;should&lt;em&gt;decelerate&lt;/em&gt;vehicle&lt;br&gt; 
    vehicle.brake&lt;br&gt;
    vehicle.should_be_decelerating&lt;br&gt;
end&lt;br&gt;
Admittedly, this may be confusing to a programmer who is looking for a &amp;#8220;should_be_decelerating&amp;#8221; method on vehicle, but the messaging is clear it fails (&amp;#8221;&lt;is_decelerating?&gt; should be true&amp;#8221;) and it definitely improves the communication of intent. If you&amp;#8217;re doing BDD (i.e. spec-first), you&amp;#8217;ll get a !-NoMethodError-! on &amp;#8220;decelerating&amp;#8221;. Then it&amp;#8217;s up to you to implement a method responding to any of the forms described above.
&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Fri, 20 Jan 2006 13:57:32, , 
How about using Higher Order Messaging style and let the user write:
&lt;br&gt;
  vehicle.should_be.decelerating?
&lt;br&gt;
The test framework could mix should_be and similar higher-order messages into the Kernel module.
&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Fri, 20 Jan 2006 14:40:41, David Chelimsky, should_be
That&amp;#8217;s kind of how rspec works now. should&lt;em&gt;equal, should&lt;/em&gt;contain, should&lt;em&gt;be_true, etc are all mixed in to Object, so you can do things like some&lt;/em&gt;object.some&lt;em&gt;attribute.should&lt;/em&gt;be&lt;em&gt;true. Your suggestion of tying it to a &amp;#8220;should&lt;/em&gt;be&amp;#8221; method (rather than parsing the should&lt;em&gt;be_xxx message) might be more clear. I think, though, that &amp;#8220;should&lt;/em&gt;be.decelerating?&amp;#8221; is weird to read (because of the question mark). Programatically, however, it does make the statement look more like the implementation. I&amp;#8217;ll think on it some more&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Sun, 06 Aug 2006 04:51:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:25120787-58d3-4724-8e82-ea9aa733581b</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2006/08/06/sentential-testing</link>
      <category>Testing</category>
      <category>Paul</category>
    </item>
    <item>
      <title>PreFactoring</title>
      <description>&lt;p&gt;Prefactoring is when you see a piece of code which the story you are working on which has a refactorings which would make your story easier.  I have seen prefactoring to be a dangerous process.  On one hand, you save time when you know that this refactorings will need to be done.  You are faced with the choice of writing temporary code (in the sense of duplicate then refactor) or refactoring, then writing quality code.  The software designer in me always wants to choose the prefactoring solution, since it gets to make code cleaner, remove duplication, and be more efficient.  Then I can stand on the mountain top waving my flag.
&lt;br&gt;    &lt;br&gt;
There are a few problems right off the bat.  First, the uber-developer in all of us will refactor as much as we can, therefore refactor based scope creep is bound to show up.  I don&amp;#8217;t really know how to stay away from scope creep in this manner.
    &lt;br&gt;    &lt;br&gt;    &lt;/p&gt;

&lt;p&gt;Prefactoring can lead to a version of design up front which is detrimental if you don&amp;#8217;t need it.  However, sometimes you know up front this design simplification will cut the story time in half.  Do you prefactor?  What kinds of smells make it ok or terrible to prefactor?
    &lt;br&gt;    &lt;br&gt;    &lt;/p&gt;

&lt;p&gt;I have tried backing my way in and using test(s) as a life jacket, so once the test passes, the refactoring is done.  However, the problem with this is it leaves me with half done refactorings.  The code is constantly moving up in quality, however, it might not look it due to the inconsistencies produced by half done refactorings.  I generally think of a complete refactorings as something that made my system better in some manner I would like developers who are extending the behavior of the system to use the refactorings as a model. &lt;/p&gt;

&lt;p&gt;&lt;br&gt;    &lt;br&gt;&lt;br/&gt;
Do my refactorings make the system easier to extend?  Half-factorings don&amp;#8217;t, but they do provide a manageable slope moving positive.  I don&amp;#8217;t have the time to tackle the big refactorings, but I don&amp;#8217;t want to leave them unfinished.  &lt;/p&gt;

&lt;p&gt;&lt;br&gt;    &lt;br&gt;    &lt;/p&gt;

&lt;p&gt;Wed, 22 Mar 2006 09:27:50, Uncle Bob, Half-factorings
Paul,
Keep the code clean!  If the tests pass when the refactoring is half-done, then complete the refactoring. If you can&amp;#8217;t complete the refactoring in this iteration, then keep putting effort into it during subsequent iterations.  Make sure the team knows, so they can put some effort in too.&lt;/p&gt;

&lt;p&gt;There are often times when a new story is easier to implement in a structure different from the one that exists.  Refactoring (or &amp;#8220;pre-factoring&amp;#8221;) the system into that new structure to make that story easy to implement is often a good approach.  However, leaving the refactoring in a half-finished state is messy.
&lt;br&gt;    &lt;br&gt;&lt;br/&gt;
 Wed, 22 Mar 2006 18:30:36, Micah Martin, Prefactor
&amp;#8221;&amp;#8217;Prefactor&amp;#8221;&amp;#8217; - I like that.  If I counted all the time I&amp;#8217;ve had to delete my prefactored code&amp;#8230;. I believe there&amp;#8217;s an Big Up Front Designer in all of us.  Face it, BDUF is fun!  Frequently I look at a prefactoring that I&amp;#8217;ve just completed and realize I&amp;#8217;ve been BDUFfing.  Most of the time I delete it all because it&amp;#8217;s too complex and unnecessary.
&lt;br&gt;    &lt;br&gt;    &lt;/p&gt;

&lt;p&gt;Sun, 23 Jul 2006 08:14:08, Sebastian Kubeck, BDUF
To be honest, I never got BDUF right. Untill today, I need to start over one to four times untill I get what I want.
I was convinced that I&amp;#8217;m just lacking the skills to get it right the first time.
Fortunately, I found out that people that are much smarter and much more experienced than me don&amp;#8217;t get it right the first time either.&lt;/p&gt;

&lt;p&gt;I learned in school that Mozart just wrote down his music which was already completely finished in his head. I was toled later that this is just another myth about this guy. Beethoven permanetly adapted his works. His handwritings are hard to read because his corrections. Bach adapted his works depending on the number of musiciants he could afford.&lt;/p&gt;

&lt;p&gt;Conclusion: If not even the geniuses mentioned above get it right the first time, how should we &amp;#8220;ordinary people&amp;#8221; should ever be able to do it?&lt;/p&gt;</description>
      <pubDate>Sun, 23 Jul 2006 04:46:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:54df1a49-d00c-415b-a992-a2ee19231c51</guid>
      <author>Paul Pagel</author>
      <link>http://blog.8thlight.com/articles/2006/07/23/prefactoring</link>
      <category>Process</category>
      <category>Paul</category>
    </item>
  </channel>
</rss>
