<?xml version="1.0" ?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Hector Correa's blog</title><link>http://hectorcorrea.com/blog.aspx</link><description>Thoughts on Software Development</description><language>en-us</language><managingEditor>hector@hectorcorrea.com</managingEditor><webMaster>hector@hectorcorrea.com</webMaster><ttl>60</ttl><item><title>DotWiki 2.0</title><description><![CDATA[ <p>I've posted a new version of the <a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/DotWiki/Default.aspx">DotWiki</a>. This new version 2.0&nbsp;is a complete rewrite using C# and it has several new features and a more attractive look and feel. Security is probably the most important new feature since it had been by far the most commonly requested feature since I released the original version in 2002.</p>
<p>Previous versions of the DotWiki had been updates to the original VB.NET code and I felt that a full rewrite was in order to clean up the code, remove unused features, reflect what I've learn since the original release, and add a few more features. Since I've been doing exclusively C# for the last few years I took the plunge and rewrote it in C#.</p>
<p>The look and feel is using the ASP.NET Design Starter Kit Templates that I <a target="_blank" href="http://www.hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx">wrote</a> about a few months ago and that this very site uses.</p>
<p>Security is implemented using the ASP.NET Membership provider. It's amazing how easy was to secure the site using the built-in features for membership for creating new users, resetting your password, logging in, logging out, and such.</p>
<p>This new version also uses Rockford Lhotka's <a target="_blank" href="http://www.lhotka.net/cslanet/Default.aspx">CSLA</a> business objects framework. The business objects to read and write data are typical CSLA business objects. You don't need to know much (if anything) about CSLA to understand the code and yet it helps me tremendously to keep the code in logical tiers. Check out the <a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/DotWiki/Default.aspx?topic=DotWiki+Design+Documentation">DotWiki Design Documentation</a> to get an idea of where CSLA business objects fit in the DotWiki.</p>
<p>This version still uses the <a target="_blank" href="http://www.fckeditor.net/">FCKeditor</a> to provide a what&nbsp; you see is what you get (WYSIWYG) experience to the user. I updated the code to use version 2.6 which supports the Safari browser. &nbsp;</p>
<p>I am continuosly amazed on how much free stuff there is for ASP.NET applications and how good it is. CSLA is a fantastic middle tier business object framework and is open source. The FCKeditor integrates seamlessly with ASP.NET and comes with all the JavaScript source code. The ASP.NET Membership provider is part of the .NET framework since version 2.0 and the design starter kits for ASP.NET applications have always been free.</p>
<p>The DotWiki itself is open source and I hope developers find the new version as useful (or more!) as previous versions.</p>
<p>You can download the source code from the <a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/dotwiki/Default.aspx?topic=DotWiki+Source+Code">DotWiki Source Code</a> page.</p> ]]></description><link>http://hectorcorrea.com/blog/DotWiki-2.0.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/DotWiki-2.0.aspx</guid><pubDate>2008-07-27 10:59</pubDate><source url="http://hectorcorrea.com/blog/DotWiki-2.0.aspx" /></item><item><title>Introduction to Scrum</title><description><![CDATA[ <p><img alt="" align="left" src="http://hectorcorrea.com/images/CodeMayJune2008.jpg" />My article <a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805051">Introduction to Scrum</a> has been published in the May/June 2008 issue of CoDe magazine.</p>
<p>As I said in this&nbsp;article</p>
<blockquote dir="ltr" style="margin-right: 0px">
<p><font face="Courier New">&quot;Scrum is an agile process to manage software development projects. Scrum is not prescriptive on engineering practices, but rather it is a lightweight framework based on a few (common sense) guidelines for managing projects.&quot; </font></p>
</blockquote>
<p>This issue of CoDe is dedicated to Agile Development.</p>
<p>Jeffrey Palermo has an interesting article on <a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805041">managing agile software projects</a>&nbsp;that starts with quite a line:</p>
<blockquote dir="ltr" style="margin-right: 0px">
<p><font face="Courier New">&quot;Everything right or wrong with a software project is management's fault&quot;</font></p>
</blockquote>
<p>Jeff then goes to talk about the falacy of fixed scope, the unspoken quality variable, hiring and firing, managing the customer, and other areas where management needs to act and how this is done in an agile project.&nbsp;</p>
<p>Jean-Paul&nbsp;S. Boodhoo&nbsp;provides a list of <a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805021">16 steps</a> to improve your development skills using techniques that are common on agile projects. I particularly like his&nbsp;approach of trying these techniques little by little. For example, start doing unit testing, get comfortable with it and then evaluate test driven development (TDD)</p>
<p>Scott Bellware&nbsp;talks about <a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805061">Behavior-Driven Development</a> (BDD)</p>
<blockquote dir="ltr" style="margin-right: 0px">
<p><font face="Courier New">&quot;TDD is often specifically about the design of code units and modules such as classes. BDD is aso concerned with unit design, but its focus addresses a much broader range of design concerns&quot;</font></p>
</blockquote>
<p>He talks about the common misunderstanding that Test Driven Development is about testing while in fact is about design.</p>
<p>All in all an interesting <a target="_blank" href="http://www.code-magazine.com/DisplayIssue.aspx?id=4659d960-1235-4848-aeb3-a02c1a441300">CoDe magazine</a> issue.&nbsp;</p> ]]></description><link>http://hectorcorrea.com/blog/Introduction-to-Scrum.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Introduction-to-Scrum.aspx</guid><pubDate>2008-04-10 08:53</pubDate><source url="http://hectorcorrea.com/blog/Introduction-to-Scrum.aspx" /></item><item><title>ASP.NET Design Templates</title><description><![CDATA[ <p>I've received several nice comments about the design of this site. I wish I could take all the credit for it but the truth is that I created it using the <a target="_blank" href="http://msdn2.microsoft.com/en-us/asp.net/aa336613.aspx">Visual C# Personal Design template</a> that Microsoft provides.</p>
<p>The Design Templates web site provides several ASP.NET Design Starter Kit Templates that allow you to create web sites using some predefined look and feel options. When you install these templates they become available to you in Visual Studio when you create a new web site. This is how my Visual Studio 2005 Express looks like with the Personal Design Template installed.</p>
<p>&nbsp;<img alt="" src="http://hectorcorrea.com/images/VisualStudioNewSite.jpg" /></p>
<p>For the UI impared developer like me these templates are amazing. They are ready to use, attractive, and allow us to learn by example. The one that I am using comes with master pages, themes, and site maps.</p>
<p>&nbsp;</p> ]]></description><link>http://hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx</guid><pubDate>2008-03-23 12:09</pubDate><source url="http://hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx" /></item><item><title>HTTP Handlers in .NET 2.0</title><description><![CDATA[ <div style="margin: 0in 0in 0pt">When I rewrote my web site late last year I knew I wanted to use friendly names for my blog pages instead of using URL parameters. For example, the URL to the post on Binary Trees in C# initially was this:</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">
<div style="margin: 0in 0in 0pt"><a href="http://hectorcorrea.com/Blog.aspx?t=c8ff6dbb-284f-4bde-bf07-909f785529ae">http://hectorcorrea.com/Blog.aspx?t=c8ff6dbb-284f-4bde-bf07-909f785529ae</a></div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">I wanted something friendlier and I knew this could be done easily with an <a target="_blank" href="http://msdn2.microsoft.com/en-us/library/f3ff8w4a(VS.71).aspx">HTTP Handler</a> in .NET 2.0 but it has been a very long time since I had written one. So I procrastinated.</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">A few weeks ago I bumped into a blog post by <a target="_blank" href="http://www.singingeels.com/Blogs/Nullable/2007/09/14/URL_ReWriting_The_Right_Way_Its_Easy.aspx">Timothy Khuori</a> that described how easy it was to implement one. The code was not longer than 20 lines of code (including curly braces!) that I felt ashamed I hadn&rsquo;t implemented it my site. I took Timothy&rsquo;s code, stuffed it into my project, and voila, now I have friendly URLs for my blog posts. The URL for the Binary Trees in C# post now is:</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt"><a href="http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx">http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx</a></div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">Behing the scenes, my HTTP Handler still uses my original Blog.aspx page to serve the request but it preserves the original URL that the user submited. I updated Blog.aspx to parse the name of the blog topic to retrieve directly from the URL rather than expect it in the query string.</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">Beside being more human readable, these kinds of URLs are also better for tracking purposes. Since to the web server the request looks like the request for a specific page for each topic (rather than the generic blog.aspx with a parameter with the topic name) the web server can keep track of how many times each topic is requested. This means that I can get statistics in how popular a blog topic is using the tools that I already use to track how popular some pages from my site are.</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
<div style="margin: 0in 0in 0pt">&nbsp;</div>
</div> ]]></description><link>http://hectorcorrea.com/blog/HTTP-Handlers-in-.NET-2.0.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/HTTP-Handlers-in-.NET-2.0.aspx</guid><pubDate>2008-03-02 04:26</pubDate><source url="http://hectorcorrea.com/blog/HTTP-Handlers-in-.NET-2.0.aspx" /></item><item><title>Upgrading Your Software Development Tools </title><description><![CDATA[ <div>Late last year (late November 2007 to be exact) Microsoft released <a target="_blank" href="http://msdn2.microsoft.com/en-us/vs2008/default.aspx">Visual Studio 2008</a> with .NET 3.5 to production. This has generated a lot of buzz around the new features, what&rsquo;s hot, what you should be looking into, and so on. The beta cycle for VS 2008 was long and very public. There has been a lot of articles and access to the new features for a while but now it&rsquo;s here, now it&rsquo;s real. People can go and buy VS 2008 today or download it from MSDN. Teams that have been just wondering how to go about the upgrade now need to answer the question: how do we upgrade?</div>
<div>&nbsp;</div>
<div>Most software developers are technology driven so we love new tools and technologies. This seems to be a personality trait regardless of the technology that we chose. The desire to move to the latest and greatest version seems to be as strong in .NET developers today as it was for FoxPro and VB 6 developers in the late nineties. We crave the day when we can use new tools. Yet, we have a responsibility to our users in doing this responsibly. Upgrades can be hard to perform on medium to large systems that have large number of users in production. Like most things on these kinds of systems upgrades need to be planned in order to give the most to the customers.</div>
<div>&nbsp;</div>
<div>Although the decision to upgrade or not to upgrade to a new version of development tools is very specific to every project, I usually tend to recommend upgrading on-going projects (with new features actively being developed) and thinking twice before upgrading projects that have been switched to maintenance mode (no new features are being developed.)&nbsp;</div>
<h3>So why would you want to upgrade?</h3>
<div>If updating a project to use the latest technology options for you environment takes time and money, why would you even consider want to upgrade? The fact that a new version of your development tools is available is hardly enough reason for a team to stop developing new features, spend days/weeks performing the upgrade, retest the system, and then continue with new development. There has to be some benefit for the customer for an upgrade to make sense.</div>
<div>&nbsp;</div>
<div><em>New tools do come with benefits, but you need to be realistic about what will your project benefit from in the short and long term when upgrading to a new version. </em>I tend to be wary of short term &ldquo;magic&rdquo; benefits that come with new development tools. One of the most common mistakes that teams do is promise (to themselves or to others) that productivity will increase incredibly with new version of the tool. Thinking that your application magically will be developed in half the time and will look much better than before just because you switched to VS 2008 and WPF is foolish. Assuming that the Windows Workflow engine in .NET 3.0 will solve all your workflow issues when you have never used a workflow engine before would also be a poor assumption. It takes time to get used to new tools and to learn what really works for your project and what does not.</div>
<div>&nbsp;</div>
<div>In the case of Visual Studio 2008 there are a ton of benefits that apply to a wide variety of projects. A lot of the tools that Microsoft made available more than a year ago when it released .NET 3.0 are now finally easy to use for most of us. VS 2008 provides the (long awaited) designers to make the most of WPF, AJAX, WCF, and LINQ to name a few. These new technologies can indeed help your application look better, be more responsive to users, provide better communication with other applications, and such.&nbsp;</div>
<h3>How to upgrade to the latest version?</h3>
<div>Although the process to upgrade a project to use a new tool varies from project to project there are two main guidelines that I&rsquo;ve found useful. One is to try the upgrade first in a test environment and with ample time (i.e. don&rsquo;t try it the week before going to production.) The second is that you need to consider the entire project, not only the source code (How will the deployment be affected with the new tool? Will the users be affected? Will third party tools need to be upgraded as well?)</div>
<div>&nbsp;</div>
<div>In my experience tests in the testing environment with the new version of the tool always work out and come out with glaring reviews. The issues with the new version of your tool usually show up once you&rsquo;ve upgraded the entire system. The testing environment, although necessary, usually only covers a small portion of the system (e.g. the code but not the deployment) and some of the pitfalls might be in those other areas that will be upgraded later. This can be sort of a catch-22, you need to test the upgrade first to get an initial idea but you won&rsquo;t get a good idea until you&rsquo;ve upgraded the entire system. You can try to evaluate a wide range of areas of your system (code, deployment, third party tools, et cetera) but don&rsquo;t hold your breath -- you might still run into issues once the entire app is upgraded. C&rsquo;est la vie.</div>
<div>&nbsp;</div>
<div>In the case of Visual Studio 2008 Microsoft did a tremendous benefit to the .NET developers by allowing projects to be upgraded to use VS 2008 and still target the .NET 2.0 runtime. This is a huge advantage for teams that need to take more time to upgrade since it allows them to upgrade the IDE but keep the runtimes and code the same. To make things even better once you've switched your project to use the .NET 3.5 runtime you can incorporate .NET 3.0 features little by little. For example, it is possible to have Windows Forms and WPF forms on the same application, which means that you don&rsquo;t need to rewrite your entire user interface on day one. You can keep your existing Windows Forms and only upgrade to WPF one of two forms at a time, become comfortable with the new technology and plan how to (or if you want to) migrate the rest of the application to use WPF.</div>
<div>&nbsp;</div> ]]></description><link>http://hectorcorrea.com/blog/Upgrading-Your-Software-Development-Tools.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Upgrading-Your-Software-Development-Tools.aspx</guid><pubDate>2008-02-25 10:49</pubDate><source url="http://hectorcorrea.com/blog/Upgrading-Your-Software-Development-Tools.aspx" /></item><item><title>Estimates on Software Projects</title><description><![CDATA[ <p style="margin-bottom: 0in">Estimates is one of the most controversial topics on software development, including the process to calculate them and the value that they add to the software development process.</p>
<p style="margin-bottom: 0in">Every team that I have worked with needs to provide estimates on how long it's going to take to complete a specific feature of a system. Yet, most teams seem to struggle with this activity. Developers enjoy attending a meeting to provide estimates as much as they enjoy visiting the dentist. Project owners typically complain how unreliable estimates on software projects are, to them is unbelievable that even that developers have been writing software for many years cannot give accurate estimates.</p>
<p style="margin-bottom: 0in">In my experience there are several reasons why providing estimates is so hard:</p>
<ul>
    <li>Poor specifications/Lack of domain knowledge</li>
    <li>Technology challenges</li>
    <li>Developers are optimistic</li>
    <li>Software development is tough</li>
