<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Software Engineering</title>
        <link>http://www.sharpdeveloper.net/content/category/4.aspx</link>
        <description>All things related to software engineering.</description>
        <language>en-US</language>
        <copyright>Sameer Alibhai</copyright>
        <managingEditor>abdullah.adam@gmail.com</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Follow The Leader</title>
            <link>http://sharpdeveloper.net/content/archive/2008/07/17/follow-the-leader.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;In order to succeed as a team, in any sort of team, you have to follow this basic principle, which has been applied and maybe is accepted universally.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;The principle is simple. &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ol style="MARGIN-TOP: 0in" type="1"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Appoint a Leader&lt;/span&gt; &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Leader makes council with the team&lt;/span&gt; &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Leader makes a decision&lt;/span&gt; &lt;/li&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;Team supports leader in his or her decision &lt;/li&gt;
&lt;/ol&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Its that simple. In this way, an organization, a team, a family, or a company can move forward. Every decision that you need to make, is done in this manner. The team will work together for the best solution, but in the end the leader needs to make a decision. Once that leader makes a decision, the team needs to move forward WITH the leader. &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
This means, the leader doesn’t necessarily dictate, but he or she has gathered input from the team and made a decision. Then they will have to choose a solution and go with it. If the team continues to argue and fight over the decision, progress will be slow. I believe this applies in families too. There has to be a decision maker in the family, for example that is appointed for financial decisions, and then having a discussion or gathering input from the family is great, but in the end one person has to make the decision, and the family needs to be supportive, &lt;strong&gt;even if they don’t all agree with it&lt;/strong&gt;. However, this applies in normal circumstances and there are caveats.   There might be some cases where it would be unethical for team members to support a plan if its morally wrong or it goes against everything inside them and they feel it’s a plan headed for disaster.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;It pains me that time and time again I see this happen – the leader makes a decision and the team continues to question him at every step of the way – “Why are we doing this”, “Why are we doing this”, and “why are we doing this” instead of understanding that they were appointed for this role (they might be your boss for example) and they are ultimately responsible for the decision, you need to do your job and support them.  I have seen some cases where I questioned my manager because I didn't see the wisdom in the decision he made, but in the end it turned out he was right and it was just my foresight wasn't as far as his...  So I learned my lesson, be patient, and be a team player.  &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
As a team member, sometimes I have to swallow my feelings and say, “okay I don’t think this is the smartest decision and my idea is actually better, but I will go with you on this”.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;From a developers perspective, you can think of this as &lt;strong&gt;requirements.&lt;/strong&gt; Your boss gives you the requirements, you implement it. How you implement is up to you, but you won’t be able to proceed if you start arguing about the requirements. Requirements are requirements, once they are agreed upon, please continue.&lt;/span&gt;&lt;/div&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;br /&gt;
So in normal circumstances, if you want to succeed, get a leader, and help him with his decisions, but in the end.. Respect the decision he makes and go with it. (He or she, that is).&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;em&gt;The best team isn't necessarily the one with the best players, it's the one that plays together the best.  &lt;/em&gt;&lt;/div&gt;
&lt;/span&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/72.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/07/17/follow-the-leader.aspx</guid>
            <pubDate>Thu, 17 Jul 2008 22:40:22 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/72.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/07/17/follow-the-leader.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/72.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How to Waste Millions Of Dollars With Outsourcing (or Make Millions)</title>
            <link>http://sharpdeveloper.net/content/archive/2008/07/10/how-to-lose-millions-with-outsourcing-or-make-millions.aspx</link>
            <description>&lt;style type="text/css"&gt;&lt;![CDATA[
 ol.c5 {margin-top: 0in;}
 span.c4 {font-weight: bold; font-size: 10pt;}
 span.c3 {font-size: 80%}
 p.c2 {font-size: 80%}
 span.c1 {font-size: 10pt;}
]]&gt;&lt;/style&gt;
&lt;p class="c2"&gt;&lt;span class="c1"&gt;To management, the idea of outsourcing sounds very sexy.... The idea of producing the same content (code, or what not) at 1/2 or 1/3&lt;sup&gt;rd&lt;/sup&gt; the cost is almost a wet dream for management, if I may be so bold. Even though it sounds great in theory, it's actually a very tricky function to master. Here are some things I have learned with my outsourcing experience.&lt;/span&gt;&lt;/p&gt;
&lt;p class="c2"&gt;&lt;span class="c1"&gt;Keep in mind I am not discussing the outsourcing style of passing requirements and getting the end product complete. I am discussing the style of hiring outsiders and working with them on a daily basis.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p class="c2"&gt;&lt;span class="c1"&gt;You have to start by looking at what is the purpose of outsourcing. Is it to save money? Or is it to improve quality? Or is it so that your team can focus on other things? Get this straight first before going any further. My points below are in the context that you are a software company (or at least do some software development) and you are considering outsourcing to save money and cut costs.&lt;/span&gt;&lt;/p&gt;
&lt;p class="c2"&gt;&lt;span class="c1"&gt;From friends, I know that some very popular companies outsource, such as E-Trade Canada, Accenture, and recently the new online T.V. web site Hulu which outsourced its development to China.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;ol type="1" class="c5"&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Before you start outsourcing, have your process solid - i.e. have regular scrum, know how much code you are generating each week, and so on. It's very important that you have some idea of costs for developing software for your local team. If you have no idea, you won't be able to see if you are really saving money or wasting it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Know velocities of individual team members so you can measure cost effectiveness of your outsourced work.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;&lt;a five-points-to-improve-your-estimation.aspx="" archive="" content="" sharpdeveloper.net="" http:="" href="http://sharpdeveloper.net/content/archive/2008/03/28/five-points-to-improve-your-estimation.aspx"&gt; Build your estimation skills&lt;/a&gt;. Read Joel's &lt;a fog0000000245.html="" articles="" www.joelonsoftware.com="" http:="" href="http://www.joelonsoftware.com/articles/fog0000000245.html"&gt;article on estimation&lt;/a&gt; and his &lt;a items="" www.joelonsoftware.com="" http:="" href="http://www.joelonsoftware.com/items/2007/10/26.html"&gt;second article on estimation&lt;/a&gt; (which is really a promo for his bug tracking software but still worth reading) and Steve McConnell's book on Software Estimation (highly recommended, very easy to understand).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;&lt;span class="c3"&gt;&lt;span class="c4"&gt;Get smart/able/competent guys.&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt; &lt;span class="c3"&gt;&lt;span class="c1"&gt;This can make or break your outsourcing project. If you are going to get developers that need baby sitting, then hire a baby sitter on their end to clean up their code, otherwise you are going to waste your valuable resources fixing and re-fixing and re-fixing their code. In this case you might not be actually saving money.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Review their code. Someone on your side is going to have to review their code to make sure that they aren't purposely obfuscating it in order to secure their jobs in the future. I have seen a Flash application that was built in this manner, the team overseas purposely messed up the code in such a way that it would be difficult for others to continue where they left off.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Learn from those who have done it before. If not, you are going to mess up big time, in many ways. Might be worth getting a consultant who has been successful with such projects. Another idea is to find someone who has connections "back home", and go there to see how some of the shops work.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Turnover is really high in India/Bangladesh/ and so on. This is because jobs start at really low salaries (like $200 a month) and go upwards to like $3000 a month (comparable to working in Canada or USA). You will need to find a way to solve this problem. Somehow you will need to get them to commit that guys will not drop like flies. This is so important because there is always an upfront cost to learn an application, and it becomes more as the complexity and lines of code increase.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;Consider a cross-cultural learning program, you send some people there for a while, they come over here for a while. A lot of big companies do this. It's almost a must.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="c3"&gt;&lt;span class="c1"&gt;For the team overseas, its important to spend your valuable time together in the beginning to ask lots of questions and understand the requirements as much as possible, in case there is a task that you run into questions, then leave it and work on something else.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="c2"&gt;&lt;span class="c1"&gt;Hamid, Axosoft CEO claims that &lt;a outsourcing-is-for-dummies="" shipsoftwareontime.com="" http:="" href="http://shipsoftwareontime.com/2007/12/03/outsourcing-is-for-dummies/"&gt;Outsourcing is for Dummies&lt;/a&gt;. I think this isn't true in all cases, as I have been able to apply outsourcing successfully on some small projects. However, it all depends on the case, and for building complicated software with a (geographically) fragmented team, you may just end up proving his point.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/71.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/07/10/how-to-lose-millions-with-outsourcing-or-make-millions.aspx</guid>
            <pubDate>Thu, 10 Jul 2008 22:14:17 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/71.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/07/10/how-to-lose-millions-with-outsourcing-or-make-millions.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/71.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Updating Your Web.Config From Each Build with CruiseControl</title>
            <link>http://sharpdeveloper.net/content/archive/2008/06/17/updating-your-web.config-from-each-build-with-cruisecontrol.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Let's say you have CruiseControl.NET all set up nice and hunky dory.  Now you love the fact that it labels your each build, and you want to somehow show that from your project.  Here is how you can get your CruiseControl.NET project build number into your Web.Config.  This concept can be applied to update any file.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;It’s super easy. You will need to add an exec block to your ccnet.config&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;exec&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                         &amp;lt;!--&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green"&gt; Auto increment web.config build number &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;executable&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;E:\Userdata\CruiseControl\Tools\MergeWebConfigValues.exe (my custom tool)&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;executable&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;buildArgs&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;"E:\Program Files (x86)\CruiseControl.NET\server\Main.state" e:\userdata\cruisecontrol\Dev_Main\Web.config&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;buildArgs&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;baseDirectory&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;e:\userdata\cruisecontrol\Dev_Main&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;baseDirectory&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;buildTimeoutSeconds&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;15&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;buildTimeoutSeconds&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;                  &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515"&gt;exec&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; Now all you need to do is write the &lt;strong&gt;MergeWebConfigValues.exe&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;What does it do?&lt;br /&gt;
