<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>refactor &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/refactor/</link>
	<description>Feed of posts on WordPress.com tagged "refactor"</description>
	<pubDate>Sun, 29 Nov 2009 06:46:54 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Refactor or Rewrite]]></title>
<link>http://riaansnyders.wordpress.com/2009/11/25/refactor-or-rewrite/</link>
<pubDate>Wed, 25 Nov 2009 04:12:13 +0000</pubDate>
<dc:creator>riaansnyders</dc:creator>
<guid>http://riaansnyders.wordpress.com/2009/11/25/refactor-or-rewrite/</guid>
<description><![CDATA[InfoQ article on what it really means to refactor or rewrite. Good read: &nbsp; http://www.infoq.com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>InfoQ article on what it really means to refactor or rewrite. Good read:</p>
<p>&#160;</p>
<p><a href="http://www.infoq.com/news/2009/11/refactor-rewrite">http://www.infoq.com/news/2009/11/refactor-rewrite</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Object Oriented Java source for Amazon Stats]]></title>
<link>http://stanishjohnd.wordpress.com/2009/11/18/object-oriented-java-source-for-amazon-stats/</link>
<pubDate>Wed, 18 Nov 2009 19:08:15 +0000</pubDate>
<dc:creator>John Stanish</dc:creator>
<guid>http://stanishjohnd.wordpress.com/2009/11/18/object-oriented-java-source-for-amazon-stats/</guid>
<description><![CDATA[I have been thinking about the Java source for the Amazon Stats scenario that I also wrote in Perl, ]]></description>
<content:encoded><![CDATA[I have been thinking about the Java source for the Amazon Stats scenario that I also wrote in Perl, ]]></content:encoded>
</item>
<item>
<title><![CDATA[NetBeans Refactoring - Part 1]]></title>
<link>http://significantinsignificance.wordpress.com/2009/10/30/netbeans-refactoring-part-1/</link>
<pubDate>Thu, 29 Oct 2009 22:29:58 +0000</pubDate>
<dc:creator>aelsadek</dc:creator>
<guid>http://significantinsignificance.wordpress.com/2009/10/30/netbeans-refactoring-part-1/</guid>
<description><![CDATA[This week I decided to give you, my dear readers, a little rest from my blabbering and go technical ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a href="http://www.netbeans.org/"><img class="aligncenter" title="Splash Screen" src="http://i625.photobucket.com/albums/tt337/aelsadek/Splash.jpg" alt="" width="428" height="269" /></a></p>
<p>This week I decided to give you, my dear readers, a little rest from my blabbering and go technical a bit. I am going to talk about a very powerful and a personal favorite NetBeans feature: Refactoring.</p>
<p>If you do not know NetBeans, it is a free, cross-platform, open-source Integrated Development Environment (IDE) for software developers and a product of Sun Microsystems. An IDE is a software application that provides extensive facilities to programmers for software development, such as a source code editor, a compiler, an interpreter, build automation tools, and a debugger. For more information about NetBeans’ features, <a href="http://www.netbeans.org/features/index.html">visit the official website</a>.</p>
<p>Refactoring is about changing your source code easily. Imagine moving a class between packages and having to edit the package statements manually at the top of each file, or wanting delete a variable in the code and not knowing if it is referenced somewhere else in your application. Performing these types of operations manually can be time consuming and prone to error. However, with the advanced refactoring capability available in NetBeans, you can do such changes very easily. NetBeans provides many refactoring options on its Refactor menu. I am going illustrate half of them today and the other half in a following post.</p>
<p>For this post I have created two classes, ImportingClass and MoveClass. View them <a href="http://i625.photobucket.com/albums/tt337/aelsadek/ImportingClass.jpg">here</a> and <a href="http://i625.photobucket.com/albums/tt337/aelsadek/ImportingClass.jpg">here</a>.</p>
<p>There are some images that are not very clear because of page size limitations. You can click on any image to see it in full size.</p>
<p><strong>Rename:</strong></p>
<p>Rename refactoring allows you to change not only the name of the class but also any constructors, internal usages, and references to the renamed class by other classes. You can also rename the package, which will automatically rename all instances of the package name in your code, including comments. Here, I am going to change the name of the variable value to AddedValue in class ImportingClass:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Rename1.jpg"><img class="aligncenter" title="Rename 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/Rename1.jpg" alt="" width="717" height="451" /></a></p>
<p><strong> </strong></p>
<p style="text-align:left;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Rename2.jpg"><img class="aligncenter" title="Rename 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/Rename2.jpg" alt="" width="715" height="450" /></a></p>
<p style="text-align:left;">Automatically, the variable name is also changed in class MoveClass:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Rename3.jpg"><img class="aligncenter" title="Rename 3" src="http://i625.photobucket.com/albums/tt337/aelsadek/Rename3.jpg" alt="" width="716" height="451" /></a></p>
<p><strong>Move:</strong></p>
<p>Moving a class from one package to another may seem like an easy task; you just have to copy and paste the contents of the source file into the new directory and then edit the package statement at the top of the file then you are good to go. However, if other classes import or reference that class, then the developer must also search through and modify those files. Here is how you can move MoveClass from the refactoringpackage2 package to refactoringpackage1:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Move1.jpg"><img class="aligncenter" title="Move 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/Move1.jpg" alt="" width="716" height="456" /></a></p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Move2.jpg"><img class="aligncenter" title="Move 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/Move2.jpg" alt="" width="716" height="452" /></a></p>
<p><strong>Copy:</strong></p>
<p>Copy refactoring allows you to copy the contents of a class to another package, automatically changing the package statement at the top of the source file.</p>
<p><strong>Safe Delete:</strong></p>
<p>Sometimes when you are reviewing a previously written code, you decide to remove a class member variable that you think is not used, only to find out that it does indeed appear in your code, and then your class does not compile. With Safe Delete refactoring, you can identify each usage of a class, method, or field in code before deleting it. I am going to illustrate it by trying to delete the AddedValue variable from class ImportingClass:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Delete1.jpg"><img class="aligncenter" title="Delete 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/Delete1.jpg" alt="" width="716" height="453" /></a></p>
<p>However, the variable was referenced in class MoveClass, so deleting it would cause an error. T=NetBeans alerts you to that, and can even show you where the member you want to delete is referenced if you clicked the &#8220;Show Usages&#8230;&#8221; button:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Delete2.jpg"><img class="aligncenter" title="Delete 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/Delete2.jpg" alt="" width="716" height="451" /></a></p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Delete3.jpg"><img class="aligncenter" title="Delete 3" src="http://i625.photobucket.com/albums/tt337/aelsadek/Delete3.jpg" alt="" width="715" height="451" /></a></p>
<p><strong>Change Method Parameters:</strong></p>
<p>Change Method Parameters allows you to safely change everything in a method header- access modifier and arguments- and notifies you if this change is going to affect your source file. Here, I am going to try to delete the parameter x of the display method of class ImportingClass:</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod1.jpg"><img class="aligncenter" title="Change 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod1.jpg" alt="" width="716" height="453" /></a></p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod2.jpg"><img class="aligncenter" title="Change 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod2.jpg" alt="" width="716" height="454" /></a></p>
<p>Parameter x is used within the method body, and so a warning is displayed:</p>
<p><a href="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod3.jpg"><img class="alignnone" title="Change 3" src="http://i625.photobucket.com/albums/tt337/aelsadek/ChangeMethod3.jpg" alt="" width="716" height="451" /></a></p>
<p>For the following examples, I created a class called Truck, which inherits fr0m a class called Vehicle. View <a href="http://i625.photobucket.com/albums/tt337/aelsadek/Netbeans/Vehicle.jpg">here</a>.</p>
<p><strong>Pull Up:</strong></p>
<p>When working with classes and superclasses, Pull Up refactoring is very useful. It allows you to move class members and methods from a subclass up into the superclass.</p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp1.jpg"><img class="aligncenter" title="Pull 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp1.jpg" alt="" width="715" height="450" /></a></p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp2.jpg"><img class="aligncenter" title="Pull 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp2.jpg" alt="" width="715" height="452" /></a></p>
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp3.jpg"><img class="aligncenter" title="Pull 3" src="http://i625.photobucket.com/albums/tt337/aelsadek/PullUp3.jpg" alt="" width="716" height="456" /></a></p>
<p><strong>Push Down:</strong></p>
<p>Push Down is the opposite of Pull Up refactoring. It pushes a superclass member down into a subclass.</p>
<p style="text-align:center;"><a style="text-decoration:none;" href="http://i625.photobucket.com/albums/tt337/aelsadek/PushDown1.jpg"><img class="aligncenter" title="Push 1" src="http://i625.photobucket.com/albums/tt337/aelsadek/PushDown1.jpg" alt="" width="716" height="451" /></a></p>
<p style="text-align:center;">
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/PushDown2.jpg"><img class="aligncenter" title="Push 2" src="http://i625.photobucket.com/albums/tt337/aelsadek/PushDown2.jpg" alt="" width="716" height="450" /></a></p>
<p style="text-align:center;">
<p style="text-align:center;"><a href="http://i625.photobucket.com/albums/tt337/aelsadek/Netbeans/Vehicle.jpg"><img class="aligncenter" title="Push 3" src="http://i625.photobucket.com/albums/tt337/aelsadek/Netbeans/Vehicle.jpg" alt="" width="716" height="449" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;">And that&#8217;s it for this time, note that those are only half of the capabilities of NetBeans refactoring. I am going to go through the other half in a following post soon. If you have any question or comment, do not hesitate to <a href="http://significantinsignificance.wordpress.com/contact/">contact me</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JetBrains .NET Tools Blog » Blog Archive » ReSharper 5.0 Overview]]></title>
<link>http://enggtech.wordpress.com/2009/10/20/jetbrains-net-tools-blog-%c2%bb-blog-archive-%c2%bb-resharper-5-0-overview/</link>
<pubDate>Tue, 20 Oct 2009 11:43:46 +0000</pubDate>
<dc:creator>Visitor Blogs</dc:creator>
<guid>http://enggtech.wordpress.com/2009/10/20/jetbrains-net-tools-blog-%c2%bb-blog-archive-%c2%bb-resharper-5-0-overview/</guid>
<description><![CDATA[Features External Sources A solution is not limited to sources included in your projects, but also c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>Features</h3>
<p><strong>External Sources</strong><br />
A solution is not limited to sources included in your projects, but also contains sources that were used to build your libraries. Some companies publish parts of their sources using the Source Server feature of debug information files (<em>PDB</em>).</p>
<p><strong>Structured Patterns</strong><br />
ReSharper 5 can address this demand. You can set up your own code patterns, search for them, replace them, include them in code analysis, and even use quick-fixes to replace! Building patterns and enforcing good practices has never been this easy. Corporate and team policies, your own frameworks, favorite open source libraries and tools</p>
<p><strong>Project Refactorings and Dependencies View</strong></p>
<p><strong>Call Tracking</strong><br />
Find usages</p>
<p><strong>Value Tracking</strong><br />
Value Tracking gives you important information about data flow in your program.</p>
<h3>Technologies and Languages</h3>
<p><strong>Visual Studio 2010</strong></p>
<p><strong>C# 4 and VB10</strong><br />
New language versions nowadays appear at a great speed, and ReSharper team works hard to support them right when you need them. ReSharper 5 provides beta support for C# 4 and VB10, as Visual Studio 2010 does itself. Variance, dynamic types, named arguments and optional parameters, embedded COM assemblies — all of these features are supported in the new ReSharper.</p>
<p><strong>ASP.NET MVC</strong><br />
ASP.NET MVC deserved our special attention: special syntax highlighting, inspections, navigation to and from action or controller, and even actions to create new types and methods from usage in pages.</p>
<h3>Inspections</h3>
<p><strong>Solution-Wide Warnings and Suggestions</strong></p>
<p><strong>Upgrade-to-LINQ Actions</strong><br />
With C# 3.0 and LINQ, developers are able to write data-intensive code more easily by directly describing their intent to the compiler. However, years of imperative programming left us with tons of <em>foreach</em>-style code waiting to be upgraded. ReSharper 5 detects parts of your code that can be rewritten using the new LINQ syntax and offers to perform the conversion automatically</p>
<p><strong>Use IEnumerable Where Possible</strong><br />
With the power of LINQ, <em>IEnumerable</em> is more than enough to pass a collection of values. So why restrict yourself with an API requiring you to pass old-school arrays, <em>List</em>s and <em>ArrayList</em>s? ReSharper will scan your code base to detect methods that can safely return and accept <em>IEnumerable</em> instead of a more specific type.</p>
<h3>Other improvements</h3>
<p><strong>Native NUnit Support</strong></p>
<p><strong>XML Formatting</strong></p>
<p><a href="http://blogs.jetbrains.com/dotnet/2009/10/resharper-50-overview/">JetBrains .NET Tools Blog » Blog Archive » ReSharper 5.0 Overview</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CodeRush Xpress for C#]]></title>
<link>http://michaelnagy.wordpress.com/2009/10/16/coderush-xpress-for-c/</link>
<pubDate>Fri, 16 Oct 2009 09:15:15 +0000</pubDate>
<dc:creator>Michael Nagy</dc:creator>
<guid>http://michaelnagy.wordpress.com/2009/10/16/coderush-xpress-for-c/</guid>
<description><![CDATA[Developer Express and Microsoft are proud to announce a new version of CodeRush licensed exclusively]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="padding-left:30px;">Developer Express and Microsoft are proud to announce a new version of CodeRush licensed exclusively for C# developers working in Visual Studio. The new product is called CodeRush Xpress, and it includes a fresh selection of hand-picked features taken from <a href="http://www.devexpress.com/CodeRush">CodeRush</a> and <a href="http://www.devexpress.com/Refactor">Refactor! Pro</a>.</p>
<h3><a href="http://www.devexpress.com/go/CodeRushX.aspx"><img src="http://i.msdn.microsoft.com/bb693327.ExpressDL(en-us).gif" border="0" alt="" width="47" height="49" />Download now</a></h3>
<p>Here&#8217;s a sampling of what you get:</p>
<h4>Find any File or Symbol&#8230;</h4>
<p>Go to any file or symbol in the solution efficiently.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.Quick%20File%20Navigation(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>  </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Type in a few letters of the name to filter&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.Quick%20File%20Navigation-call(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Or hold down the SHIFT key to filter only on uppercase letters&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.Quick%20File%20Navigation-R(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Uppercase characters can appear anywhere. Any uppercase characters not specified in the filter are highlighted in blue&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.Quick%20File%20Navigation-RC(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>The uppercase letters need not be sequential. Notice how &#8220;RD&#8221; in the screen shot below matches both &#8220;ResolveDelegate.cs&#8221; and &#8220;ResolveCallbackDelegate.cs&#8221;.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.Quick%20File%20Navigation-RD(en-us,MSDN.10).png" alt="" align="left" /></p>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4>Tab to Next Reference</h4>
<p>This is a really cool navigation feature that takes you to the next (and previous) reference just by pressing the TAB key (or SHIFT+TAB to go backwards) when the caret is inside an identifier, member, or a type. For example, in the following code, the caret was inside the last <strong>Person</strong> type reference (in the &#8220;new<strong>Person</strong>()&#8221; instantiation call) when the TAB key was pressed, causing the <strong>Person</strong> reference at the top of the file to become highlighted.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.TabToNextReference(en-us,MSDN.10).png" alt="" align="left" /></p>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4> </h4>
<h4>Expand/Shrink Selection</h4>
<p>This feature allows you to increase a selection by logical blocks, or decrease an expanded selection by the same logical blocks. This feature is perfect when refactoring, since many refactorings work on a contiguous selection of code (e.g., extract method, introduce local, etc.).</p>
<h4> </h4>
<h4>TDD-Style Intelligent Declaration Based on Usage</h4>
<p>Place the caret on any undeclared element in your code and press the Refactor/Code key (CTRL+`) to see a list of intelligent suggestions for the type of the new variable. For example, in the screen shot below two appropriate types are suggested, even though Console.WriteLine has many overloads that accept a wide variety of types.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.DeclareLocalTwoOptions(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>You can even turn a function call or property access into a variable declaration.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.DeclareLocalOnProperty(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>This makes writing code with Visual Studio&#8217;s Intellisense really fast. Just use Intellisense to produce the property reference or function call, and then press the Refactor/Code key to declare a new local variable of the appropriate type. Here&#8217;s an example with a function call—notice the caret can be just about anywhere on the function call, even at the end of the line.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.DeclareLocalOnFunction(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>You can even declare a local from a simple instantiation, like this:</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.DeclareLocalNewPerson(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>And it&#8217;s worth noting you can declare <em>all kinds of elements</em> based on usage, not just locals. Anything you need types, members, fields—the full list of elements that can be declared appears below.</p>
<h4> </h4>
<h4>Professional Grade Refactorings</h4>
<p>CodeRush Xpress includes many powerful refactorings to help improve the quality of your code. For example, consider the following:</p>
<blockquote><p><code>private static void ShowInt(int n)<br />
    {<br />
Console.WriteLine(n);<br />
    }<br />
private static void ShowEntries(List&#60;int&#62; entries)<br />
    {<br />
      entries.ForEach((Action&#60;int&#62;)ShowInt);<br />
    }</code></p></blockquote>
<p>With the caret on the ShowInt method reference, you can press the Refactor! key&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.InlineDelegate(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>   </p>
<p> </p>
<p> </p>
<p>and then select <strong>Inline Delegate</strong>. This will produce the following code:</p>
<blockquote><p><code>private static void ShowEntries(List&#60;int&#62; entries)<br />
    {<br />
      entries.ForEach(delegate(int n)<br />
                      {<br />
Console.WriteLine(n);<br />
                      });<br />
    }</code></p></blockquote>
<p>Notice the caret is on the delegate keyword. You can immediately press the Refactor! key again&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.CompressToLambdaExpression(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Note that we can go in <em>two directions</em> now. We can either convert the anonymous method to a named method (in essence reversing the Inline Delegate refactoring we just performed), or we can take it a step further and compress the anonymous method into a lambda expression. Choosing <strong>Compress to Lambda Expression</strong>, we get the following:</p>
<blockquote><p><code>private static void ShowEntries(List&#60;int&#62; entries)<br />
    {<br />
      entries.ForEach(n =&#62; Console.WriteLine(n));<br />
    }</code></p></blockquote>
<p>CodeRush Xpress is loaded with powerful refactorings taken from <a href="http://www.devexpress.com/Refactor">Refactor! Pro</a>. One of our favorites, <strong>Extract Method to Type</strong>, allows you to extract a method from one type into another, updating both the calling code and the extracted method appropriately. For an example, consider the following code:</p>
<blockquote><p><code>class Person<br />
  {<br />
public string Name { get; set; }<br />
public  class="hiddenSpellError" pre="public "&#62;bool IsAnOrphan { get; set; }<br />
public Person Mother { get; set; }<br />
public Person Father { get; set; }<br />
  }<br />
// ...<br />
class BabyMaker<br />
  {<br />
public Person MakeOne(Person mother, Person father, string name)<br />
    {<br />
Person newBaby = new Person();<br />
      newBaby.Name = name;<br />
      newBaby.Mother = mother;<br />
      newBaby.Father = father;<br />
      newBaby.IsAnOrphan = newBaby.Mother == null &#38;&#38; newBaby.Father == null;<br />
return newBaby;<br />
    }<br />
  }</code></p></blockquote>
<p>Notice that the code in the <strong>MakeOne</strong> method contains a local variable that&#8217;s an instance of type <strong>Person</strong>, and that code sets the <strong>IsAnOrphan</strong> property. There is some logic in this method that pertains to Person, but it feels like it&#8217;s in the wrong class!</p>
<p>We already have the class <strong>Person</strong> in our solution, so it makes sense to move some of this code to the proper class. With CoderRush Xpress installed, all we need to do is select the code we want to move&#8230;.</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.SelectCodeToExtract(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Press the <strong>Refactor</strong> key&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.ExtractMethodToPerson3(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>And choose &#8220;<strong>Extract Method to Person</strong>&#8220;. CodeRush Xpress analyzes the selection and determines there&#8217;s at least one local variable of a type you have declared elsewhere in the solution. Now let&#8217;s apply this refactoring&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.TargetPicker(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Press the UP and/or DOWN ARROW keys to select a location for this new method, and press ENTER to commit. Give the method a meaningful name&#8230;</p>
<p><img src="http://i.msdn.microsoft.com/dd218053.SetParents(en-us,MSDN.10).png" alt="" align="left" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>  </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Cool. Now we have the logic (that should have been inside <strong>Person</strong> to start with) right where it belongs. Notice how the new <strong>SetParents</strong> instance method works on the instance itself (compare that code with the original code that operated on the newBaby local). The code is easier to read and cleaner in both locations.</p>
<p>Notice also that tiny dark blue triangle, in the code above. That&#8217;s a <em>stack-based marker</em>, and CodeRush Xpress drops markers automatically whenever you apply a refactoring or TDD-style declaration that takes you away from the original location. You can jump back at any time to the top marker on the stack by pressing ESCAPE.</p>
<p>There are many more refactorings and cool features in CodeRush Xpress. This is just a preview. Here&#8217;s the full list of what you get:</p>
<h5>Editor Features</h5>
<ul>
<li>Duplicate Line</li>
<li>Highlight Usages</li>
<li>Clipboard Features
<ul>
<li>Smart Cut/Copy</li>
<li>Paste Replace</li>
</ul>
</li>
<li>Enhanced Selection Abilities
<ul>
<li>Extend/reduce selection</li>
<li>Camel-case selection</li>
</ul>
</li>
</ul>
<h5>Navigation Features</h5>
<ul>
<li>Camel-case Navigation</li>
<li>Tab to Next Reference</li>
<li>Go to File</li>
<li>Go to Symbol (QuickNav)</li>
</ul>
<h5>TDD &#8211; Declaration from Usage</h5>
<ul>
<li>Types
<ul>
<li>Declare Class</li>
<li>Declare Delegate</li>
<li>Declare Enum</li>
<li>Declare Enum Element</li>
<li>Declare Interface</li>
<li>Declare Struct</li>
</ul>
</li>
<li>Members
<ul>
<li>Declare Constructor</li>
<li>Declare Event Handler</li>
<li>Declare Getter</li>
<li>Declare Method</li>
<li>Declare Property</li>
<li>Declare Property (auto-implemented)</li>
<li>Declare Property (with backing field)</li>
<li>Declare Setter</li>
</ul>
</li>
<li>Variables
<ul>
<li>Declare Field</li>
<li>Declare Local</li>
<li>Declare Local (implicit)</li>
</ul>
</li>
</ul>
<h5>Refactorings</h5>
<ul>
<li>Add/Remove Block Delimiters</li>
<li>Combine Conditionals (merge nested &#8220;If&#8221; statements)</li>
<li>Compress to Lambda Expression</li>
<li>Compress to Ternary Expression</li>
<li>Convert to Auto-implemented Property</li>
<li>Convert to Initializer (use object/collection initialize when possible)</li>
<li>Create Backing Store (converts Auto-implemented Property to standard Property with get and set)</li>
<li>Decompose Initializer</li>
<li>Decompose Parameter</li>
<li>Expand Lambda Expression</li>
<li>Expand Ternary Expression</li>
<li>Extract Method to Type</li>
<li>Flatten Conditional</li>
<li>Introduce Local (introduce variable)</li>
<li>Inline Delegate</li>
<li>Inline Temp (inline variable)</li>
<li>Make Explicit</li>
<li>Make Implicit</li>
<li>Move Type to File</li>
<li>Name Anonymous Method</li>
<li>Name Anonymous Type</li>
<li>Reverse Conditional (invert &#8220;if&#8221;)</li>
<li>Split Conditional (split complex &#8220;If&#8221; statements)</li>
<li>Use StringBuilder</li>
<li>Use String.Format</li>
</ul>
<p> </p>
<p><a href="http://msdn.microsoft.com/en-us/vcsharp/dd218053.aspx">CodeRush Xpress for C#</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Design, test (developer), implement, code-review and refactor an application]]></title>
<link>http://nuks88.wordpress.com/2009/10/08/design-test-developer-implement-code-review-and-refactor-an-application/</link>
<pubDate>Thu, 08 Oct 2009 07:22:35 +0000</pubDate>
<dc:creator>Wilfrido Nuqui</dc:creator>
<guid>http://nuks88.wordpress.com/2009/10/08/design-test-developer-implement-code-review-and-refactor-an-application/</guid>
<description><![CDATA[Design, test (developer), implement, code-review and refactor an application. Therefore, design, tes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Design, test (developer), implement, code-review and refactor an application.</strong><br />
Therefore, design, test, implement, code-review and refactor set of features of an iteration.<br />
And therefore design, test, implement, code-review and refactor a feature.<br />
And therefore design, test,implement, code-review and refactor a module.<br />
And therefore design, test, implement, code-review and refactor a class.<br />
And therefore design, test, implement, code-review and refactor a method.<br />
Do it properly and not just because your idol programmer do it so.</p>
<p>An iteration that is<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;properly designed,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;properly tested,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;properly implemented,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;properly code-reviewed, and<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;properly refactored<br />
will<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;open the door of the next iteration.<br />
The time spent by the team is never a waste.<br />
The target users will find value on the application.<br />
The stakeholders will be satisfied therefore happy.</p>
<p>Now, what would you do?<br />
Stay the same?<br />
If you are doing these already, then that is absolutely great!<br />
But if not, then do the opposite and enjoy the difference!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Refactoring with Iterators: Prime Factors]]></title>
<link>http://solutionizing.net/2009/09/30/refactoring-with-iterators-prime-factors/</link>
<pubDate>Wed, 30 Sep 2009 15:16:37 +0000</pubDate>
<dc:creator>Keith Dahlby</dc:creator>
<guid>http://solutionizing.net/2009/09/30/refactoring-with-iterators-prime-factors/</guid>
<description><![CDATA[Andrew Woodward recently posted a comparison of his test-driven Prime Factors solution to one writte]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.21apps.com/">Andrew Woodward</a> recently posted a <a title="Comparing myself to Uncle Bob Martin" href="http://www.21apps.com/development/comparing-myself-to-uncle-bob-martin/">comparison of his test-driven Prime Factors solution</a> to <a title="Prime Factors Kata" href="http://www.butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata">one written by</a> <a title="Robert C. Martin" href="http://butunclebob.com/">Uncle Bob</a>. In the comments, someone suggested that Andrew use an iterator instead so I thought I&#8217;d give it a try.</p>
<p>First, let&#8217;s repost the original code:</p>
<pre>private const int SMALLEST_PRIME = 2;

public List&#60;int&#62; Generate(int i)
{
    List&#60;int&#62; primes = new List&#60;int&#62;();
    int divider = SMALLEST_PRIME;
    while (HasPrimes(i))
    {
        while (IsDivisable(i, divider))
        {
            i = AddPrimeToProductsAndReduce(i, primes, divider);
        }
        divider++;
    }
    return primes;
}

private bool IsDivisable(int i, int divider)
{
    return i%divider == 0;
}

private bool HasPrimes(int i)
{
    return i &#62;= SMALLEST_PRIME;
}

private int AddPrimeToProductsAndReduce(int i, List&#60;int&#62; primes, int prime)
{
    primes.Add(prime);
    i /= prime;
    return i;
}</pre>
<p>By switching our method to return <code>IEnumerable&#60;int&#62;</code>, we can replace the <code>primes</code> list with an iterator. We will also remove the AddPrimeToProducts functionality from that helper method since we don&#8217;t have the list any more:</p>
<pre>public IEnumerable&#60;int&#62; Generate(int i)
{
    int divider = SMALLEST_PRIME;
    while (HasPrimes(i))
    {
        while (IsDivisable(i, divider))
        {
            yield return divider;
            i = Reduce(i, divider);
        }
        divider++;
    }
}

private int Reduce(int i, int prime)
{
    return i / prime;
}</pre>
<p>I think this is a good change for three reasons:</p>
<ol>
<li>There&#8217;s nothing about the problem that requires a <code>List&#60;int&#62;</code> be returned, we just want a sequence of the factors.</li>
<li><code>AddPrimeToProductsAndReduce</code> suggested that it had a side effect, but exactly what wasn&#8217;t immediately obvious.</li>
<li>It&#8217;s much easier to see what values are being included in the result.</li>
</ol>
<p>That said, I think we can clean this up even more with a second iterator. Specifically, I think we should break out the logic for our candidate factors:</p>
<pre>private IEnumerable&#60;int&#62; Divisors
{
    get
    {
        int x = SMALLEST_PRIME;
        while (true)
            yield return x++;
    }
}</pre>
<p>Which allows us to separate the logic for generating a divider from the code that consumes it:</p>
<pre>public IEnumerable&#60;int&#62; Generate(int toFactor)
{
    foreach (var divider in Divisors)
    {
        if (!HasPrimes(toFactor))
            break;

        while (IsDivisable(toFactor, divider))
        {
            yield return divider;
            toFactor = Reduce(toFactor, divider);
        }
    }
}</pre>
<p>We should also eliminate the negation by flipping <code>HasPrimes</code> to become <code>IsFactored</code>:</p>
<pre>public IEnumerable&#60;int&#62; Generate(int toFactor)
{
    foreach (var divider in Divisors)
    {
        if (IsFactored(toFactor))
            break;

        while (IsDivisable(toFactor, divider))
        {
            yield return divider;
            toFactor = Reduce(toFactor, divider);
        }
    }
}

private bool IsFactored(int i)
{
    return i &#60;= 1;
}</pre>
<p>This does introduce a (very) minor inefficiency in that the <code>Divisors</code> enumerator will <code>MoveNext()</code> one extra time before breaking out of the loop, which could be mitigated by checking <code>IsFactored</code> both before the <code>foreach</code> and after the <code>while</code> loop. Less readable, insignificantly more efficient&#8230;take your pick.</p>
<p>The other advantage to breaking out the logic to generate <code>Divisors</code> is that we can easily pick smarter candidates. One option is to skip even numbers greater than 2. An even better optimization takes advantage of the fact that all primes greater than 3 are of the form x±1 where x is a multiple of 6:</p>
<pre>private IEnumerable&#60;int&#62; Divisors
{
    get
    {
        yield return 2;
        yield return 3;
        int i = 6;
        while (true)
        {
            yield return i - 1;
            yield return i + 1;
            i += 6;
        }
    }
}</pre>
<p>Implementing this sort of logic in the original version would have been much more difficult, both in terms of correctness and readability.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Shift Subtitle, part 4]]></title>
<link>http://charpcfn.wordpress.com/2009/09/28/shift-subtitle-part-4/</link>
<pubDate>Tue, 29 Sep 2009 01:21:04 +0000</pubDate>
<dc:creator>ggnextmap</dc:creator>
<guid>http://charpcfn.wordpress.com/2009/09/28/shift-subtitle-part-4/</guid>
<description><![CDATA[Well now it&#8217;s just a matter of debugging my code. I suppose writing tests would be the ideal t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well now it&#8217;s just a matter of debugging my code. I suppose writing tests would be the ideal thing to do, but I think there is just a stupid typo in there somewhere that I&#8217;ll have to look for.</p>
<p>Ok. I had some ideas while I started working. It pretty much went like this:</p>
<ol>
<li>Reading in the times is working but assumes they are always in full format (ie 00:00:00,000) and does not handle 00,000 situations.</li>
<li>the to_s method is terrible, I&#8217;ve only used sprintf once or twice in PHP so it&#8217;s no wonder I didn&#8217;t think of it right off. That cleaned it up quite a bit.</li>
</ol>
<p>So after figuring out a way to read in the times and account for partial time entries, I did a bit of refactoring and testing and found out that it&#8217;s working now, horray!<br />
I just thought of another, probably easier way this could have been accomplished. If I had taken the file times, converted them to milliseconds and then added/subtracted the converted input times then spit them back out as HH:MM:SS,mmm it might have been less verbose code, but I think this was a good exercise to learn a bit about Ruby classes. And anyways, my code works and that&#8217;s all that counts, right?</p>
<p><a href="http://charpcfn.pastebin.com/f594e4212">http://charpcfn.pastebin.com/f594e4212</a></p>
<p>That&#8217;s my submitted code!</p>
<p>Can&#8217;t wait for the next challenge :]</p>
<p>edit: If I find myself with some extra time I will probably go back and write some unit tests and maybe try making it a Gem as practice since there is still a while before the next challenge starts.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Flex Formatter]]></title>
<link>http://haritkothari.wordpress.com/2009/08/20/flex-formatter/</link>
<pubDate>Thu, 20 Aug 2009 11:35:47 +0000</pubDate>
<dc:creator>haritkothari</dc:creator>
<guid>http://haritkothari.wordpress.com/2009/08/20/flex-formatter/</guid>
<description><![CDATA[Flex Builder 3, an eclipse~ IDE for flex and actionscript based project development lacks few primar]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Flex Builder 3, an eclipse~ IDE for flex and actionscript based project development lacks few primary code indentation and refactoring functionalities by itself.</p>
<p>Searching for some other technical requirement drove me to <a href="http://sourceforge.net/projects/flexformatter/" target="_blank">Flex Formatter</a>, a third party project on source! Cheers, its BSD license! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This tool is really small but very essential and useful plugin</p>
<div id="attachment_384" class="wp-caption alignleft" style="width: 310px"><a href="http://haritkothari.wordpress.com/files/2009/08/formatter.jpg"><img class="size-medium wp-image-384" title="Flex Formatter tools" src="http://haritkothari.wordpress.com/files/2009/08/formatter.jpg?w=300" alt="Flex Formatter tools" width="300" height="10" /></a><p class="wp-caption-text">Flex Formatter tools</p></div>
<p>Many times it happens that code is written in hurry to achieve some short term goal. Either some efforts need to invest to refactor and indent the code, or else <a href="http://sourceforge.net/projects/flexformatter/" target="_blank">go for Flex Formatter</a>.</p>
<p>Built in capability to generate ASDoc is also impressive! However, I suppose, all these features, of flex formatter have been covered with Flash Builder 4.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Untangling the Knot]]></title>
<link>http://playdeezgames.wordpress.com/2009/08/20/untangling-the-knot/</link>
<pubDate>Thu, 20 Aug 2009 02:45:40 +0000</pubDate>
<dc:creator>playdeezgames</dc:creator>
<guid>http://playdeezgames.wordpress.com/2009/08/20/untangling-the-knot/</guid>
<description><![CDATA[First, HamQuest is now in an assembla space: http://www.assembla.com/spaces/hamquest Second, there h]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>First, HamQuest is now in an assembla space:</p>
<p><a href="http://www.assembla.com/spaces/hamquest">http://www.assembla.com/spaces/hamquest</a></p>
<p>Second, there has been a lot of refactoring in the HamQuest code base.</p>
<p>I&#8217;m finally tackling the &#8220;get the creatures into xml&#8221; task, and it is proving to be very challenging, and the reason it is challenging is because of the corner I painted myself into with how the creature that represents the player is represented in code.</p>
<p>Slowly but surely I&#8217;m starting to unravel the issue, but not without pain, and I&#8217;m surprised the thing still actually works after what I just did.</p>
<p>A creature on a map is represented in code by a Creature object.</p>
<p>A Creature object holds the state of the creature (mostly the wounded state), and an index into a creature table.</p>
<p>The creature table consists of two types of object: CreatureDescriptor and a PlayerDescriptor, which derives from CreatureDescriptor.</p>
<p>A CreatureDescriptor is just that: a description of the general type of creature.</p>
<p>A PlayerDescriptor is more than that: it also contains the current state of the player.</p>
<p>The intent was noble: make players and creatures use the same rules for the most part, and only differ when they actually differ in behavior.</p>
<p>In a CreatureDescriptor, the attack value is static. A goblin always has an attack value of 2 no matter what, and nothing will change it ever.</p>
<p>In the PlayerDescriptor, the attack value depends on the weapon equipped by the player.</p>
<p>Now that I&#8217;m moving both types of descriptor into the &#8220;property bag&#8221; model that I put the Items into, I&#8217;m using a generic function to grab out the values, but the property bag knows nothing of the values it holds&#8230; it just holds them.</p>
<p>So, I &#8220;cleverly&#8221; wrapped a value into a new &#8220;StatisticHolder&#8221; class, so that the same looking call can get both the CreatureDescriptor attack value in its own static way, and will get the dynamic value from PlayerDescriptor.</p>
<p>So now CreatureDescriptor is completely empty, and ready for moving to XML, and PlayerDescriptor is not.</p>
<p>Of course, I&#8217;m not entirely sure that there is a need to put the player descriptor into xml as a whole.  It may be good enough to put some sort of &#8220;base statistics&#8221; for the player, and have the player descriptor copy from them, and simply add the PlayerDescriptor to the end of the Creature List, but load the others from xml as originally planned.</p>
<p>In any case, one step closer to the goal, along with the change of almost all enums into static classes with const strings, which may seem crazy and untypesafe (and it is!) but with the mind I have for extensibility of the project, it&#8217;ll make sense in the end.</p>
<p>In any case, you can check out the code at assembla, if you want.  Try not to point and laugh.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A Knead For HamQuest]]></title>
<link>http://playdeezgames.wordpress.com/2009/08/11/a-knead-for-hamquest/</link>
<pubDate>Tue, 11 Aug 2009 21:17:36 +0000</pubDate>
<dc:creator>playdeezgames</dc:creator>
<guid>http://playdeezgames.wordpress.com/2009/08/11/a-knead-for-hamquest/</guid>
<description><![CDATA[Coming back to code that is &#8220;aged&#8221; to any extent (HamQuest is about a year old as a code]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Coming back to code that is &#8220;aged&#8221; to any extent (HamQuest is about a year old as a code-base), it is easy to spot the flaws and quick decisions that painted the code into a corner.</p>
<p>Normally I think &#8220;This code sucks! I totally need to re-write it!&#8221;</p>
<p>But then I asked myself a very simple question: &#8220;You have written games a hundred times. You have rewritten those games another hundred.  Since when has that ever actually helped you finish any of them?&#8221;</p>
<p>So I&#8217;ve been slowly going over the code.  In many way, software development is more like making bread.  We add stuff, we remove stuff, we mix stuff around.</p>
<p>What started out as a single executable has turned into an executable and two dlls.  Originally I had just split out a single dll for the game itself, but once I had done that, I could see that there were a number of classes that were generic (something of a pun as most of the classes are generics) enough that they didn&#8217;t have anything to do with the game specifically.  There is now a dll called PDGBoardGames, which includes things like a Board class and a Maze class, both of which generic enough that they can be reused whenever I need a board or maze provided I remain in .Net land.</p>
<p>As I keep pulling stuff out of code and into XML files, more and more of the existing classes become unnecessary.  Item management has had the most work done, and there is not a single mention within the ItemTable class about any specific item.  Everything is either in the XML file, or derivable from the data in the xml file.</p>
<p>So, my usual thoughts about a codebase like HamQuest is &#8220;If I had done it right in the first place, it wouldn&#8217;t be like this.&#8221;  But I don&#8217;t think that way this time.  As far as codebases go, HamQuest isn&#8217;t all that bad or convoluted, which I attribute to my having worked on code for a long time, so a number of good habits have formed along the way.</p>
<p>However, I have spent the last few weeks working over the code and making it do exactly the same thing it did before, just a little more flexibly.  Thankfully, I haven&#8217;t had any performance hits.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA["Tenso" - Coding while at 0% code coverage]]></title>
<link>http://guilhermesilveira.wordpress.com/2009/08/05/tenso-coding-while-at-0-code-coverage/</link>
<pubDate>Wed, 05 Aug 2009 12:48:23 +0000</pubDate>
<dc:creator>guilhermesilveira</dc:creator>
<guid>http://guilhermesilveira.wordpress.com/2009/08/05/tenso-coding-while-at-0-code-coverage/</guid>
<description><![CDATA[Two of the most typical consultant&#8217;s job are trying to save a failing project or implement new]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Two of the most typical consultant&#8217;s job are trying to <a href="http://www.scrumalliance.org/resources/273">save a failing project </a>or implement new features and fix bugs within a project which code is not as clear or as good as one wishes.</p>
<p>Uncle Bob mentions that <a href="http://blog.objectmentor.com/articles/2009/01/09/the-big-redesign-in-the-sky">if all checked in code is a little better than the code which was checked out</a>, the average code quality will be higher than before. If we keep proceeding this way, the project&#8217;s overall quality will be much better after a couple weeks.</p>
<p>Those projects which does not contain such good quality code are the ones were we can learn a lot about baby-steps changes and code-improvement: you can improve anything and everything.</p>
<p>The same thing would apply with tests. If whenever we make a change to some piece of non-tested code, one writes its respective code, really soon we will have a better designed and testable software.</p>
<p><a href="http://paulhammant.com/">Paul Hammant</a> once told me he used to love to face those projects and implement new features/refactor the project without breaking it, while introducing test cases &#8211; usually those projects do not contain any automated tests.</p>
<p>It takes a lot of guts to face those changes. Imagine a project which contains  no automated tests at all and you wish to change a functionality. If <a href="http://www.codinghorror.com/blog/archives/001083.html">100% code coverage is not enough</a>, imagine 0%&#8230;</p>
<p>The first step would be to create an automated test which works for the functionality you are willing to change (the way it works right now). Your job is to get the test passing and it should probably take some time only to get it written, because the code was not <a href="http://en.wikipedia.org/wiki/Test-driven_development">designed for tests</a>.</p>
<p>Let&#8217;s see an example of code written while not thinking about tests. The first class shows a thread local based code which allows one to access a 3rd-party system, i.e. a web service:</p>
<p><code><br />
public class Connections {<br />
private static final ThreadLocal&#60;Resource&#62; resource = new ThreadLocal&#60;Resource&#62;();<br />
static { // ... startup code }<br />
public static Resource getResource() {<br />
return resource;<br />
}<br />
}<br />
</code></p>
<p>And now we show a common web service access using the above mentioned class:</p>
<p><code><br />
public class Orders {<br />
public static List&#60;Order&#62; active() {<br />
List&#60;Order&#62; orders = Connections. getResource().list();<br />
for(Iterator&#60;Order&#62; it = orders.iterator(); it.hasNext();) {<br />
Order order = it.next();<br />
if(order.wasCancelled()) it.remove();<br />
}<br />
return orders;<br />
}<br />
public static void add(Order order) {<br />
return Connections. getResource().post(order);<br />
}<br />
}<br />
</code></p>
<p>Note that this code works just fine. A software could be running it for a while until someone asks to change the list criteria for all clients.</p>
<p>Lets suppose that the logic has changed, requiring that one should only be allowed to see the orders which were not cancelled and not yet delivered at the same time. You could simply implement the change in that Orders.all method or start implementing tests right away.</p>
<p>The process of creating an automated test for Order.all shows one of the typical problems while trying to create tests in projects which were not design for them: tight coupling between classes.</p>
<p>This tight coupling usually appears in two forms: instantiating specific types (i.e. new XXXX) or statically accessing members of another type. In both situations, a test case implies also accessing the other type.</p>
<p>The problem is, how to create a unit test case, without changing its code? Well, one could write some code which would actually access the 3rd party system, but that&#8217;s not our aim with this test. We just want to assure that the for (and including if) was written correctly.</p>
<p>This case can be refactored with the use of dependency injection but we need to be careful, our changes could break the functionality.</p>
<p>Although Orders and Connections are tightly coupled, we can introduce a new parameter within the Orders class. Let&#8217;s</p>
<p><code><br />
public class Orders {<br />
private final Resource resource;<br />
public Orders(Resource resource) { this.resource = resource; }<br />
public static List&#60;Order&#62; active() {<br />
List&#60;Order&#62; orders = resource.list();<br />
for(Iterator&#60;Order&#62; it = orders.iterator(); it.hasNext();) {<br />
Order order = it.next();<br />
if(order.wasCancelled()) it.remove();<br />
}<br />
return orders;<br />
}<br />
public static void add(Order order) {<br />
return Connections. getResource().post(order);<br />
}<br />
}<br />
</code></p>
<p>Notice that I did not make any changes to the add method, because I am still not going to write any test case related to it.</p>
<p>In order to introduce the new parameter within the Orders() constructor, its a good idea to use an ide feature and make everyone who is calling its constructor to start invoking &#8220;new Orders(Connections.getResource())&#8221;&#8230;</p>
<p>This way, no functionality was changed at all, the project is compiling and working as before and we are ready to create our test case, which shall pass a mocked Resource to the constructor and allows us to run this unit test.</p>
<p>As soon as the test is passing, one is ready to make changes to the business logic contained within the list method itself.</p>
<p>This is one of the possible ways of dealing with legacy non-tested code in order to incrementaly built a well-enough-covered codebase.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Writing an Eclipse Plug-in (Part 3): Create a custom project in Eclipse - New Project Wizard: Time to Refactor]]></title>
<link>http://cvalcarcel.wordpress.com/2009/07/19/writing-an-eclipse-plug-in-part-3-create-a-custom-project-in-eclipse-new-project-wizard-time-to-refactor/</link>
<pubDate>Sun, 19 Jul 2009 16:36:40 +0000</pubDate>
<dc:creator>cvalcarcel</dc:creator>
<guid>http://cvalcarcel.wordpress.com/2009/07/19/writing-an-eclipse-plug-in-part-3-create-a-custom-project-in-eclipse-new-project-wizard-time-to-refactor/</guid>
<description><![CDATA[In my last post I showed how to get the GUI aspect of a New Wizard for the creation of a new project]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In my last post I showed how to get the GUI aspect of a New Wizard for the creation of a new project type up and running rather quickly. In my never ending attempt to be a good developer citizen it is now time to stop and refactor.</p>
<p>You might think we haven&#8217;t actually written enough code to refactor (we have 3 Java files in total). That would be true except for the three strings in our wizard code. I could wait until there is more to do, but why not refactor now when it will begin to develop muscle memory for that particular task?</p>
<p>First change:</p>
<pre class="brush: java;">
    _pageOne = new WizardNewProjectCreationPage(&#34;Custom Plug-in Project Wizard&#34;);
</pre>
<p>to:</p>
<pre class="brush: java;">
    _pageOne = new WizardNewProjectCreationPage(PAGE_NAME);
</pre>
<p>and put the string at the top of the class:</p>
<pre class="brush: java;">
    private static final String PAGE_NAME = &#34;Custom Plug-in Project Wizard&#34;; //$NON-NLS-1$
</pre>
<p>Next change:</p>
<pre class="brush: java;">
    public CustomProjectNewWizard() {
        setWindowTitle(&#34;New Custom Plug-in Project&#34;);
    }
</pre>
<p>to:</p>
<pre class="brush: java;">
    public CustomProjectNewWizard() {
        setWindowTitle(WIZARD_NAME);
    }
</pre>
<p>and put the new constant at the top of the class:</p>
<pre class="brush: java;">
    private static final String WIZARD_NAME = &#34;New Custom Plug-in Project&#34;; //$NON-NLS-1$
</pre>
<p>The other two strings should be replaced by using the <strong>Eclipse Externalize Strings</strong> mechanism. With the <code>CustomProjectNewWizard.java</code> open in the editor select <strong>Source &#8211;&#62; Externalize Strings</strong> (or move the cursor to one of the strings and press <strong>Ctrl+1</strong>).</p>
<p>When the Externalize Strings dialog opens check the box for <strong>Use Eclipse&#8217;s String Externalization Mechanism</strong>. If you like the key value then leave them alone, but I prefer to have a variable name that conveys some level of information so I changed the keys to match the strings; so the <code>CustomProjectNewWizard_0</code> becomes <code>CustomProjectNewWizard_Custom_Plugin_Project</code> and <code>CustomProjectNewWizard_1</code> becomes <code>CustomProjectNewWizard_Create_something_custom</code>.</p>
<p>In addition, click <strong>Configure</strong> which is next to the Accessor Class dropdown field. Change the Class Name from <strong>Messages</strong> to <strong>NewWizardMessages</strong>. Click <strong>OK</strong> to finalize your decision.</p>
<p>Press <strong>Next</strong> in the <strong>Externalize Strings</strong> dialog to take a look at what the change will look like. What you should see are the strings replaced with a reference to a new class that just got generated.</p>
<pre class="brush: java;">
    _pageOne.setTitle(NewWizardMessages.CustomProjectNewWizard_Custom_Plugin_Project);
    _pageOne.setDescription(NewWizardMessages.CustomProjectNewWizard_Create_something_custom);
</pre>
<p>Look in the Package Explorer for the new class. It should be in the same package as the Wizard code. The magic? At runtime Eclipse reads the property file named <strong>messages.properties</strong> and fills in the static fields with the values in the file. You can add to the file through the <strong>Externalize Strings</strong> dialog as you add more strings that need to be externalized.</p>
<p>That is the extent of the refactoring based on what has been done so far.</p>
<p>Refactoring can sometimes seem trivial, but it will pay many dividends later when a string needs to be changed, or internationalized, and the only thing that needs to be done is to create a new properties file.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Update 7/13/2009]]></title>
<link>http://wheninnrome.wordpress.com/2009/07/13/update-7132009/</link>
<pubDate>Mon, 13 Jul 2009 07:41:27 +0000</pubDate>
<dc:creator>rome</dc:creator>
<guid>http://wheninnrome.wordpress.com/2009/07/13/update-7132009/</guid>
<description><![CDATA[It&#8217;s been a long time since I last updated this site.  I&#8217;ve been wanting to for so long ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It&#8217;s been a long time since I last updated this site.  I&#8217;ve been wanting to for so long but have just been too busy (or lazy) to do anything.  Anyway since there is so much stuff in my head i&#8217;m thinking to just blurt it all out, things that I&#8217;ve learned, things I want to change, etc.</p>
<p><strong>Lets start with the title. </strong></p>
<p><strong> </strong>Rather than &#8220;rumz&#8217;s tech notes&#8221; i think i want to just maintain this one blog, soooo&#8230;. the title must be appropriate. I dont want to just post about tech stuff, so how about &#8220;rumz / learn / notes&#8221;  ayan!  now i can post about me, learning stuff (not just tech stuff), and any sort of stuffage i want. there are categories and tags anyway so searching should be a cinch&#8230;   hmmm lets digress some more&#8230;</p>
<p><strong>Marriage!</strong></p>
<p>Ever since I got married I thought that I was learning less&#8230; but the opposite was true!  I&#8217;ve learned so much (loving it!)  from Jay than i would have learned had i still opted to be single.  Well, the big thing i really learned also is you gotta manage your time!  With work and jay and my personal hobbies all in the way, plus quiet time, i really have to set time aside for everything (not to mention how to manage emotional and lack-of-money stress&#8211;  lol another side effect of marriage).  More on that later.</p>
<p><strong>Things I&#8217;ve learned and am still learning (and need to learn)! </strong></p>
<p>As usual I am reading lots of books (but not as many as before) and all these things are great but wouldnt it be greater if other people learned from them?  as of a few days/weeks ago I am starting out learning <em>python</em>.  google uses it, so i think i should be learning it.  <em>linux </em>learning has diminished but i want to remedy that.  i need to start learning <em>accounting </em>so i can get my finances in order.  <em>food and diet</em> are extremely important now that im getting much less exercise than before.   <em>managing people </em>is another essential skill that needs putting on the table since i work with a large team.  <em>photography </em>is an awesome way of expressing oneself and i really like this new hobby.</p>
<p><strong>Beliefs and Spiritual Stuff</strong></p>
<p>Its about time i started posting more about what is really important.  This might look to be a really drastic change in terms of what stuff i used to write about, but its a paradigm shift that is long needed.   i totally believe that our actions now have an impact on us and ourselves, and ultimately, the afterlife.   maybe if i quote the bible on this one i would make more sense</p>
<p>&#8220;What good is it for a man to gain the whole world, yet forfeit his soul?&#8221;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[What does refactoring mean?]]></title>
<link>http://bobobobo.wordpress.com/2009/07/08/what-does-refactoring-mean/</link>
<pubDate>Wed, 08 Jul 2009 17:56:50 +0000</pubDate>
<dc:creator>bobobobo</dc:creator>
<guid>http://bobobobo.wordpress.com/2009/07/08/what-does-refactoring-mean/</guid>
<description><![CDATA[Refactoring Rewriting something so that it is written differently, but ultimately &#8220;means]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><dl>
<dt>Refactoring</dt>
<dd>Rewriting something so that it is written differently, but ultimately &#8220;means&#8221; the same thing.  E.g. in Math, you can refactor x + xy to x( 1 + y ).  These two statements (x+xy) and (x(1+y)) mean exactly the same thing mathematically, but they&#8217;re just written differently.  e.g. 2 in programming, refactor is used more loosely.  You can refactor a bunch of code which means you rewrite the code to do the same <b>intended</b> thing, but in a better way (more efficiently, or with more adherence to OOP principles, or rewrite it to remove bugs).</dd>
</dl>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Refactoring with LINQ &amp; Iterators: FindDescendantControl and GetDescendantControls]]></title>
<link>http://solutionizing.net/2009/06/23/refactoring-with-linq-iterators-finddescendantcontrol-and-getdescendantcontrols/</link>
<pubDate>Tue, 23 Jun 2009 06:37:51 +0000</pubDate>
<dc:creator>Keith Dahlby</dc:creator>
<guid>http://solutionizing.net/2009/06/23/refactoring-with-linq-iterators-finddescendantcontrol-and-getdescendantcontrols/</guid>
<description><![CDATA[A while back I put together a quick and dirty implementation of a FindControl extension method: publ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A while back I put together a <a title="User Profile MySite Redirect via Delegate Control" href="http://solutionizing.net/2008/12/08/user-profile-mysite-redirect-via-delegate-control/">quick and dirty implementation</a> of a <code>FindControl</code> extension method:</p>
<pre>public static T FindControl&#60;T&#62;(this Control root, string id) where T : Control
{
    Control c = root;
    Queue&#60;Control&#62; q = new Queue&#60;Control&#62;();

    if (c == null &#124;&#124; c.ID == id)
        return c as T;
    do
    {
        foreach (Control child in c.Controls)
        {
            if (child.ID == id)
                return child as T;
            if (child.HasControls())
                q.Enqueue(child);
        }
        c = q.Dequeue();
    } while (c != null);
    return null;
}</pre>
<p>It got the job done (if the control exists!), but I think we can do better.</p>
<h2>Refactoring with Iterators</h2>
<p>My first concern is that the method is doing too much. Rather than searching for the provided ID, the majority of the code is devoted to navigating the control&#8217;s descendents. Let&#8217;s factor out that logic into its own method:</p>
<pre>public static IEnumerable&#60;Control&#62; GetDescendantControls(this Control root)
{
    var q = new Queue&#60;Control&#62;();

    var current = root;
    while (true)
    {
        if (current != null &#38;&#38; current.HasControls())
            foreach (Control child in current.Controls)
                q.Enqueue(child);

        if (q.Count == 0)
            yield break;

        current = q.Dequeue();
        yield return current;
    }
}</pre>
<p>The new method is almost as long as the old one, but now satisfies the <a href="http://en.wikipedia.org/wiki/Single_responsibility_principle">Single Responsibility Principle</a>. I also added a check to prevent calling <code>Dequeue()</code> on an empty queue. For those that have studied algorithms, note that this is a <a title="Breadth-First Search" href="http://en.wikipedia.org/wiki/Breadth-first_search">breadth-first</a> tree traversal.</p>
<p>Now we can update <code>FindControl</code>:</p>
<pre>public static T FindControl&#60;T&#62;(this Control root, string id) where T : Control
{
    Control c = root;

    if (c == null &#124;&#124; c.ID == id)
        return c as T;

    foreach (Control child in c.GetDescendantControls())
    {
        if (child.ID == id)
            return child as T;
    }
    return null;
}</pre>
<p>With the control tree traversal logic extracted, this updated version is already starting to <a title="Code Smell" href="http://en.wikipedia.org/wiki/Code_smell">smell</a> better. But we&#8217;re not done yet.</p>
<h2>DRY? Don&#8217;t Repeat Someone Else, Either</h2>
<p>My second concern is how we&#8217;re checking for the ID in question. It&#8217;s not that the equality operator is a bad choice, as it will work in many scenarios, but rather that it&#8217;s not consistent with the existing <code>FindControl</code> method. In particular, the existing <code>FindControl</code> understands naming containers (IDs that contain &#8216;$&#8217; or &#8216;:&#8217;). Rather than implement our own comparison logic, we should just leverage the framework&#8217;s existing implementation:</p>
<pre>public static T FindControl&#60;T&#62;(this Control root, string id) where T : Control
{
    if (id == null)
        throw new ArgumentNullException("id");

    if (root == null)
        return null;

    Control c = root.FindControl(id);
    if (c != null)
        return c as T;

    foreach (Control child in c.GetDescendantControls())
    {
        c = child.FindControl(id);
        if (c != null)
            return child as T;
    }
    return null;
}</pre>
<p>Fun fact: <code>FindControl</code> will throw a <code>NullReferenceException</code> if <code>id</code> is <code>null</code>.</p>
<h2>Refactoring with LINQ</h2>
<p>So we have extracted the descendant logic and leaned on the framework for finding the controls, but I&#8217;m still not quite satisfied. The method just feels too&#8230;procedural. Let&#8217;s break down what we&#8217;re really trying to do:</p>
<ol>
<li>Look at the current control and all its descendants.</li>
<li>Use <code>FindControl</code> on each with the specified ID.</li>
<li>When we find the control, return it as type T.</li>
</ol>
<p>As the subheading might suggest, we can express these steps quite nicely with LINQ:</p>
<ol>
<li>
<pre>var controls = root.AsSingleton().Concat(root.GetDescendantControls());</pre>
</li>
<li>
<pre>var foundControls = from c in controls
                    let found = c.FindControl(id)
                    where found != null
                    select found;</pre>
</li>
<li>
<pre>return foundControls.FirstOrDefault() as T;</pre>
</li>
</ol>
<p>Behind the scenes, this is how I might have thought through this code:</p>
<ol>
<li>We use <code>AsSingleton()</code> (my new preferred name, to align with F#&#8217;s <code><a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/fsharp.core/Microsoft.FSharp.Collections.Seq.html">Seq.singleton</a></code>, for <code>AsEnumerable()</code>, which I <a title="Generic Method Invocation with Expression Trees" href="http://solutionizing.net/2009/01/20/generic-method-invocation-with-expression-trees/">introduced here</a>) and <code>Concat()</code> to prepend <code>root</code> to the list of its descendants, returned as a lazy enumeration.</li>
<li>We use a query over those controls to retrieve matches from <code>FindControl()</code>, again returned as a lazy enumeration.</li>
<li>We grab the first control found, or <code>null</code> if none match, and return it <code>as T</code>.</li>
</ol>
<p>Because all our enumerations are lazy, we put off traversal of the entire control tree until we know we need to. In fact, if our ID is found in the root control, <code>GetDescendantControls()</code> won&#8217;t even be called! Through just a bit of refactoring, we have both an efficient and readable solution.</p>
<p>For completeness, here&#8217;s the final version with a more descriptive name to contrast with the existing <code>FindControl()</code>:</p>
<pre>public static T FindDescendantControl&#60;T&#62;(this Control root, string id) where T : Control
{
    if (id == null)
        throw new ArgumentNullException("id");

    if (root == null)
        return null;

    var controls = root.AsSingleton().Concat(root.GetDescendantControls());

    var foundControls = from c in controls
                        let found = c.FindControl(id)
                        where found != null
                        select found;

    return foundControls.FirstOrDefault() as T;
}</pre>
<p>I have added these methods, along with <code>AsSingleton()</code> and a host of others, to the <a href="http://www.codeplex.com/SPExLib">SharePoint Extensions Lib</a> project. Check it out!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Un-learn to Re-learn]]></title>
<link>http://pauloliverfpblog.wordpress.com/2009/06/21/un-learn-to-re-learn/</link>
<pubDate>Sun, 21 Jun 2009 18:54:42 +0000</pubDate>
<dc:creator>poliverfp</dc:creator>
<guid>http://pauloliverfpblog.wordpress.com/2009/06/21/un-learn-to-re-learn/</guid>
<description><![CDATA[I just did not feel like writing for my little blog this week, as my thoughts are focused both on my]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I just did not feel like writing for my little blog this week, as my thoughts are focused both on my company, Geiger (<a href="http://www.geiger.com/">www.geiger.com</a> promo) and the interesting and fun components of the Promotional Products industry that I am gleaming from the great people here.  So, external inputs had little input into my world this week.</p>
<p>To put it into a visual, think of a room filled with flip charts of drawings, text, snapshot pictures of people, applications, hardware, department and division names, roles and processes.  That is what my head is filled with and yes, several pages of flip charts, because big thoughts must be on big paper.</p>
<p>So, what do I write this week that would provide something worthwhile and also have my perspective – rule #1 of a good blog.  Well, without getting into too much trouble, it is that these first 45 days at a new company provide you a unique vision of people, processes and relationships between those two things.  Why could we not capture this vision more than once, when we start with a new organization?  There is a way I am learning, it is called un-learning and re-learning.</p>
<p>The book by Stephen M. Covey (son of Stephen R. Covey) called The Speed of Trust discusses the importance of un-learning.  The first time you learn something, like I am doing now, you are exposed with very little bias to limit your learning.  However, once you learn enough to get started (regardless of what it is), the rest of the training is slanted based on your initial biases which are difficult to avoid due to the manner in which our brain captures and interprets information.</p>
<p>Another book Pragmatic Thinking &#38; Learning by Andy Hunt discusses in detail using the Dreyfus model how the brain learns.  Mr. Hunt offers a way to train your mind; he calls it refactoring your wetware, to recreate these first 45 days of unique vision.  I will let the few readers of this blog to explore those writers and their works for their own impressions.</p>
<p>But let me impress upon you this perspective of un-learning and re-learning on an annual basis.  For us in the technology realm, it is critical for us to un-learn and re-learn so that we can provide the proper judgments of emerging technologies and their impact on our businesses.  I know I have in the past become enamored with the technologies that took the team of people I worked with, months, if not years to design and implement.  When new technologies emerged that could replace it, the review process compared the old technology versus the new technology instead of comparing what the business people and processes do versus what the new technology does.</p>
<p>Comparing it anew as if the old technology did not exist was not part of the process.  But, it should have been.  Because we continuous change the people and the processes adapting (evolving) the old technology to these change whole new ways of doing things are often not part of the process.  Old technology evolves, it does not revolutionize as a new technology could possibly do.</p>
<p>The example of companies changing their marketing firms every 8 to 10 years comes to mind.  Often the issue is not that the old marketing firm is performing poorly, just the customer company knows that a new perspective could bring better marketing results.  The customer company un-learns by hiring a new firm so they can re-learn.</p>
<p>So a business can hire a new firm every few years to un-learn and re-learn, which results in us getting the benefits from this process spread out over far to many years and also ending close relationships that have served us well.  Or, develop the process of internal un-learning and re-learning, along with a utilizing a new firm strategically to perform certain functions tactically that create a new perspectives and thus new options.</p>
<p>I strongly recommend The Speed of Trust (The One Thing That Changes <em>Everything</em>) and Pragmatic Thinking &#38; Learning (Refactor Your Wetware) to help you understand more in depth these processes.  For me, I am re-learning those parts of technology that I have experienced before by asking those around me to teach me anew, from their perspective.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Technical Speed Bumps]]></title>
<link>http://devblog.point2.com/2009/05/05/technical-speed-bumps/</link>
<pubDate>Tue, 05 May 2009 19:31:39 +0000</pubDate>
<dc:creator>Jesse Webb</dc:creator>
<guid>http://devblog.point2.com/2009/05/05/technical-speed-bumps/</guid>
<description><![CDATA[As developers, after working on the same project for a while, we start to remember sections of our c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="size-full wp-image-446 alignright" title="speedbump" src="http://point2blog.wordpress.com/files/2009/05/speedbump.jpg" alt="Speed Bump" width="135" height="135" /></p>
<p>As developers, after working on the same project for a while, we start to remember sections of our code base which aren&#8217;t quite &#8216;up-to-par&#8217; with either team or industry standards. We begin dreading working in those areas of the project and sometimes even avoid stories or tasks involving these problem areas. Our first instincts should be to refactor the area or clean it up in some way so that these smells do not haunt the next person who must work in that area of the system. Unfortunately, it is not always as simple as just fixing the issue immediately and soon a small task can become bloated when we head down those rabbit-holes of maintenance.</p>
<p>Our initial solution to this problem was to simply document these code smells on a white board beside our scrum board under a section called &#8216;Code Smells&#8217;. Each smell was represented by a card which could then be prioritized based on the impact it was causing. This was great because all of these problems in the back of everyone’s mind were now right there in our faces and even the business could see them. It was now more apparent what might cause you issues when you worked on a given story. These code smells were still addressed as part of stories if it made sense to fix them immediately but we could also do some work or investigation on the smells during short periods of spare time, often before lunch or at the end of the day.</p>
<p>This method did work for quite some time; however it was soon apparent that it was not just bad code which was slowing us down. Other issues arose such as deployment complexity, test runtimes, etc. which did not seem appropriate to classify as code smells even though they were undoubtedly hurting our team’s velocity. We came up with the idea of renaming our Code Smells section to &#8216;Speed Bumps’. This new name gave us a place to track anything and everything which was slowing us down. They are still addressed in the same fashion, either as part of a story or during spare time. The benefit of the rename simply gave the team more certainty when adding issues to the list since if there was something limiting their productivity; they were encouraged to either deal with it immediately or add it to the list. This makes any technical debt in the project more manageable because everyone becomes aware of them and they can be prioritized once recognized.</p>
<p>I am curious if any other development teams out there utilize a similar or even completely different strategy for addressing technical debt. What works for you?</p>
<p>By: <a href="http://devblog.point2.com/author/jessewebb/" target="_blank">Jesse Webb</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Refactoring to MVP]]></title>
<link>http://qsoftware.wordpress.com/2009/04/17/refactoring-to-mvp/</link>
<pubDate>Fri, 17 Apr 2009 20:30:28 +0000</pubDate>
<dc:creator>vudangsoftware</dc:creator>
<guid>http://qsoftware.wordpress.com/2009/04/17/refactoring-to-mvp/</guid>
<description><![CDATA[In the past, I inherited a web project where all coding logic was in the web page classes.  This mad]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In the past, I inherited a web project where all coding logic was in the web page classes.  This made writing unit tests very difficult.  I converted these pages to use MVP, or Model View Presenter design pattern.  MVP allows you to test the Presenter and business logic without having to test the View.  A technique I developed was to move methods from one class to another using Resharper.  I believed that this was a refactoring that Resharper should offer in the future.  To achieve this, I used Resharper to do the following.</p>
<p>1) convert a method in the view class to a static method, Resharper will add a parameter for the View object.</p>
<p>2) move the method to the Presenter class, Resharper will redirect all references.</p>
<p>3) if I did not already have the Presenter as one of the parameters, I add one in.</p>
<p>4) convert the method back to a non-static method in the Presenter class, Resharper would ask which parameter should be converted to &#8220;this&#8221;, I select the Presenter object.</p>
<p>I then further extracted repository, model, security, and other types of code out of the Presenter using the same technique.  Once I had the code in MVP pattern, I mocked the View and tested the Presenter independently.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Rename Java Package in Eclipse]]></title>
<link>http://waoewaoe.wordpress.com/2009/03/30/rename-java-package-in-eclipse/</link>
<pubDate>Mon, 30 Mar 2009 03:37:32 +0000</pubDate>
<dc:creator>Ploy</dc:creator>
<guid>http://waoewaoe.wordpress.com/2009/03/30/rename-java-package-in-eclipse/</guid>
<description><![CDATA[Today, I attempted to change a java package name. I did a right click at the package name and there]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today, I attempted to change a java package name. I did a right click at the package name and there&#8217;s no &#8220;Rename.&#8221;</p>
<p>What I did is creating a new package, say package.my.new. Then I go to package.my, right click &#62; refactor&#62; move and select package.my.new.</p>
<p>I then edited web.xml file, do a search replace from package.my to package.my.new and it works.</p>
<p>However, later I found that there&#8217;s a function &#8220;rename&#8221; under refactor. but I have not tried it. I will check it out next time.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[espressomind to be refactored]]></title>
<link>http://espressomind.wordpress.com/2009/03/16/espressomind-to-be-rafactored/</link>
<pubDate>Mon, 16 Mar 2009 10:37:22 +0000</pubDate>
<dc:creator>Ron DuPlain</dc:creator>
<guid>http://espressomind.wordpress.com/2009/03/16/espressomind-to-be-rafactored/</guid>
<description><![CDATA[Like any good non-blogger weblogger, I have been inactive on espressomind. While you haven&#8217;t s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Like any good non-blogger weblogger, I have been inactive on espressomind.  While you haven&#8217;t seen any updates here, I have been reflecting on how I&#8217;d like to use espressomind.com.</p>
<p>The lab notebook idea doesn&#8217;t work for me. I can reflect further on why it doesn&#8217;t work in a future post, but it essentially comes down to this: I have an unstructured lab notebook, and finding structure on wordpress was not productive.  With that said, look for the new espressomind soon.</p>
<p>PS &#8211; I came across <a href="http://blog.chuwe.com/the-three-is-of-startup-bloggi">three blogging I&#8217;s</a> this morning.  It&#8217;s a good discussion.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Test, Test and Test]]></title>
<link>http://dmontano.wordpress.com/2009/03/05/test-test-and-test/</link>
<pubDate>Thu, 05 Mar 2009 00:19:51 +0000</pubDate>
<dc:creator>dmontanor</dc:creator>
<guid>http://dmontano.wordpress.com/2009/03/05/test-test-and-test/</guid>
<description><![CDATA[&#8230; and consider one or more test, just in case. Currently I&#8217;m working in a project where ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#8230; and consider one or more test, just in case.</p>
<p>Currently I&#8217;m working in a project where , as usual, changes in requirements are very common, and that&#8217;s ok, we live in a world of agile projects were things like these are welcome. That is why we have a group of techniques to accomplish these changes (refactoring, version control, powerful IDEs, design patterns, etc.). The project was started by other development team some time ago, now a new team (I&#8217;m on it) is maintaining and changing it according to the new requirements.</p>
<p>When we have a new change to include in the system, basically we do things like:</p>
<ul>
<li>Limit the change with the business owners to understand why it is needed and what we must do.</li>
<li>With the team, we design an initial model that include all the changes to support the new functionality.</li>
<li>Measure the impact that these changes will have in the previous code.</li>
<li>Here comes the funny part, refactor all the code to make it work with the new structure.</li>
<li>Test the functionality to verify it works as before plus the new changes.</li>
</ul>
<p>When the structure of the code makes difficult to find exactly how far the impact of a change will propagate (my case and of course we are trying to correct that), it is necessary to write, think or define some way to provide an infrastructure to test the system in order to make it work correctly and with that keep your good image with the customers.</p>
<p>This is where the post goes, remark the importance of having a way to test the functionality of a system that has already been deployed. We have had a bad experience about this, we didn&#8217;t have a clear way to test all the code that used to work before we implement a new change, as a consequence of this when the system is redeployed the users of it will face some awful problems and, of course, they will not be happy and you, as a developer, will have to work under pressure and believe me that is not good for anyone because it easily will lead to alter other functionality in order to get the previous one to work as desired.</p>
<p>To sum up consider these points due to bad testing:</p>
<ul>
<li>Work under pressure</li>
<li>Create more problems instead of solving them</li>
<li>Make a user unhappy</li>
<li>Forget about the nice work you were doing before the error came up</li>
<li>Redeploy the system in order to correct the error</li>
<li>As a consequence of all the above, your schedule will be late</li>
</ul>
<p>and now consider these points of good testing:</p>
<ul>
<li>Work on what you want to do</li>
<li>Make a user (and you) happier</li>
<li>Have some free time to spend in making the system and the user experience better</li>
<li>Enjoy a productive day</li>
<li>Sleep nice and peacefully at home</li>
</ul>
<p>So what is better to do, in order to have a nice work environment?  Yeah you are right, develop a way to test after a big refactor has been done.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ronin 0.2.1 "notashellscript" released]]></title>
<link>http://houseofpostmodern.wordpress.com/2009/02/25/ronin-021-notashellscript-released/</link>
<pubDate>Wed, 25 Feb 2009 02:13:25 +0000</pubDate>
<dc:creator>postmodern3</dc:creator>
<guid>http://houseofpostmodern.wordpress.com/2009/02/25/ronin-021-notashellscript-released/</guid>
<description><![CDATA[Yesterday Ronin 0.2.1, code-name &#8220;notashellscript&#8221;, was released. That&#8217;s right, we]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yesterday Ronin 0.2.1, code-name &#8220;notashellscript&#8221;, was released. That&#8217;s right, we finally surpassed the awkward 0.1.x phase. Although, I completely forgot to write about Ronin 0.2.0, code-named &#8220;solid&#8221;, which is where most of the action occurred.</p>
<p>Ronin 0.2.0 saw the complete refactoring and specing of the <a href="http://ronin.rubyforge.org/docs/ronin/Ronin/Platform.html">Platform</a> code, which manages Overlays and their Extensions. Besides the huge amount of bug-fixes, modularization and renaming, Overlays can now have their own top-level <kbd>lib/</kbd> directories. Also, all of the <kbd>lib/</kbd> directories contained within an Overlay and it&#8217;s Extensions are added to the <kbd>$LOAD_PATH</kbd> upon activation. This allows for easier requiring of code embedded within Overlays.</p>
<p>Ronin 0.2.0 also saw the addition of the <kbd>ronin/environment</kbd> file, which loads all of the convenience methods, configuration from <kbd>~/.ronin/config.rb</kbd> and starts Ronin&#8217;s Database. The environment file makes it easier to load up all of Ronin (minus the Platform code) in an IRB session and get hacking.</p>
<p>Grey bearded hackers bemoan how every exploit, library and framework have their own special <i>leet</i> diagnostic printing format. Some prefer the defacto &#8220;[*] Message&#8221; while others go for the saucy &#8220;{+} Message&#8221;. Well grey beards you have one more reason to bemoan, <kbd>UI::Diagnostics</kbd> was added to Ronin 0.2.0. The UI::Diagnostics module adds the <kbd>print_info</kbd>, <kbd>print_warning</kbd> and <kbd>print_error</kbd> methods to a class. The output of these methods are controlled by the <kbd>UI::Verbose</kbd> module.</p>
<p>Ronin 0.2.1, code-name &#8220;notashellscript&#8221;, had a couple but still important changes. Ronin 0.2.1 has dropped <a href="http://enfranchisedmind.com/blog/2008/03/24/rexml-dynamic-typing-lose/">REXML</a> in favour of <a href="http://nokogiri.rubyforge.org/">Nokogiri</a> for XML support. Nokogiri brings faster XML/HTML parsing and building to Ronin, providing it&#8217;s own set of bindings to libxml2.</p>
<p><a href="http://ronin.rubyforge.org/docs/ronin/Ronin/UI/CommandLine.html">UI::CommandLine</a> was rewritten in Ronin 0.2.1. Now sub-commands are accessible by both the <kbd>ronin sub-command --options</kbd> style and git style sub-commands, such as <kbd>ronin-command --options</kbd>. The git style sub-commands provide a more direct way of calling sub-commands.</p>
<p>Many of Ronin&#8217;s other libraries received convenience sub-commands which simply start the Ronin console with the specific library pre-loaded. Ever wanted to jump right into Ronin Dorks or Ronin Scanners, now you totally can:</p>
<pre>$ ronin-scanners
&#62;&#62; Scanners::Nmap.scan(:targets =&#62; '10.1.1.*', :syn_scan =&#62; true)
...</pre>
<p>Finally, I&#8217;ve started to practice what I preach by setting up my own Ronin <a href="http://github.com/postmodern/postmodern-ronin/tree/master">Overlay</a> to experiment with. Of course, the Overlay is hosted on <a href="http://github.com/">github.com</a>, so feel free to clone and fork away. To install the Overlay under Ronin, use the following command:</p>
<pre>$ ronin install git://github.com/postmodern/postmodern-ronin.git</pre>
<p>So far, I&#8217;ve added an <a href="http://github.com/postmodern/postmodern-ronin/tree/master/milw0rm">extension</a> which parses the exploit lists on <a href="http://milw0rm.com/">milw0rm.com</a>. The milw0rm extensions is accessible within Ronin using the following code:</p>
<pre>$ ronin
&#62;&#62; puts Ronin.milw0rm.remote.recent
...</pre>
<p>Ironically, while testing the extension I noticed that <a href="http://milw0rm.com/">milw0rm</a> does not properly escape the titles of their exploits, resulting in unescaped <kbd>&#60;</kbd> and <kbd>&#62;</kbd> characters in their HTML.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Move It To The Model and Use Tiny Methods]]></title>
<link>http://thailehuy.wordpress.com/2009/02/17/move-it-to-the-model-and-use-tiny-methods/</link>
<pubDate>Tue, 17 Feb 2009 13:00:27 +0000</pubDate>
<dc:creator>thailehuy</dc:creator>
<guid>http://thailehuy.wordpress.com/2009/02/17/move-it-to-the-model-and-use-tiny-methods/</guid>
<description><![CDATA[Source: http://railstips.org/2008/12/30/move-it-to-the-model-and-use-tiny-methods I’m updating an ap]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Source: <a href="http://railstips.org/2008/12/30/move-it-to-the-model-and-use-tiny-methods" target="_blank">http://railstips.org/2008/12/30/move-it-to-the-model-and-use-tiny-methods</a></p>
<p>I’m updating an application that I first wrote two years ago and last updated one year ago. It has been amazing to see how much I have learned in the past two years. One of the requirements of the application is for the users to update their information each year. Just last year, I had code like this. Before you look at the code below, I want to warn you that it is not for the faint of heart. Never, ever do this.</p>
<pre><code class="erb"><span class="tag">&#60;%</span>- <span class="keywords">if</span> current_user<span class="method">.roles</span><span class="method">.select</span> <span class="brackets">{</span> &#124;r&#124; r<span class="method">.title</span><span class="method">.include?</span><span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span><span class="method"> }.size</span> &#62; 0 &#38;&#38;
    <span class="brackets">(</span>current_user<span class="method">.email</span><span class="method">.blank?</span> &#124;&#124; current_user<span class="method">.address</span><span class="method">.blank?</span> &#124;&#124;
     current_user<span class="method">.city</span><span class="method">.blank?</span> &#124;&#124; current_user<span class="method">.state</span><span class="method">.blank?</span> &#124;&#124;
     current_user<span class="method">.zip</span><span class="method">.blank?</span> &#124;&#124; updated_at<span class="method">.year</span> != <span class="constants">Time</span><span class="method">.now</span><span class="method">.year</span><span class="brackets">)</span> -<span class="tag">%&#62;</span>
  &#60;!-- show the update form --&#62;
<span class="tag">&#60;%</span>- <span class="keywords">else</span> -<span class="tag">%&#62;</span>
  &#60;!-- show the list of forms to be completed --&#62;
<span class="tag">&#60;%</span>- <span class="keywords">end</span> -<span class="tag">%&#62;</span></code></pre>
<p>I would not lie to you. It was literally like that. A year later, I can barely tell what I was trying to do here. Imagine someone who didn’t know the application inside and out trying to work with code like that. Yikes! Here is my refactored version, that is far more descriptive.</p>
<pre><code class="erb"><span class="tag">&#60;%</span>- <span class="keywords">if</span> current_user<span class="method">.needs_to_update_information?</span> --<span class="tag">%&#62;</span>
  &#60;!-- show the update form --&#62;
<span class="tag">&#60;%</span>- <span class="keywords">else</span> -<span class="tag">%&#62;</span>
  &#60;!-- show the list of forms to be completed --&#62;
<span class="tag">&#60;%</span>- <span class="keywords">end</span> -<span class="tag">%&#62;</span></code></pre>
<p>The benefit of this implementation is that any programmer can immediately tell what my intent is and that all the logic of determining whether or not the current user needs to update their information is moved to the model, where it belongs and can more easily be tested. So what are the steps that I took to get to that new method? First, I changed the if statement to the one above and then I moved all the logic into the user model like this.</p>
<pre><code class="ruby"><span class="keywords">class</span> User
  <span class="keywords">def</span> needs_to_update_information?
    roles.select { &#124;r&#124; r.title.include?<span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span> }.size &#62; 0 &#38;&#38;
      <span class="brackets">(</span>email.blank? &#124;&#124; address.blank? &#124;&#124;
         city.blank? &#124;&#124; state.blank? &#124;&#124; zip.blank? &#124;&#124;
         updated_at.year != Time.zone.now.year<span class="brackets">)</span>
  <span class="keywords">end</span>
<span class="keywords">end</span></code></pre>
<p>This is only step 1. We are not done by any means. I can assure you that if you leave a method like this in your code, I will verbally attack you if I come across it. Let’s break this method down a bit, starting with the first conditional.</p>
<pre><code class="ruby">roles.select { &#124;r&#124; r.title.include?<span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span> }.size &#62; 0</code></pre>
<p>This is horribly nondescript. What is my intent? Only pastors need to update their information and that is what this conditional checks. How about we add a <code>pastor?</code> method and use that in place. Also, I tweaked the condition to use Enumerable’s <code>any?</code> method (as <a href="http://railstips.org/2008/12/30/move-it-to-the-model-and-use-tiny-methods#comment-8584">suggested</a> by David).</p>
<pre><code class="ruby"><span class="keywords">class</span> User
  <span class="keywords">def</span> needs_to_update_information?
    pastor? &#38;&#38;
      <span class="brackets">(</span>email.blank? &#124;&#124; address.blank? &#124;&#124;
         city.blank? &#124;&#124; state.blank? &#124;&#124; zip.blank? &#124;&#124;
         updated_at.year != Time.zone.now.year<span class="brackets">)</span>
  <span class="keywords">end</span>

  <span class="keywords">def</span> pastor?
    roles.any? { &#124;r&#124; r.title.include?<span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span> }
  <span class="keywords">end</span>
<span class="keywords">end</span></code></pre>
<p>That is much better, but why stop there? The next chunk of code that I see that we can pull out is the address stuff.</p>
<pre><code class="ruby">address.blank? &#124;&#124; city.blank? &#124;&#124; state.blank? &#124;&#124; zip.blank?</code></pre>
<p>The intent of these conditionals is to make sure that the user’s address is not blank, so I created an <code>address_needs_updated?</code> method.</p>
<pre><code class="ruby"><span class="keywords">class</span> User
  <span class="keywords">def</span> needs_to_update_information?
    pastor? &#38;&#38;
      <span class="brackets">(</span>email.blank? &#124;&#124; address_needs_updated? &#124;&#124;
         updated_at.year != Time.zone.now.year<span class="brackets">)</span>
  <span class="keywords">end</span>

  <span class="keywords">def</span> pastor?
    roles.any? { &#124;r&#124; r.title.include?<span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span> }
  <span class="keywords">end</span>

  <span class="keywords">def</span> address_needs_updated?
    address.blank? &#124;&#124; city.blank? &#124;&#124; state.blank? &#124;&#124; zip.blank?
  <span class="keywords">end</span>
<span class="keywords">end</span></code></pre>
<p>Next up, I addressed <code>updated_at.year != Time.zone.now.year</code>. The intent of this conditional is to see if the user’s record has been updated in the current year. I pulled this out into an <code>updated_this_year?</code> method.</p>
<pre><code class="ruby"><span class="keywords">class</span> User
  <span class="keywords">def</span> needs_to_update_information?
    pastor? &#38;&#38; <span class="brackets">(</span>email.blank? &#124;&#124; address_needs_updated? &#124;&#124; !updated_this_year?<span class="brackets">)</span>
  <span class="keywords">end</span>

  <span class="keywords">def</span> pastor?
    roles.any? { &#124;r&#124; r.title.include?<span class="brackets">(</span><span class="string">'Pastor'</span><span class="brackets">)</span> }
  <span class="keywords">end</span>

  <span class="keywords">def</span> address_needs_updated?
    address.blank? &#124;&#124; city.blank? &#124;&#124; state.blank? &#124;&#124; zip.blank?
  <span class="keywords">end</span>

  <span class="keywords">def</span> updated_this_year?
    updated_at.year == Time.zone.now.year
  <span class="keywords">end</span>
<span class="keywords">end</span></code></pre>
<p>That is probably about as far as I would go with this. So what are the benefits of all these changes?</p>
<h2>The Benefits</h2>
<ul>
<li>Moved business logic to the model where it is easier and more fun to test.</li>
<li>More descriptive as to the intent of what is happening. Intent is really important. It is far more important for someone to understand <strong>why</strong> you are doing something than <strong>how</strong> you are doing something. <strong>There are many ways to do something, but there is only one intent</strong>.</li>
<li>Smaller methods are easier to test than larger ones (and more fun). Testing large methods feels burdensome and often doesn’t provide enough coverage.</li>
<li>Did I mention testing? It is easier and more fun to test models than views and small methods than large methods (yes, <strong>testing can be fun</strong>).</li>
</ul>
<p>Getting back into this app, I learned that I have learned a lot in the past few years and I hope the error of my ways was beneficial for you too. I am in no way a refactoring expert and haven’t read the book on it, but if you are curious about refactoring, the techniques I used above appear to be <a href="http://www.refactoring.com/catalog/decomposeConditional.html">Decompose Conditional</a> and <a href="http://www.refactoring.com/catalog/extractMethod.html">Extract Method</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Excellence and the art of software development]]></title>
<link>http://daveshinyobjects.wordpress.com/2009/02/11/excellence-and-the-art-of-software-development/</link>
<pubDate>Wed, 11 Feb 2009 00:16:26 +0000</pubDate>
<dc:creator>daveshinyobjects</dc:creator>
<guid>http://daveshinyobjects.wordpress.com/2009/02/11/excellence-and-the-art-of-software-development/</guid>
<description><![CDATA[&#8220;We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.&#8221; -Aris]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#8220;We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.&#8221;<br />
-Aristotle</p>
<p>Software Development, an Art or a Science?  It’s something I’ve been thinking about lately, particularly as it strikes me that at times, there are so many similarities with Art.  I’m ignoring the vaguely pretentious concept of software as a “creative space”, and instead focused on the developers actually being “finished”.  Like Artists, knowing when a piece of code has been re-factored sufficiently and should be “released”.  I think the better the developer, and the more conscientious, the more difficult this can be.  We’ve all been grappling for years with the problem of developers over engineering anything and everything they can get their hands on!  Knowing when to deliver the code, and being able to “let go” when the code functions as required are tricky skills to learn!</p>
<p>In my opinion, it has a fair bit to do with professionalism within the IT industry.  Which perhaps brings the science back into Software Development.  There will never be a “perfect” IT project, but with a better focus on the needs of the customer/business, and a higher degree of professionalism, I think many shortcomings can be overcome.   However, client/business professionalism should also be considered, not simply that of the developers.  No matter how professional a Software Developer becomes, if you are thrown a bunch of loose requirements, and the requested communication during the development phase isn’t forthcoming, then it should surprise no one when a poor result is achieved. As an example in a parallel field, when the head of the Hilton group decides to build a new hotel, he doesn’t throw the job at a couple of juniors, and ask them to deliver it in three weeks.  Comprehending IT in business today, and it’s correct place within those same businesses is very important!<br />
Software Development in and of itself doesn’t make any money.  In the same way as a building in and of itself doesn’t mean people will pay to stay there.  It’s how the business leverages the services associated that money is made.  Understanding that IT is a service provider for the business is critical.  Having said that, it is a service, but it is a critical component of businesses today, and needs to be considered as such.</p>
<p>As a new professionalism along with new tools and techniques are embraced by Software Developers, so too the business needs to utalise new procedures and patterns.  Agile Development is great in theory, but requires excellent developers, and great clients in order to work effectively.  High degrees of communication and excellence need to be worked on and maintained throughout the life cycle of the project.</p>
<p>Any organisation that deals with Emergency Services usually has some form of retrospective evaluation.  While this seems to occur, at times with Software Development projects, all too often nothing substantial comes out of them.  There is generally a culture of blaming clients, or blaming the developers when anything goes wrong, and “Lessons Learned” are rarely evaluated and even more rarely acted upon.</p>
<p>Software Developers need to know when to let go, when they’ve done “enough”.  Conversely the business needs to understand development and it’s place within businesses.  It will only be by repeatedly doing, and creating habit, that we can improve our teams, and the results they produce.  Striving for Excellence is not something software developers, project managers and even the IT industry as a whole can do alone.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