</ul>
<h5>Poor specifications</h5>
<p>Poor specifications is the most commonly voiced reason for inaccurate estimates. And for a good reason. It is typical for developers to be asked to estimate features that they don't fully understand. The client requests a new screen to do X but there is a lot of unwritten expectations for this new feature that users will demand once they start using it but that developers don't know about. This is usually due to lack of business domain knowledge. Developers are trained on software development and very little (or nothing) in the specific business domain. If the software that is being written is for insurance billing is very unlikely that the developers will have enough education and training on insurance and/or accounting. They might have been working many years in software development but this might be the first time they are faced with a screen for insurance billing purposes.</p>
<p>Even when a decent amount of conversation between developers, business analysts, and product owners take place to explore what the requested feature will entail, there is inevitable a lot of things that are left unsaid that will be find out when the feature is developed and presented to the user. I've worked on companies where we received reams of paper with specifications that looked like they covered every possible detail about the feature to be built just to find out that (1) they are still incomplete or (2) they don't really represent what the customer wants. I've produced my fair share of specs that I thought were enough to&nbsp;provide accurate estimates just to find out that nope, there is still a lot left unsaid that will not be discovered until the software is written and presented to the users for feedback.</p>
<h5>Technology challenges</h5>
<p>Most software development groups try to stay up to date on technology and upgrade to new versions of compilers, databases, development environments, and such. This is usually a good thing since these new tools are meant to speed up the development process and make better use of existing hardware. But there is a cost associated with these upgrades. Developers need to spend time performing upgrades, learning new tools and ways of doing things, and this might not be cheap. Plus this happens on a regular basis. For example, since 2000 Microsoft has released three versions of C# (C# in 2000, C# 2.0 in 2005, and C# 3.0 in 2007) during the same time Microsoft has released three versions of SQL Server (SQL 2000, SQL 2005, and SQL 2008.)</p>
<p>You may be tempted to say 'the heck with it, we are not going to update anymore' but there is also a cost associated with this. For once, your system might not run on new computers or just look ugly (e.g. imagine a DOS application running on Windows.) Secondly, developers tend to be technology driven and you may lose some of your best developers if they see that they are falling behind in technology and their skills are not up to date.</p>
<h5>Developers are optimistic</h5>
<p>Most developers that I've met (myself included) are optimistic by nature. We are optimistic people and we like to please our customers. This has an impact on the estimates that we provide. We tend to provide estimates for the best case scenario even when experience tells us that the best case scenario hardly ever materializes in software development. Even when we try to account for the unexpected we do it in an optimistic way. Or as Brooks will say in the Mythical Man-Month [p. 15] &quot;the assumption that all will go well has a probabilistic effect on the schedule.&quot;</p>
<h5>Software development is tough</h5>
<p>Software development is a tough activity. It requires dealing with abstractions, a lot of unknowns, on a tight schedule, and with new tools and technologies. Most activities in a business environments deal with physical limitations like size, weight, cost, counts, and other well understood constrains. Software on the other hand deals with &quot;almost pure thought-stuff&quot; [Brooks, p. 7] Estimates on an unconstrained environment like this are not trivial.</p>
<h4>Do we need estimates?</h4>
<p>Yes, we definitively do. Despite the grim picture that I might have painted so far, I strongly believe that estimates are valuable in software projects. Estimates are like price tags in the sense that they allow product owners make better decisions when it comes to deciding priorities for a software project. If there are four new features being requested by the users and three of them will take one week each but the fourth one looks like it is going to take two months alone, the product owner will be better able to decide what is best for the product. She might decide to complete the three one-week features and delay the large one for a better time, or vice-versa. But she will be able to make this decision having an idea on the size of the features.</p>
<p>In my experience there are two things that you can do to get the most out of estimates for software projects <em>even when </em>they are not accurate ..</p>
<p>One is to divide and conquer. Estimate small blocks of functionality so that even if estimates are not accurate they are not off by a lot either.&nbsp;If a task is estimated to take 2 days and it takes twice as much you can deal with it 2 days later and adjust your planning.&nbsp;However, if a task is estimated to take 2 months and it takes twice as much, four months later is probably too late to address the problem. Even more, if developers in a team can blow a 2 days estimated (for whatever reasons) imagine the likelihood of blowing a 2 months estimate.</p>
<p>The second thing that we can do is to constantly calibrate project expectations. To put it bluntly be realistic and use history as a guidance on how long stuff takes to be completed rather than be guided by hope. It is very common for people to say &quot;this time it took me 2 weeks to complete X but with what I know now it would take me only 1 week next time.&quot; This hardly ever works out. For once, remember that developers are optimistic. We are bound to take this posture. If it took 2 weeks to do something there is probably a very good reason for it. You should use that number as your baseline in the future and only reduce the estimate once you have proven than it can be done in half as much. Koskela and Howell have a great <a target="_blank" href="http://www.leanconstruction.org/pdf/ObsoleteTheory.pdf ">paper</a>&nbsp;in which they propose moving away from the thermostat model (in which an arbitrary productivity goal is set at the onset) into a scientific experimentation model in which we adjust based on previous results.</p>
<h4>How to calculate&nbsp;estimates?</h4>
<p>Since estimates are approximations, not promises, I prefer a light weight approach to&nbsp;calculate them rather than spending a whole lot of time on them.&nbsp;By light weight I mean the team getting together for no more than 3 hours to estimate what we think will be able to accomplish in the next two weeks. In my experience teams can come up with &quot;good enough&quot; estimates in relatively short term. David Anderson has a tongue-in-cheek post where he calls for people to <a href="http://www.agilemanagement.net/Articles/Weblog/StopEstimating.html">stop estimating</a>. In reality he calls for <a href="http://www.agilemanagement.net/Articles/Weblog/AgileEstimating.html">agile estimating</a> rather than no estimates at all.&nbsp;In agile methods&nbsp;not a lot of time is spent calculating something that we cannot guarantee. It's better to spend that time producing software and delivering features to the user rather than promises.</p>
<p>Mike Cohn's book on <a href="http://www.amazon.com/Agile-Estimating-Planning-Robert-Martin/dp/0131479415">Agile Estimating and Planning</a> is a very good book on the subject. He does a great way of describing the use of story points and velocity to do long term planning on projects. Highly recommended if you are doing agile software development.</p>
<p>Joel Spolsky has an article on <a target="_blank" href="http://www.stickyminds.com/BetterSoftware/magazine.asp?fn=cifea&amp;id=94">Evidence-Based Scheduling</a> (EBS) in which he uses a Monte Carlo simulation to calculate&nbsp;the likelihood that a particular estimate will be met. Spolsky's approach sounds interesting but I have not tried it myself. The fact that uses historic values to calculate probabilities sounds promising. Still, I am afraid that it requires more time and effort than the value that it provides but I don't have any experience with it.</p>
<h4>What to do about missed estimates?</h4>
<p>Of the things that are controversial about estimates the one about missed estimates is probably the worst. It's almost taboo. Although everybody misses estimates but nobody wants to talk about it.</p>
<p>If you (or your team) misses an estimate, get over it. It happens. Don't let it bring you down. Review why you missed it and act on your findings. Perhaps the task is just more complicated than you thought -- it is perfectly OK to admit this. Maybe you need to break the task down in smaller chunks next time, or you need less distractions. What ever you do however, make sure to use the knowledge that it took longer than you expected next time you estimate a similar task. Don't tell yourself that &quot;next time will be better because I've been there before.&quot;&nbsp;Remember: use history as a guidance rather than hope.</p>
<p>If somebody else misses an estimate see the previous paragraph. Talk with them to see why it was missed and act on it. Don't expect that because somebody thought something would take 5 days that is the time it will take. Remember that it is an estimate, a forecast.</p>
<p>There might be instances where a team or an individual developer <em>constantly misses estimates by a long shot. </em>If that is the case,<em>&nbsp;</em>there are perhaps larger issues&nbsp;that need to be addressed. Does the team/developer has the right tools for the job? Is the team/developer qualified for the job?&nbsp;Are the expectations&nbsp;for the team/developer realistic?&nbsp;Is it always the same&nbsp;team/individual?&nbsp;These are perfectly valid questions on a team/individual that is not performing at the pace that the business expects. The problem migh be the team, the expectations, or both.</p>
<h4>The role of the product owner</h4>
<p>In my experience most product owners learn the effectiveness of their team's estimates in a few cycles. Product owners are not necessarily as optimistics as developers and they can provide valuable feedback to the team after just a few rounds of estimates. This is great feedback that a lot of teams don't use. Product owners bring differerent experiences, business knowledge, and personality styles to the team that can be very useful when estimating and setting expectations.</p> ]]></description><link>http://hectorcorrea.com/blog/Estimates-on-Software-Projects.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Estimates-on-Software-Projects.aspx</guid><pubDate>2008-01-08 11:25</pubDate><source url="http://hectorcorrea.com/blog/Estimates-on-Software-Projects.aspx" /></item><item><title>The Scrum Daily Meeting</title><description><![CDATA[ <p>We use Scrum at the office to manage our projects. One of the key practices of Scrum is the daily meeting (or <a target="_blank" href="http://www.controlchaos.com/about/management.php">daily Scrum</a>.) The daily meeting is a short meeting (15 minutes in our case) held every day at the same time with the whole team (product owners, QA, and developers.)</p>
<p>The goal of the meeting is to keep everybody informed of the progress since the last meeting and make sure there are no roadblocks.</p>
<p>The rules for the daily meeting are simple: The meeting must be short, timeboxed, and every team member must report</p>
<ol>
    <li>What have you done since the last daily meeting?</li>
    <li>What will you do from now until the next daily meeting?</li>
    <li>Are there any roadblocks preventing you to move on?</li>