1. It reads the CCNET state file (provided by argument 1) and grabs the last label from there. (The state file is an XML file)&lt;br /&gt;
2. It then goes and writes to your Web.Config and updates the build number in there. (or writes to any specified file you like)&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Lastly, update your code to read this value by adding some version or about page to read your Web.Config&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;br /&gt;
You now instantly know what version your code is.&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/69.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/06/17/updating-your-web.config-from-each-build-with-cruisecontrol.aspx</guid>
            <pubDate>Tue, 17 Jun 2008 23:10:32 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/69.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/06/17/updating-your-web.config-from-each-build-with-cruisecontrol.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/69.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Unit Testing on Your Database</title>
            <link>http://sharpdeveloper.net/content/archive/2008/05/22/unit-testing-on-your-database.aspx</link>
            <description>&lt;p&gt;When unit testing on your database, you will run into a common problem.&lt;/p&gt;
&lt;p&gt;Rolling back.&lt;/p&gt;
&lt;p&gt;So you want to do some unit tests, and then you want to reset your database back to the nice squeaky clean version that doesn't have half failed unit tests.&lt;/p&gt;
&lt;p&gt;So how can you do this?&lt;/p&gt;
&lt;p&gt;There are many ways to achieve this.&lt;/p&gt;
&lt;p&gt;The best way I found (requires Win XP SP2 or Windows Server 2003) is to use Roy's Unit Testing Rollback Attribute.  Simply inherit his class, add a "DataRollback" attribute, and you are good to go.  Using some complicated Interception logic and Enterprise Services (COM+) it rolls back all the database work that was done.  It's super easy to implement.  Here is some sample code that shows you just how easy it is.  You just have to download &lt;a href="http://weblogs.asp.net/rosherove/archive/2004/07/20/187863.aspx"&gt;XtUnit&lt;/a&gt; (an extension to NUnit) to do this. (Full source code available)&lt;/p&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; System;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; System.Data;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; System.Collections.Generic;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; System.Text;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font size="2"&gt;&lt;span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt"&gt; TeamAgile.ApplicationBlocks.Interception.UnitTestExtensions;&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; NUnit.Framework;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; System.Data.SqlClient;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; Microsoft.ApplicationBlocks.Data;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#0000ff" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;namespace&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; DBTest&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;{&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    &lt;font color="#808080"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    &lt;font color="#808080"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;/font&gt;&lt;font color="#008000"&gt;&lt;span style="COLOR: green"&gt; Test roll back functionality.&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    &lt;font color="#808080"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    [&lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;TestFixture&lt;/span&gt;&lt;/font&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;RollbackTest&lt;/span&gt;&lt;/font&gt; : &lt;strong&gt;&lt;font color="#2b91af"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: #2b91af"&gt;ExtensibleFixture&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        [&lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Test&lt;/span&gt;&lt;/font&gt;, &lt;strong&gt;&lt;font color="#2b91af"&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: #2b91af"&gt;DataRollBack&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        [&lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Category&lt;/span&gt;&lt;/font&gt;(&lt;font color="#a31515"&gt;&lt;span style="COLOR: #a31515"&gt;"Database"&lt;/span&gt;&lt;/font&gt;)]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;/font&gt; TestInsert()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#008000"&gt;&lt;span style="COLOR: green"&gt;//this method will be performed inside a COM+ transaction&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#008000"&gt;&lt;span style="COLOR: green"&gt;//this requires windows XP SP2 or better&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#008000"&gt;&lt;span style="COLOR: green"&gt;//Windows Server 2003 works as well.&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;/font&gt; strCnn = &lt;font color="#a31515"&gt;&lt;span style="COLOR: #a31515"&gt;"your_conn_string"&lt;/span&gt;&lt;/font&gt;;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Guid&lt;/span&gt;&lt;/font&gt; random = &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Guid&lt;/span&gt;&lt;/font&gt;.NewGuid();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;/font&gt; sqlI = &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;/font&gt;.Format(&lt;font color="#a31515"&gt;&lt;span style="COLOR: #a31515"&gt;@"insert into log4net (message,date,thread,level,logger) values ('{0}',getdate(),'{1}','Debug','Test')"&lt;/span&gt;&lt;/font&gt;, random.ToString(), System.Threading.&lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Thread&lt;/span&gt;&lt;/font&gt;.CurrentThread.GetHashCode());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;SqlHelper&lt;/span&gt;&lt;/font&gt;.ExecuteNonQuery(strCnn, &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;CommandType&lt;/span&gt;&lt;/font&gt;.Text, sqlI);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;/font&gt; sqlS = &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;/font&gt;.Format(&lt;font color="#a31515"&gt;&lt;span style="COLOR: #a31515"&gt;@"select count(*) from log4net where message='{0}'"&lt;/span&gt;&lt;/font&gt;, random.ToString());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;/font&gt; rowcount = (&lt;font color="#0000ff"&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;/font&gt;)&lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;SqlHelper&lt;/span&gt;&lt;/font&gt;.ExecuteScalar(strCnn, &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;CommandType&lt;/span&gt;&lt;/font&gt;.Text, sqlS);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;            &lt;font color="#2b91af"&gt;&lt;span style="COLOR: #2b91af"&gt;Assert&lt;/span&gt;&lt;/font&gt;.That(rowcount &amp;gt; 0, &lt;font color="#a31515"&gt;&lt;span style="COLOR: #a31515"&gt;"Cannot find {0}"&lt;/span&gt;&lt;/font&gt;, random.ToString());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;        }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;    }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;This test passes successfully.  What does that mean? The insert and select worked perfectly fine.  After that, I did a query and found the database to be clean.  So the rollback worked too.&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;There are also other ways to skin this cat (i.e. to achieve this goal).  One is to use Spring Framework and extend their Unit Testing class (&lt;em&gt;AbstractTransactionalSpringContextTests&lt;/em&gt;), and they will handle rolling back everything.  Here is &lt;a href="http://www.cnblogs.com/taotao/archive/2007/08/20/862840.html"&gt;an article on this topic&lt;/a&gt;, but unfortunately I was not able to make it work for me due to some odd reason.  Here's hoping you have better luck.  If you don't have any transactions, and your code is wired to use Spring, it's still also very easy, you just need to call &lt;a href="http://www.sharpdeveloper.net/content/archive/2008/04/30/manage-your-transaction-chaos-with-spring-framework.aspx"&gt;TransactionManager.Rollback&lt;/a&gt;.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;You can also try to achieve this using Nested Transactions if you have existing transactions implemented via Spring.  But then you have to set up checkpoints and stuff like that.  &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;I have some other ideas on how to achieve this that I will post later, God willing.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/67.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/05/22/unit-testing-on-your-database.aspx</guid>
            <pubDate>Thu, 22 May 2008 22:09:58 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/67.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/05/22/unit-testing-on-your-database.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/67.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Unit test your life!</title>
            <link>http://sharpdeveloper.net/content/archive/2008/04/29/unit-test-your-life.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;If you are not unit testing your code, chances are you are not unit testing &lt;strong&gt;in your life.&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;If you aren’t unit testing, START now! At the very least, do some “manual” unit testing in your code. How can you do this? Well, try running your code on a very basic case. Then try a bit more complicated case. Then another, then another. If you are smart, you are saving these cases using a testing framework like NUnit. If not, well at least you can have some confidence when your manager comes that you tried it comprehensively and that it’s not going to crash on you while you are showing it to him, or even worse, in a demo to the team or to your big boss.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;I recently ran into some &lt;strong&gt;problems&lt;/strong&gt; in my life which I managed to solve amazingly well by doing “unit testing”...&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;First problem, my DVD burner was going awfully slow. I had some complex and messy setup including an external IDE card, two burners, two hard drives, and all I know is that at some point in time something went wrong and it started going &lt;em&gt;really slow&lt;/em&gt;. What I don’t know, is how it happened.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
Second problem, I was doing some video encoding/rendering, and for some reason it was doing something bizarre and the application VirtualDub kept looping over and over and would never end encoding the file. Again, I don’t know what happened.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
How did I solve these problems?&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;font size="5"&gt;UNIT TESTING!!&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;For the first problem of the DVD drive. I removed everything from my PC and set up a very basic system which included 1 HD, 1 Burner, etc..   Then when I found this wasn’t working, a quick check online and I resolved the issue which was incorrect DMA settings. It was trying to send all the data through the CPU (PIO mode) instead of directly to the burners, which was causing a massive slowdown. Once this worked, I quickly put together my system again, and checked each case (HD on same IDE channel as Burner, on separate IDE channel, and so on). &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
With the encoding problem, again, I was very confused, but by unit testing the situation, I was able to resolve it. How did I do that? I tried encoding on a different machine, reinstalled the software, etc, etc, and it was still having problems.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;And finally when I started from scratch, I removed the batch encoding, I removed the DiVX processing, and so on, and then made each test pass. Once the test passed, I added another level of complexity, until finally I figured out that VirtualDub was looping infinitely because I had the “segment AVI file” option enabled. I don’t know why this was the problem, but by &lt;strong&gt;unit testing&lt;/strong&gt;, I was able to resolve it.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
Lesson to learn? Unit testing (if you can call it that) can really help you solve such issues. Start from the base case, and slowly work back towards what you need. After each case, write down the results.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
Microsoft felt strongly enough about Unit Testing that &lt;a href="http://haacked.com/archive/2008/02/12/asp.net-mvc-update.aspx"&gt;Visual Studio 2008 has &lt;strong&gt;built in&lt;/strong&gt; unit testing&lt;/a&gt; (Wahoo!). As well, it integrates nicely even with NUnit or MbUnit (Don’t ask me how, though). &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/63.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/04/29/unit-test-your-life.aspx</guid>
            <pubDate>Tue, 29 Apr 2008 23:25:53 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/63.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/04/29/unit-test-your-life.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/63.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Five Points To Improve Your Estimation</title>
            <link>http://sharpdeveloper.net/content/archive/2008/03/28/five-points-to-improve-your-estimation.aspx</link>
            <description>&lt;div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Software Estimation is tricky business.  You are often confronted with complicated technical (or even non-technical) work and asked “how long will it take?” on the spot.  You are given fuzzy requirements (or no requirements) with ambiguous definitions and have to work with a code base that is best described as “chaos”.  How can you give an accurate estimate with such a difficult environment?  &lt;br /&gt;
&lt;br /&gt;
I recently read an excellent book called “&lt;a href="http://www.amazon.com/exec/obidos/ISBN=0735605351/csharpfriends-20"&gt;Software Estimation: Demystifying The Black Art&lt;/a&gt;"&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Here are some amazing points that you can use.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;1)&lt;font size="1"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;We should not be pressured to reduce our estimates.  Stick to your estimates – whatever they are.  If management wants to reduce them, that’s fine, but stick to whatever you put in the first place.  Managers trying to reduce estimates is a very silly thing to do, because by looking at the track record of our software industry, you will find that we consistently underestimate, not overestimate!  So if you are pressuring your developers to reduce the estimate, you are asking for trouble.  Better thing to do would be to see if the estimate is well founded, based on task level estimates, or is the estimate based on unjustifiable assumptions, etc.  &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;2)&lt;font size="1"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Underestimating is &lt;strong&gt;&lt;span style="FONT-WEIGHT: bold"&gt;MORE expensive&lt;/span&gt;&lt;/strong&gt; than overestimating.  So if you cannot estimate accurately, lean towards overestimating.  Underestimating has an exponential additional cost, whereas overestimating has a potential of a linear extra cost due to Parkinson’s law.  This is because underestimating results in lots of other problems such as having extra meetings to justify why you are behind schedule, having extra meetings to decide which features to cut, added stress on developers trying to meet tight deadlines, code having less quality in order to ‘just finish it’ so that developers can go home, having customers get angry at not-ready releases, having other teams who are waiting for the code to slip their schedules too, etc..  If you overestimate, then Parkinson’s law can kick in and developers will ‘fill in the empty time’, or as they say ‘work expands to fill the available time’&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;3)&lt;font size="1"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Task level estimates are best done by the developer who will be doing the work.  A task level estimate is defined as a low level estimate for a particular item of work.  For example, for building a workflow engine, a task level estimate is “2 hours to add the save button that will commit the changes to the database”.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;4)&lt;font size="1"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;With small teams (say under 5 people), estimates are most accurate when done bottom-up (i.e. from the developers).  What this means is your complicated formulas for estimation are not so helpful in such environments.  &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;5)&lt;font size="1"&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;There are many other ways to estimate such as ‘estimation by analogy’ (i.e. by looking at a similar project that was built), and so on, but I won’t explain those right now.  The trick in general is to try to quantify as much as possible and leave subjectivity out of the picture.  So if you can find out how similar your project is in terms of number of lines of codes, number of features, etc, you will have a better estimate.  As well, don’t be fooled into thinking that more “estimation knobs” will give you a better result than less “estimation knobs”.  I define an estimation knob as some sort of criteria you are using to estimate, such as “size of team”, “team programmer skills as a percentile of the industry”, “how many burgers they had for lunch”, etc..  It looks like it would give you a better result but in reality the estimate becomes more and more subjective as you add more “knobs” &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;As well, developers are more likely to try to meet their estimates if they are the ones who gave it, rather than if its dictated to them from above.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;br /&gt;
Lastly, estimation is a skill we can learn and improve over time.  You will find that over the months, your developers will get better at estimating based on past experience.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;In summary, stick to giving your developers clear requirements, lock them down, and then get them to break down the requirements into task items, and then estimate for those task items.  &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/60.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/03/28/five-points-to-improve-your-estimation.aspx</guid>
            <pubDate>Fri, 28 Mar 2008 12:32:19 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/60.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/03/28/five-points-to-improve-your-estimation.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/60.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How Random is your Random??</title>
            <link>http://sharpdeveloper.net/content/archive/2007/12/05/how-random-is-your-random.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;How random is your random?  &lt;br /&gt;
&lt;br /&gt;
Computers are very deterministic.  What that means is that you put something in, you get something out.  In order to get computers to perform "randomness", it is very difficult.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;Why is this important to understand? Because we want to write our code properly, if we depend on the random function for some security purpose, such as for generating passwords, we are actually putting security holes in our application without realizing it.&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;In .NET Using RNGCryptoServiceProvider would give you much better random results than just a Random.Next()&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx"&gt;&lt;font color="#800080"&gt;http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;However, in order to &lt;strong&gt;truly&lt;/strong&gt;  randomize your number, you would have to do something like use data from customer mouse movements, or something wierd like that.  &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;Alternatively you can use a hardware random number generator such as the one Intel created that uses thermal noise to generate &lt;strong&gt;real&lt;/strong&gt; random numbers&lt;/span&gt;&lt;/div&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;br /&gt;
To realize just how complicated this really is, lets look at this quote from the Pokerstars web site on how they shuffle the cards in their software:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;SHUFFLE&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;"Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin." - John von Neumann, 1951&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;We understand that a use of a fair and unpredictable shuffle algorithm is critical to our software. To ensure this and avoid major problems described in [2], we are using two independent sources of truly random data:&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;* user input, including summary of mouse movements and events timing, collected from client software&lt;br /&gt;
* true hardware random number generator developed by Intel [3], which uses thermal noise as an entropy source&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;Each of these sources itself generates enough entropy to ensure a fair and unpredictable shuffle.&lt;br /&gt;
Shuffle Highlights:&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;* A deck of 52 cards can be shuffled in 52! ways. 52! is about 2^225 (to be precise, 80,658,175,170,943,878,571,660,636,856,404,000,000,000,000,000 ways). We use 249 random bits from both entropy sources (user input and thermal noise) to achieve an even and unpredictable statistical distribution.&lt;br /&gt;
* Furthermore, we apply conservative rules to enforce the required degree of randomness; for instance, if user input does not generate required amount of entropy, we do not start the next hand until we obtain the required amount of entropy from Intel RNG.&lt;br /&gt;
* We use the SHA-1 cryptographic hash algorithm to mix the entropy gathered from both sources to provide an extra level of security&lt;br /&gt;
* We also maintain a SHA-1-based pseudo-random generator to provide even more security and protection from user data attacks&lt;br /&gt;
* To convert random bit stream to random numbers within a required range without bias, we use a simple and reliable algorithm. For example, if we need a random number in the range 0-25:&lt;br /&gt;
o we take 5 random bits and convert them to a random number 0-31&lt;br /&gt;
o if this number is greater than 25 we just discard all 5 bits and repeat the process&lt;br /&gt;
* This method is not affected by biases related to modulus operation for generation of random numbers that are not 2n, n = 1,2,..&lt;br /&gt;
* To perform an actual shuffle, we use another simple and reliable algorithm:&lt;br /&gt;
o first we draw a random card from the original deck (1 of 52) and place it in a new deck - now original deck contains 51 cards and the new deck contains 1 card&lt;br /&gt;
o then we draw another random card from the original deck (1 of 51) and place it on top of the new deck - now original deck contains 50 cards and the new deck contains 2 cards&lt;br /&gt;
o we repeat the process until all cards have moved from the original deck to the new deck&lt;br /&gt;
* This algorithm does not suffer from "Bad Distribution Of Shuffles" described in [2]&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;PokerStars shuffle verified by Cigital and BMM International&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;PokerStars submitted extensive information about the PokerStars random number generator (RNG) to two independent organizations. We asked these two trusted resources to perform an in-depth analysis of the randomness of the output of the RNG, and its implementation in the shuffling of the cards on PokerStars.&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;Both independent companies were given full access to the source code and confirmed the randomness and security of our shuffle. Visit Online Poker Random Number Generator for more details.&lt;/span&gt;&lt;/div&gt;
&lt;div style="BACKGROUND: whitesmoke; LINE-HEIGHT: 140%"&gt;&lt;span style="FONT-SIZE: 11pt; COLOR: #333333; LINE-HEIGHT: 140%"&gt;[2] "How We Learned to Cheat at Online Poker: A Study in Software Security" - &lt;a href="http://itmanagement.earthweb.com/entdev/article.php/616221"&gt;http://itmanagement.earthweb.com/entdev/article.php/616221&lt;/a&gt;&lt;br /&gt;
[3] "The Intel Random Number Generator" - &lt;a href="http://www.cryptography.com/resources/whitepapers/IntelRNG.pdf"&gt;http://www.cryptography.com/resources/whitepapers/IntelRNG.pdf&lt;/a&gt;"&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;Here is an article about how to shuffle a deck of cards: &lt;a href="http://www.codinghorror.com/blog/archives/001008.html?r=31644"&gt;&lt;font color="#800080"&gt;http://www.codinghorror.com/blog/archives/001008.html?r=31644&lt;/font&gt;&lt;/a&gt; and in one of the links it explains a big security hole in their random number generation and how it could have been used to leverage thousands of dollars from players.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;br /&gt;
Here is a snippet of how to get Cryographically safe random numbers:&lt;br /&gt;
&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;This will fill in the 8 bytes with a crytographically strong sequence of random values.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[] salt = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[8];&lt;br /&gt;
&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;RNGCryptoServiceProvider&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; rng = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;RNGCryptoServiceProvider&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;();&lt;br /&gt;
rng.GetBytes(salt);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/56.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/12/05/how-random-is-your-random.aspx</guid>
            <pubDate>Wed, 05 Dec 2007 13:52:22 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/56.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/12/05/how-random-is-your-random.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/56.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Get A Build Process Now!</title>
            <link>http://sharpdeveloper.net/content/archive/2007/10/31/get-a-build-process-now.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;This article will tell you how to get a build process. It uses CruiseControl.NET to automate the build.  You can use any other tool you like including a .BAT file, but CruiseControl will do just fine.  It's very easy to set up, it uses an XML configuration file and does most of the difficult job like connecting to your source control, applying labels, and getting your files to build for you.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;strong&gt;1. Install &lt;/strong&gt;&lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET"&gt;&lt;strong&gt;CruiseControl.NET&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;This software is just great. Its totally free. Really it is a sophisticated batch file (.BAT file). It allows you to set up a build process fairly easily.  It allows you to execute arbitrary processes and check the return codes and then report the results to your developers (or managers, or what not).&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;For example, you set it up to monitor your source control system (say SourceSafe or even a local folder in your file system) every 30 minutes, and then perform a build on it if there is changes. &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;It will report who made the last set of changes, what they did (check in, check out, delete, etc) by grabbing that information from your source control and also display the comment from the user that checked it in.  It also labels it in the source control as UNVERIFIED (build process failed), or by incrementing the build number (again, this is configurable).&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;strong&gt;2. Install CCTray&lt;/strong&gt; (its a little icon that sits in your tray and interfaces to the cruise control server to notify you when the build(s) are broken) &lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;If the build does not compile (according to the procedure you set it up to run such as MsBuild, or Visual Studio, or executing some process) it will turn red and the team will all know that the build is broken and must be fixed. One person can volunteer to fix this build.  Included with CruiseControl.  Or you can just use the web dashboard instead:&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt; &lt;img height="133" alt="Screenshot from CruiseControl Dashboard" width="1005" src="http://confluence.public.thoughtworks.org/download/attachments/4882433/Pic001.gif" /&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;strong&gt;3. Perform more advanced setup on it.&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;You can configure it to do just about anything. Our CruiseControl does a nightly build, runs &lt;a href="http://www.kynosarges.de/NDoc.html"&gt;NDOC&lt;/a&gt; (Alpha version, discontinued, you can use &lt;a href="http://blogs.msdn.com/sandcastle/"&gt;SandCastle&lt;/a&gt; instead if you like) to get the latest documentation, and also we have a separate project that runs some database unit tests against 5 or 6 QA databases. The NDoc step is a bit tricky if you are running a “Web Site Project” because by default the “Web Site Project” does not create XML documentation files when compiled and requires modifications to your Web.Config. Getting &lt;a href="http://www.nunit.org/"&gt;NUnit&lt;/a&gt; to run requires some advanced setup, because NUnit requires you to have a copy of the Web.Config in the local folder where the tests are run. You can also run a bunch of fun stuff like &lt;a href="http://www.redhillconsulting.com.au/products/simian/"&gt;Simian&lt;/a&gt; (Similarity Analysis, Duplicate Line counter), Fitnesses (another testing framework), &lt;a href="http://ncover.org/"&gt;NCover&lt;/a&gt; (Unit test coverage), etc..  It can also send out emails on each successful build if you like (technically it can do cartwheels if you have an exe file that you can make it call to do the cartwheels :))&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;strong&gt;4. Involve QA and the rest of the team &lt;/strong&gt;to start using the build numbers and relying on CruiseControl to verify the site compiles. Also you can start to add more unit tests to your code and strengthening the quality of your product, and then using NCover to verify how much of your site is tested. Not to mention you can also stick &lt;a href="http://www.gotdotnet.com/Team/FxCop/"&gt;FxCop&lt;/a&gt; in there! FxCop will analyse your code according to Microsoft Best Standards and create a report for you on bad code that is not according to their naming conventions, or bad code that is not using SQL Parameters (and could have SQL Injection vulnerabilities)&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt"&gt;More to come soon. In summary – CruiseControl makes a world of difference. Get it now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt"&gt;As Jeff Atwood wrote, "&lt;a href="http://www.codinghorror.com/blog/archives/000988.html"&gt;The F5 key is not a build process&lt;/a&gt;"&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/53.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/10/31/get-a-build-process-now.aspx</guid>
            <pubDate>Wed, 31 Oct 2007 21:44:11 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/53.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/10/31/get-a-build-process-now.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/53.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How Gmail Records Usage Statistics to Increase Conversions</title>
            <link>http://sharpdeveloper.net/content/archive/2007/09/12/how-gmail-records-statistics-to-increase-conversions.aspx</link>
            <description>&lt;p&gt;Recording statistics are good for any project.  You can do it on a macro level or a micro level.  Normally, we do it on a macro level (i.e. recording page hits for the entire site.).  However, we also sometimes use these same tools - say Google Analytics, to track clicks on certain buttons, etc.&lt;/p&gt;
&lt;p&gt;How about building your application with such logic?  At a past company, we used this information to record which menu items were most frequently clicked.  Just a simple insert into the database on menu item click (web application).  This allowed us to find menu items that were infrequently clicked, and we reworded them or moved the more important ones to more visible locations.&lt;/p&gt;
&lt;p&gt;The term conversion is used to mean something you are trying to achieve, say a sale, or a signup, or whatever it may be.  You can use this idea to monitor the effectiveness of your pages and increase conversions.  You can also use this to improve your user interface - say if certain menu items are rarely clicked, it could be a usability issue.&lt;/p&gt;
&lt;p&gt;As well, Google applies this trick!  They monitor (or so it seems) their "Sign up" button, and they change it multiple times and monitor the effectiveness of each one.&lt;/p&gt;
&lt;p&gt;Take a look at the different sign up buttons I have seen on GMail:&lt;/p&gt;
&lt;p&gt;&lt;img height="81" alt="Gmail signup 1" width="281" src="http://www.sharpdeveloper.net/screenshots/gmail_signup.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;This is the simple basic "Sign up for Gmail" link&lt;/p&gt;
&lt;p&gt;&lt;img height="118" alt="Gmail Pick a name" width="282" src="http://www.sharpdeveloper.net/screenshots/gmail_pick_a_name.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;This is the more fancy "Pick a name" link.&lt;/p&gt;
&lt;p&gt;It's sort of like their Google Adwords works, it allows you to set up ads to advertise your site or products, and allows you to monitor the effectiveness of that ad compared to the same ad say worded differently.&lt;/p&gt;
&lt;p&gt;The general rule is collect as much statistics as possible, and then decide what you want to do with it.  You can always delete it if you don't need it, but most likely it will be an eye opener for you.  You can then tweak your UI until you get it exactly how you like.  As well, to follow in the footsteps of GMail, you can use it to get more signups (or more generally known as "conversions") for your site!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/49.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/09/12/how-gmail-records-statistics-to-increase-conversions.aspx</guid>
            <pubDate>Wed, 12 Sep 2007 11:53:34 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/49.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/09/12/how-gmail-records-statistics-to-increase-conversions.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/49.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Growing Pains of a Software Company</title>
            <link>http://sharpdeveloper.net/content/archive/2007/07/16/growing-pains-of-a-software-company.aspx</link>
            <description>&lt;p&gt;There is a particular small software company that has been in business for more than 10 years that builds a web application similar to say PHPNuke.  Here are a few characteristics of this company: They have survived this far using Microsoft Visual SourceSafe for their source control (which is probably okay for small teams but starts to have problems when you start to use it extensively), they have not used any unit testing, they do not have any form of automated testing or regression testing.  They have sales in the millions of dollars, and they have about 6-10 developers and 2 QA (as well as many QA overseas).  Every time a build is made, the overseas QA team has to "crash test it" (meaning to run the site and click frantically until something breaks).  This does not mean there is no test plan, but rather this method of testing is very unreliable and prone to errors.  As well the number of customers they have is less than 100, and we can reasonably assume that simultaneously less than 10 users would be logged in for each application.   Now that the company is growing each one of these issues is going to bite them in the butt.  &lt;/p&gt;
&lt;p&gt;The boss might wonder, "if we got along this far without doing any of the following, well... why should we??".. But as a "soldier" on the front lines, you start to see the problems that can come up with this sort of thinking.&lt;/p&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;Not using unit testing&lt;/h2&gt;
&lt;p&gt;This means that QA receives a page that is not unit tested.  It is ad-hoc tested by the developer, meaning that they try to click and break their new code, but there is no form of automated manner to this testing.  As well, every time the code is updated, the developer has to re-test and re-re-test it manually.  As well there is no real confidence in the code other than the fact that the QA team has tried their best to crash it and it did not crash.  It might even be very time consuming and painful to set up the test each time.  Without unit testing, this is a lot of time wasted that could be used in development. Read up on &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;Test Driven Development&lt;/a&gt; for something else that you can gain from proper Unit Testing.  By the way, what does unit testing software cost you?  FREE if you use &lt;a href="http://nunitasp.sourceforge.net/tutorial/index.html"&gt;NUnit&lt;/a&gt;.  Or like $14,000 if you use IBM Rational Test RealTime. Its up to you. Just Do It.&lt;/p&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;Not using proper Source Control&lt;/h2&gt;
&lt;div&gt;Trying to implement branching ,sharing, multiple releases, with Visual SourceSafe! You will find it is very difficult.  As the company is growing they needed to be able to release and develop multiple versions concurrently.  This is near impossible with SourceSafe, if not very difficult, and they need to move into using a better source control software such as Team System, Subversion, Perforce, etc..  This will give them features such as atomic checkins, shelving (if required), cheap labels, etc..&lt;/div&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;Not using automated testing&lt;/h2&gt;
&lt;div&gt;This comes back to the earlier topic of unit testing...  Without automated testing, there is no &lt;strong&gt;confidence&lt;/strong&gt; in the code.  Each change, even a minor one, can possibly break some unknown piece of code in the system.  &lt;/div&gt;
&lt;div&gt;To hear a real story, making a change to a general object in the system caused a crash on a Report that was only somewhat related to the general object.  &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This was not noticed until &lt;strong&gt;on a live customer demo&lt;/strong&gt;, but due to slickness on the part of the presenter, it was overlooked.  This is a deadly game of cat and mouse, that can result in lost customer confidence and eventually lost customers.  AUTOMATED TESTING is FAR TOO IMPORTANT to not use, especially if your company is growing and growing.&lt;/div&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;Small number of customers&lt;/h2&gt;
&lt;div&gt;With a small number of customers, there are some problems that you have in your code that will not be noticed until you start to grow.  For example, if your code is not thread safe, and you are using shared/static variables that are not meant to be shared on a specific page, problems that might not show up until you have multiple users loading that page simultaneously.  This will happen as your number of customers grow.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;As well as load issues.  As a small shop, you can throw the most horrible piece of inefficient code and in most cases it will not cause a problem because your server can most likely handle it.  As you start to increase in size as a company, and as you have more people hammering your server, your inefficient code is going to start to tear at the seams and you will have to go back and re-organize it.    Sometimes code can survive and be in use for more than 5 years so its well worth your time to build it properly.   Look at your own code set and see how old it is.  If it's been years and years and you are still using it, re-consider that the time you spend to build it properly is well worth it.  Tell your boss to make sure he knows who he is hiring, as bad apples can spoil the whole pie.&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/40.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/07/16/growing-pains-of-a-software-company.aspx</guid>
            <pubDate>Mon, 16 Jul 2007 12:44:34 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/40.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/07/16/growing-pains-of-a-software-company.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/40.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>