</ol>
<p>Since in most of our projects we have remote participants I used to show a spreadsheet with our Sprint Backlog in a projector and have everybody report their status. The spreadsheet was shared real time with remote users and updates were seen by everybody.</p>
<p>This was a nice idea since it kept all participants (local and remote) involved in the meeting. However the spreadsheet approach had a huge disadvantage: the focus of the meeting became the spreadsheet rather than the status of the team.</p>
<p>With the spreadsheet approach developers tended to be very mechanical when reporting what they had done and what they will do next. It was very common for people to say &quot;take 3 hours down from line 25 of the spreadsheet and 4 hours from line 28&quot; rather than describing what they did (e.g. &quot;I worked on the problem that prevent users outside the domain from logging in.&quot;)</p>
<p>Last year I decided to stop using the spreadsheet in our daily meetings. We still get together and report our status, but instead of looking at a spreadsheet some people bring a notepad with a list of things to report while others do it of memory.</p>
<p>This little change has made a huge difference in our daily meetings. The meetings are much more conversational now than they ever were. Since there is no central spreadsheet to look at participants now report to their peers rather than to the spreadsheet.</p>
<p>Now that the focus of the meeting has moved away from the spreadsheet it has been easier to make it a meeting where everybody gets informed on what's going on with the project. People really talk about what they are doing rather than just taking hours down from tasks. For example, since there is no spreadsheet during the meeting the participants need to describe what they are working on (e.g. &quot;working on a bug in the login process&quot;) rather than just saying &quot;working on bug report #20&quot;.)</p>
<p>We still keep track of the number of hours remaining in our Sprint Backlog items but is done outside of the daily meeting.</p> ]]></description><link>http://hectorcorrea.com/blog/The-Scrum-Daily-Meeting.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/The-Scrum-Daily-Meeting.aspx</guid><pubDate>2007-12-12 08:21</pubDate><source url="http://hectorcorrea.com/blog/The-Scrum-Daily-Meeting.aspx" /></item><item><title>Managing the Dynamics of Change</title><description><![CDATA[ <p>This weekend I started reading <a href="http://www.amazon.com/Managing-Dynamics-Change-Productive-Workplace/dp/0071470441" target="_blank">Managing the Dynamics of Change</a> by <a href="http://www.jerryjellison.com/" target="_blank">Jerald M. Jellison</a>. This book talks about people's emotional resistance to change and how to manage it. With my background on technology it's easy for me to look at things (including change) from the logical and rational point of view but, as the author points out, “successful implementation [of process change] ultimately comes down to getting people to begin doing things differently” and logic and communication is not always the only tool that is needed.</p>

<p>Jellison describes how performance goes through a J Curve when people is asked to change the way they do things. In this curve we start with certain performance level that immediately drops as a change initiative is started, after a short period performance levels starts to climb up again until it reaches and then passes the initial levels. He describes this as five stages of change:</p>

<ul>
<li>Stage 1: The Plateau – at the beginning, before any new effort gets underway </li>
<li>Stage 2: The Cliff – as soon as the change begins, performance drops, people are fearful </li>
<li>Stage 3: The Valley – things start to get better, employees turn cautiously optimistic</li>
<li>Stage 4: The Ascent – performance improves at a faster pace </li>
<li>Stage 5: The Mountaintop – performance passes the levels of Stage 1 and keeps going upwards</li>
</ul>

<p>Most people go through the five stages, from the managers that come with the new idea to the people that will eventually implement it. However, as Jellison points out, “management is usually in Stage 4 and heading into Stage 5 by the time they decide an idea is good enough for everyone” but the rest of the team is just about to see the cliff!</p>

<p>There are two main points that I've taken from this book. One is that there is a strong emotional component to change and we should address it instead of pretend it does not exist. The second is the fact that most people go throught different stages <i>and</i> that they might do it at different times.</p>

<p>Jellison describes the typical approach of <i>persuading </i>people to embrace the new way of doing things. In this approach the new vision is laid out, the need for change explained, the plan detailed, and off we go. The idea is that if you communicate your message clearly people will follow you. He points out that persuasion only works with people that are already predisposed to the change or that are almost ready for it, but not the rest. If you don't address the emotional factor when implementing change you run the risk of getting “lip service” rather than real behavior change. People might tell you that they are going to do things the new way and not do it. The persuasive approach works very well once people reach stage 4 (i.e. they are not fearful and can co-relate the leader's vision with what they are doing) but it does not work in the first three stages.</p>

<p>Another approach that he proposes to manage change is what he calls <i>activation</i>. In this approach people get to try the new approach right away, in small increments, and in a safe environment, one in which people have positive experiences right away so that they move faster from resistance to conversion.
</p>

<blockquote>“Activation is a bottom-up approach to change. It gets employees to take actions in the new direction even though they have doubts and fears about doing so. Persuasion, by contrast, is a top-down model. Persuasion assumes you have to change employees' attitudes before they'll start to actually move in the new direction. [...] Persuasion is directed at thoughts and beliefs while activation works because it addresses people's feelings.”</blockquote>

<p>He explains several techniques to facilitate change including

<ul>
<li>Communicate at ground level</li>
<li>Ask, don't tell</li>
<li>Front-load rewards and </li>
<li>Make it easy to start</li>
</ul>

<p>Definitively a good book to read if you are in a leadership or management position.</p> ]]></description><link>http://hectorcorrea.com/blog/Managing-the-Dynamics-of-Change.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Managing-the-Dynamics-of-Change.aspx</guid><pubDate>2007-11-11 08:22</pubDate><source url="http://hectorcorrea.com/blog/Managing-the-Dynamics-of-Change.aspx" /></item><item><title>Windows Presentation Foundation</title><description><![CDATA[ <p>I've been reading about Windows Presentation Foundation (WPF) for a while and, while at <a href="http://www.devconnections.com/">DevConnections</a> this week, I've attended a few sessions on the topic and to this day I still have mixed feelings about this new technology.</p>

<p>On one hand I am really excited to see work done for smart clients and the user interface in Windows. The fact that WPF takes into account new graphics hardware available on most machines these days is really nice. WPF uses Direct X instead of GDI+ to render images on the display which turns into faster rendering even for more complex UIs. The Expression Blend product targeted for designers is also a nice addition that hopefully will help developers and UI designers to work together resulting in better applications for the user.</p>

<p>On the other hand I am disappointed Microsoft has lowered the abstraction layer instead of raising it. Most of the sessions and reading that I've seen on WPF focuses on how easy it is to do buttons, gradients, nested controls, stack panels, and such. Gosh! that's not very productive. I am eager to provide better and more polished user interfaces to our users but I cannot believe that in the year 2007 we are attending sessions on how to do gradients and nested controls. I wish MS had provided much richer environment on top of the basic functionality that they've created.</p>

<p>The lack of a data grid is another issue that I struggle with. The new controls allow you to create your own grid and bind it to data but <i>why</i> do we have to do that. Why isn't there a native data grid in VS 2008 is beyond me. Fortunately a lot of third parties are filling this vacuum and providing data grids for WPF and some of them are (at least for now) free.</p>

<p>I am really pleased to see that we can mix and match classic Windows forms with WPF in the same application. This would allow us to start migrating to the new UI paradigm slowly rather than starting from scratch.</p> ]]></description><link>http://hectorcorrea.com/blog/Windows-Presentation-Foundation.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Windows-Presentation-Foundation.aspx</guid><pubDate>2007-11-09 09:18</pubDate><source url="http://hectorcorrea.com/blog/Windows-Presentation-Foundation.aspx" /></item><item><title>Software Developers and Process Improvement</title><description><![CDATA[ <p>One of the topics that I've been noticing for a while is how we (as developers) tend to worry about our software development process and try to educate ourselves on the topic while other project stakeholders don't seem to show as much interest on it.</p>
<p>For example, I often talk to other developers who are trying to implement Scrum, RUP, or other software development process at their companies and they fell that other project stakeholders (executives, business owners, analysts) are not as interested in the process as they should. It seems that it's always developers trying to drive these initiatives.</p>
<p>The most interesting part, however, is that process improvement is not an activity that should be left alone to developers, not even when is about software development process. If the software has an impact on the bottom line of the company (and it usually does) it should be an activity that is done in collaboration with executives, business owners, QA, and developers. Developers, as well intended as we might be, don't always see the whole picture and we are bound to make one-sided conclusions. Or as <a href="http://blog.businessofsoftware.org/2007/10/an-angry-mans-s.html">Buxton</a> says</p>
<blockquote>&quot;the typical approach of software engineers having sole responsibility for new product development [is like] an ice hockey team with all goalies. No matter how good your goalies are, they aren&rsquo;t going to beat even a bad team with the proper mix of players.&quot;</blockquote>
<p>One of my co-coworkers had the great idea of taking a couple of business owners to our local Agile user group and they both seemed to have enjoyed it and learned a few things. Yet, that was the only time they attended one of these meetings.</p>
<p>I've given books on Scrum and Lean Software Development to some of our product owners with moderate success. Although they read it, it usually fails to spark ideas on what else we should be doing.</p>
<p>From what I've seen there are several reasons why most non-software developers don't pay as much attention to software development process improvement as they should:</p>
<ul>
    <li>Software is just a small part of their job. They deal with it because they have to (e.g. the business needs a new software to help in the creation of X, but X is the real goal and software is just a necessary evil.) Although I've seen people not care too much about software development process even on software development companies where X is a piece of software!</li>
    <li>Everytime there is a conversation about process improvement it inevitably turns into a discussion about software tools and other geeky issues where they feel lost.</li>
    <li>They don't think there is anything wrong with the existing process.</li>
    <li>Althought they see problems with the existing process but they thing that's the way it is.</li>
    <li>They just haven't realized they could participate on it and that is on their best interest doing so.</li>
</ul>
<p>This is an open invitation to all project stakeholders (executives, business owners, QA, developers, users) to jump into the software development process improvement in your company. Talk to your team members and see what you and others can do to develop better software and get it to your users more often.</p> ]]></description><link>http://hectorcorrea.com/blog/Software-Developers-and-Process-Improvement.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Software-Developers-and-Process-Improvement.aspx</guid><pubDate>2007-10-30 07:58</pubDate><source url="http://hectorcorrea.com/blog/Software-Developers-and-Process-Improvement.aspx" /></item><item><title>The Mythical Man-Month</title><description><![CDATA[ <p class="MsoNormal" style="margin: 0in 0in 0pt">Last week I finished reading <a target="_blank" href="http://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959">The Mythical Man-Month</a> by Frederick Brooks for the third (or so) time. Although this book was originally published in 1975 it is still a great reading for anyone involved in software development. The edition that I read is the 20th anniversary edition and has a few extra chapters with updated information.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">There are two chapters that I particularly like in this book: The Mythical Man-Month and No Silver Bullet &ndash; Essence and Accident.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt"><o:p></o:p></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt"><strong>The Mythical Man-Month<o:p></o:p></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">In this chapter Brooks explains why using &ldquo;man-month as a unit for measuring the size of a job is a dangerous and deceptive myth. It implies that men and months are interchangeable.&rdquo; He goes on to explain that &ldquo;men and months are interchangeable commodities only when a task can be partitioned among many workers <em>with no communication among them</em>. This is true for reaping wheat or picking cotton; it&rsquo;s not even approximately true for systems programming&rdquo; (emphasis on the original.)</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">This myth is a typical problem in our industry. I cannot enumerate how many times we&rsquo;ve estimated a job to take X number of months by Y number of developers (say 6 months by 2 developers) and then somebody come and say &ldquo;but if I give you twice as many people you&rsquo;ll finish in half the time, right?&rdquo; (say 3 months with 4 developers.)<span style="mso-spacerun: yes"> </span>This hardly ever works out. Having more people in the team is not bad, but comes with a price to the team&rsquo;s productivity mainly due to the communication and work allocation that has to happen among team members. There is a logical tendency to underestimate this burden because we tend to see men/women interchangeable with months.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">In most projects that I work the team size is rather small (5-10 members) compared with the size of the team that Brooks worked on (with hundreds of members) when he managed the IBM&rsquo;s OS/360 software group back in the sixties. Yet, the Brooks&rsquo;s Law (adding manpower to a late software project makes it later) still applies to smaller projects.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt"><strong>No Silver Bullet &ndash; Essence and Accident<o:p></o:p></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">This chapter is actually a reprint from an article that Brooks wrote in 1986 (ten years after the original book was published) and has been added to the 20th anniversary edition. In this chapter Brooks declares that in the next decade (1986-1996) there will be no major technological or managerial development that will improve our productivity by one order of magnitude.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">A-la Aristotle, Brooks divides the difficulties that we face when we develop software in essence and accidents:</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&ldquo;Essence- the difficulties inherent in the nature of software -and accidents- those difficulties that today attend its production but that are no inherent.&rdquo;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">With this in mind, Brooks explains that there are two kinds of tasks involved in software development: essential tasks and accidental tasks. Essential tasks are the ones by which we develop abstract software constructs for the problem that we are trying to solve in our programs. Accidental tasks are ones that we do in order to implement these abstract constructs in programming languages and machine code.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">The advances that have happened in software development that have helped us improve our performance address only the accidental tasks (e.g. higher level programming languages, faster and smarter compilers, and better IDEs.) However, little has been done to improve how we carry on the essential tasks and hence our productivity has not improved by an order of magnitude.&nbsp;Building software is (still) inherently difficult.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">If you&rsquo;ve been in the software industry for a while you&rsquo;ve probably have seen no shortage of silver bullets wannabes. Who can forget about CASE tools? How about artificial intelligence and expert systems? Let&rsquo;s not forget UML and the Unified Software Development process.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">This blog entry (and Brooks article) does not try to diminish the progress that we have had in software development over the years. Our tools have improved incredibly over time. Nowadays it takes a few lines of code to do what it used to take hundreds (if not thousands) of code just a few decades ago. Yet, they&rsquo;ve only addressed the accidental part of the equation. <span style="mso-spacerun: yes">&amp;nbsp;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">There are more gems in Brooks&rsquo;s book and as I said at the beginning, I highly recommend it to anyone that works on software projects.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt">&nbsp;</p> ]]></description><link>http://hectorcorrea.com/blog/The-Mythical-Man-Month.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/The-Mythical-Man-Month.aspx</guid><pubDate>2007-06-28 03:12</pubDate><source url="http://hectorcorrea.com/blog/The-Mythical-Man-Month.aspx" /></item><item><title>Thoughts on Unit Testing</title><description><![CDATA[ <h4>What is a Unit Test?</h4>
<p>A unit test is a piece of code written by a developer for a developer. The intention of this piece of code is to prove that the code does what the developer intents to do (<a href="http://www.pragmaticprogrammer.com/titles/utc2/" target="_blank">Pragmatic Unit Testing in C#</a>). Unit tests are not substitutes for requirement gathering or QA, they are an additional tool that developers can use to produce better systems.</p>
<h4>But why would I write such a piece code?</h4>
<p>A lot of developers complain that when they write a unit test for the first time they fell kind of silly, like there is no value in writing a test to prove a piece of code that they just wrote. For example, let's say that you write a new method to add a record to the database and then you write the unit test to verify this code (e.g. the record is in fact added to the database.) Suppose you spend half your morning writting this code and then its unit test. Well <em>off course </em>that when you write the test it will pass -- you just wrote the darn code!</p>
<p>What a lot of developers don't realize is that they do gain a whole lot when they write unit tests:</p>
<ul>
    <li>Once you write the test you can run it and test your object directly without having to fire your application, login, launch the customer screen, click new, populate some data, hit save, and the look in the database to verify if it was saved. Once this test is available to you just need to run it and let it do these steps for you automatically. It&rsquo;s amazing how much time you will save on the long run plus not to mention that you don&rsquo;t need to manually repeat those redundant steps every time you want to test the customer class.</li>
    <li>A few days later, when you come to this code for what ever reason you will have a verifiable piece of code to tell you what the code is supposed to do. The code might <em>not </em>look as familiar to you as it did a few days/weeks/months ago. Yet, you will have a verifiable piece of code that tells you what it used to do.</li>
    <li>If something accidentally breaks this code (e.g. a new constrain the database prevents a NULL value in a field that used to allow NULLS) you will have a way to know that this piece of code that used to work now it doesn&rsquo;t. You won&rsquo;t need to wait for a user to fire the application and tell you that he is having problems saving new customers. You will know sooner rather than later.</li>
</ul>
<h4>Did you say I can unit test against a database?</h4>
<p>If you've read some of the classic literature on unit tests you are probably thinking that I've just commited some horrible sins just by saying that my unit test was for adding a record to the database. Aren't unit tests suppossed to be independed of external components like databases? Isn't it a big no-no talking about unit tests and databases on the same sentence?</p>
<p>The truth is that there are two camps on this issue. One camp says that unit tests should not have dependencies on external components. The other camp says that there is not such thing, that all code has dependencies. As you can guess, I am on the second one.</p>
<p>The way I see it is that since most of us writte business applications that do pretty much database access (reading, creating, updating, and deleting) let's just bite the bullet and writte unit tests that rely on the database. After all, a lot of the problems that happen in these applications <em>are </em>related to the database (e.g. changes to the data structures and stored procedures, connectivity issues, et cetera.)</p>
<p>Now, you do pay a price for writting tests against a database. For example your unit tests will be slower than if they don't hit a database, changes in the database will break your unit tests even though the problem might not be in your code but in the database itself. But even with that, I think it's worth doing it that way.</p>
<h4>To mock or not to mock, that is the question</h4>
<p>Martin Fowler has a great article called <a href="http://www.martinfowler.com/articles/mocksArentStubs.html" target="_blank">Mocks Aren&rsquo;t Stubs</a>. In this article he describes the differences between these two types of helpers (mocks and stubs) and the ramifications that come when using them.</p>
<p><span>Fowler starts by pointing out that there are in fact two main differences between mocks and stubs. One is that <em>stubs are used for state verification</em> while <em>mocks are used for behavior verification</em>. The second difference is the whole approach to Test Driven Development that each of these techniques brings to the table.</span></p>
<p><span>I highly recomment his article for any one interested in understanding why and when to use mock objects.</span></p>
<h4><span>But I already test my code, how is this different from what I do?</span></h4>
<p><span>The truth is that most likely you already do something very similar to unit testing. Most developers write little code snippets, SQL scripts, and test utilities to find problems and verify their code as they write it. However, we usually do this rather informally and we treat this kind of code as throw away code.</span></p>
<p><span>So instead of throwing away our test code with unit testing we make it part of the <em>real </em>code. We keep it under source control, we run it on a constant basis, and we maintain it to reflect changes to the application code. </span></p>
<h4><span>How should I start?</span></h4>
<p><span>Start simple. Do small tests first, even if they just test the obvious (e.g. a record was added to the database after you execute your Save method.) </span></p>
<p><span>Read some of the literature on unit testing, in particular check the first chapters of <a href="http://www.amazon.com/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530">Test Driven Development: By Example</a> (TDD) and </span><a href="http://www.pragmaticprogrammer.com/titles/utc2/" target="_blank"><u><font color="#810081">Pragmatic Unit Testing in C#</font></u></a></p>
<p>Although I recomment the book on TDD to get familiar with the ultimate goal of unit testing and the rational behind it, I don't recomment that you try to start doing TDD right of the bat. Get comfortable with the concept and then experiment with the different styles of writting tests.</p> ]]></description><link>http://hectorcorrea.com/blog/Thoughts-on-Unit-Testing.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Thoughts-on-Unit-Testing.aspx</guid><pubDate>2007-01-09 05:22</pubDate><source url="http://hectorcorrea.com/blog/Thoughts-on-Unit-Testing.aspx" /></item><item><title>Binary Tree in C#</title><description><![CDATA[ <p>A few months ago I decided write a C# program to handle binary trees. I was lucky to still remember some of the basics of this data structure from my college days and was able to write a program to handle the add operation and the code to &quot;walk the tree&quot; in a few hours. To make things more interesting I also decided to write a program to draw the binary tree on the screen. This turned out to be an interesting challenge and kept me busy for a few weeks.</p>
<p dir="ltr" style="margin-right: 0px">The <a href="/downloads/DataStructures.zip">source code for this program is here</a>. This version uses generics so it can be used with any type that implements the IComparable interface.</p>
<p>A binary tree, as indicated in <a target="_blank" href="http://en.wikipedia.org/wiki/Binary_tree">Wikipedia</a>, is a tree data structure in which each node has at most two children. To implement this data structure I created two classes: <strong>BinaryTreeNode</strong><t></t> and <strong>BinaryTree</strong><t></t>. The former is used to represent each node while the later is used to organize the nodes following the rules of binary trees. In addition, I created a third class <strong>BinaryTreeDrawer</strong><t></t> that implements the algorithm to actually draw a binary tree on the screen and let you <em>see </em>how the information is organized.</p>
<p dir="ltr" style="margin-right: 0px"><em>A word of caution.</em> Although in production environments tree structures are used to optimize access to information the classes that I am providing here were not implemented with performance and optimization in mind. These classes are meant to showcase how binary trees are organized internally and allow people <em>to see them</em>.</p>
<p>The demo program allows you to add values to a binary tree and see how the tree looks graphically. For example, below is the graphical representation that it generates when the following values are added to a binary tree: 100, 50, 150, 25, 75, 12, 40, 60, and 90.</p>
<p align="center"><img height="156" alt="binary tree image" width="202" border="0" src="http://hectorcorrea.com/Images/binarytree2.png" /></p>
<p>It is interesting to see how trees with random values look on the screen when hundreds of nodes are added to them. Click <a target="_blank" href="/downloads/binarytree200nodes.png">here</a> if you want to see a binary tree with 200+ random nodes (180 KB.)</p>
<p>With any luck I'll post an updated version in the next few weeks that will include the find and delete operation. My real goal is to post a program to represent <strong>B-Trees</strong> and <strong>B<sup>+</sup>-Trees</strong> in C# (which are the kings of the trees) and that a lot of people confuse with binary trees. Stay tuned.</p>
<p><img alt="" border="0" src="http://hectorcorrea.com/images/download.gif" />&nbsp;Download the <a href="http://hectorcorrea.com/downloads/DataStructures.zip">source code</a>.</p> ]]></description><link>http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx</guid><pubDate>2006-11-27 09:42</pubDate><source url="http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx" /></item><item><title>Book review: Lean Software Development</title><description><![CDATA[ <p>A couple of weeks ago I finished reading <a target="_blank" href="http://www.amazon.com/exec/obidos/ISBN=0321150783">Lean Software Development</a> by Mary and Tom Poppendieck. What a great little book! In this book Mary and Tom present several tools for lean (their term for agile) software development plus an excellent background on why these types of methods work.</p>
<p>Mary has a background (theory and practice) on manufacturing processes and in this book she describes how lean processes were/are successfully applied by companies like Toyota and 3M. I am usually disappointed when people try to compare software development to other industries (e.g. construction of buildings) because most of the times they don't have any background on the other field and make unfounded simplifications. Mary, on the other hand, has real life experience on manufacturing and software development and can compare between the two with realistic examples.</p>
<p>In this book the authors describe 7 lean principles, their rational, and how to apply them to software development:</p>
<ol>
    <li>Eliminate waste</li>
    <li>Amplify learning</li>
    <li>Decide as late as possible</li>
    <li>Deliver as fast as possible</li>
    <li>Empower the team</li>
    <li>Build integrity</li>
    <li>See the whole</li>
</ol>
<p>Of these principles, <strong>eliminate waste</strong> is probably the most well known in agile software development and most people in our industry have come to accept it as a good think. Some other concepts, like <strong>deciding as late as possible</strong>, are typically not well understood by managers (and developers) and can be seen as incompatible with software development. Deciding as late as possible means that we don't need to make premature decisions about the software and we should keep our options open. This allow us to decide only <em>when we have enough information</em> about the system. For example, let's say that we are about to roll out version 1.0 of our system and we are not sure if we need to support &quot;undo&quot; in a specific feature. Instead of guessing and locking ourselves into the decision (possible an expensive one), let's roll the system out, see it in action, and <em>then</em> evaluate if we need this feature. Once the users use our system we might find that undo is actually needed but not in the way that we had anticipated. So instead of locking ourselves with a solution ahead of time, let's wait until we know enough about the problem. As the authors say, the key to be able to decide as late as possible is that we must build a capacity for change into the system. Unit testing and Test Driven Development are two good ways to account for this.</p>
<p>&nbsp;</p>
<p>In addition, Mary and Tom provide with 22 thinking tools that can be applied in software development.</p>
<ol>
    <li>Seeing Waste</li>
    <li>Value Stream Mapping</li>
    <li>Feedback</li>
    <li>Iterations</li>
    <li>Synchronization</li>
    <li>Set-Based Development</li>
    <li>Options Thinking</li>
    <li>Queue Theory</li>
    <li>and 14 others</li>
</ol>
<p>Although a large part of the material presented in this book can be found in other books (e.g. <a target="_blank" href="http://www.amazon.com/exec/obidos/ISBN=073561993X">Agile Project Management with Scrum</a> by Ken Schwaber and <a target="_blank" href="http://www.amazon.com/exec/obidos/ISBN=0131111558">Agile &amp; Iterative Development</a> by Craig Larman) this one includes comparison with other industries that are hard to find in other books. In addition, the authors provide the theory and motivation behind each lean/agile principle from a point of view that is not exclusive to software development. This makes the book an excellent guide for people involved in software projects without a software background (e.g. business owners.)</p> ]]></description><link>http://hectorcorrea.com/blog/Book-review-Lean-Software-Development.aspx</link><author>Hector Correa</author><guid isPermaLink="true">http://hectorcorrea.com/blog/Book-review-Lean-Software-Development.aspx</guid><pubDate>2006-05-08 02:38</pubDate><source url="http://hectorcorrea.com/blog/Book-review-Lean-Software-Development.aspx" /></item></channel></rss>