<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Hamed Ahmadi</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/haahmadi/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/haahmadi/feed.xml</link>
    <description>wants to share his thought with you ...</description>
    <lastBuildDate>Sat, 11 Apr 2015 15:06:50 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Visual Studio 2012 RC Just Can't be Better!</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/visual-studio-2012-rc-just-cant-be-better</link>
      <pubDate>Thu, 31 May 2012 14:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2012/05/31/visual-studio-2012-rc-just-cant-be-better/</guid>
      <description><![CDATA[Today, we announced the release candidate of Visual Studio 2012 and .NET framework 4.5. It has been...]]></description>
      <content:encoded><![CDATA[<p>Today, we <a href="https://blogs.msdn.com/b/somasegar/archive/2012/05/31/visual-studio-2012-and-net-4-5-release-candidates-available-now.aspx" target="_blank">announced</a> the release candidate of Visual Studio 2012 and .NET framework 4.5. It has been tremendous improvements all over the product, in particular the performance. To get more information on the performance, please read <a href="https://blogs.msdn.com/b/visualstudio/archive/2012/05/25/visual-studio-11-performance-improvements-in-typing-and-editing-responsiveness.aspx" target="_blank">this post.</a></p>
<p>I am very honored to be part of this amazing release of Visual Studio. I am enjoying it, I am sure you will too.</p>
<p>Hamed</p>]]></content:encoded>
    </item>
    <item>
      <title>Get more Efficient at Daily Scrum Standups</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/get-more-efficient-at-daily-scrum-standups</link>
      <pubDate>Tue, 11 Oct 2011 23:05:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2011/10/11/get-more-efficient-at-daily-scrum-standups/</guid>
      <description><![CDATA[My crew encompasses 3 product owners, 9 developers and a development lead. As the ScrumMaster,...]]></description>
      <content:encoded><![CDATA[<p>My crew encompasses 3 product owners, 9 developers and a development lead. As the ScrumMaster, I&rsquo;ve always done my best to keep the daily standups as efficient and productive as possible while within 15 minute window.<br />Considering the fact that product owners were often chicken in the standup, everyone got roughly 2 minutes to share his status. However, this is easier said than done:</p>
<ol>
<li>A couple of people showed up a few minutes late; missing a part of the conversation, they would start asking some questions</li>
<li>If someone raised an impediment, others tried to help him and they would get into a detailed discussion</li>
<li>A developer described a work item finished the day before and the rest of the team started asking question about the outcome&hellip; sometimes 5 minute a person became normal</li>
<li>&hellip;</li>
</ol>
<p>I actually tried establishing some rules about showing up late, basically &ldquo;encouraging&rdquo; people to be on time (I&rsquo;m not going into the details, you can figure out what the best rules are based on your team&rsquo;s culture). Then I brought a jingle bell to the standups, which would go off when a person&rsquo;s two minute was up. That helped adjusting people&rsquo;s status update pace, but did not improve the quality of the content; we were still hearing a lot of details.</p>
<p>So we made another change to refocus people on the relevant topics. Instead of going around the circle and ask everyone &ldquo;what did you do, what are you going to do, any impediment&rdquo;, we started going over stories on the Scrum board and asking whether there was an update since yesterday&rsquo;s standup; what or why not. Going down through the list of stories, people would move the tasks on the board or raise hand if there were blocked. We then put a red sticky note on the board next to each story for correspondent blocking issues, but no one was allowed to get into the details at the standup. After the standup, interested parties would stay and discuss the issues. So here is a sample standup:</p>
<p>Me: &ldquo;is there any update for story A&rdquo;</p>
<p>Jon: &ldquo;task A1 is now completed, task A2 and A3 are in progress, not blocked&rdquo;</p>
<p>Me: &ldquo;is there any update for story B&rdquo;</p>
<p>Steve: &ldquo;Task B3 is done, task B4 is blocked on network issue&rdquo;</p>
<p>Me: &ldquo;here is a red sticky for the network issue next to story B&rdquo;</p>
<p>&hellip;</p>
<p>Steve, Jon and I then would discuss the details of the network issue after standup.</p>
<p>This might seem to be a very simple change, but it did actually help improve the efficiency of the standups significantly.</p>
<p>&nbsp;--</p>
<p>Good day</p>
<p>Hamed</p>]]></content:encoded>
    </item>
    <item>
      <title>How Can We Improve the Performance of Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/how-can-we-improve-the-performance-of-visual-studio</link>
      <pubDate>Mon, 19 Sep 2011 15:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2011/09/19/how-can-we-improve-the-performance-of-visual-studio/</guid>
      <description><![CDATA[Larry announced a new mechanism for Visual Studio users to give feedback on areas that are believed...]]></description>
      <content:encoded><![CDATA[<p>Larry <a title="announced" href="https://blogs.msdn.com/b/visualstudio/archive/2011/09/16/addressing-visual-studio-performance.aspx" target="_blank">announced</a> a new mechanism for Visual Studio users to give feedback on areas that are believed to need the most attention. Please go to <a title="UserVoice" href="https://visualstudio.uservoice.com/forums/131389-visual-studio-performance" target="_blank">UserVoice</a> and vote for what you think we should be focusing on.</p>
<p>We appreciate your valuable feedback.</p>
<p>Hamed</p>]]></content:encoded>
    </item>
    <item>
      <title>Efficiency vs. Productivity in Software Development</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/efficiency-vs-productivity-in-software-development</link>
      <pubDate>Sat, 10 Sep 2011 11:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2011/09/10/efficiency-vs-productivity-in-software-development/</guid>
      <description><![CDATA[Regardless of the methodology used, software development has a mission: delivering value to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;">Regardless of the methodology used, software development has a mission: delivering value to customers through software products and services, which serves the ultimate goal, making money!</span></p>
<p><span style="font-size: small;">One of the benefits that formal processes like Waterfall were supposed to deliver was to eliminate the chaos through the development of large projects, i.e. making the development more <i>efficient</i>.</span><br /><span style="font-size: small;">However, I believe these models went too far and made the development &ldquo;over efficient&rdquo;. All the far ahead planning, allocating resources, and trying to stick with the schedule preempted all buffers in the development team&rsquo;s capacity and left no room for reacting to the ever changing environment and dynamisms of the software development. The result is a reduction in the output or the value delivered to the customer. What agile practices have been emphasizing on is &ldquo;productivity matters the most&rdquo;.</span></p>
<p><span style="font-size: small;">Let me draw an analogy to make the matter more clear:</span></p>
<p><span style="font-size: small;">Consider a factory that manufactures a product. To do that, this factory utilizes four different machines M1, M2, M3, and M4. The raw material is the input to M1 and M2. The M1&rsquo;s output goes into M3, and the output of M3 and M2 flows into M4, which outputs the final product. Also assume that the M3 is a bottleneck, that is, its capacity is less than that of the other machines.</span></p>
<p><span style="font-size: small;">To reach the maximum efficiency for each machine (based on the definition of efficiency from Mariam-Webster: effective operation as measured by a comparison of production with cost, as in energy, time, and money), we want them to be working 24/7. We invested a lot in these machines and the more idle they are, the less their individual efficiency will be. Now let&rsquo;s look at the big picture: all machines are producing with their maximum capacity. Since M3 is a bottleneck, there is a pile of M1 parts in front of it ready to be processes. M4 also has a lot of M2 parts ready to go, but it is starving on M3 parts.</span></p>
<p><span style="font-size: small;">There are many major issues with this system, a few that comes to mind are:</span></p>
<p><span style="font-size: small;">1) It only can produce at the same pace as that of its bottleneck,</span></p>
<p><span style="font-size: small;">2) A lot of inventory is sitting to be processes (consider the risk of damage, cost of storage, etc.),</span></p>
<p><span style="font-size: small;">3) What if there is a required maintenance time for M3? Since we do not want to reduce the efficiency of other machines, we do not bother to pay the cost of repurposing another machine to produce M3 part, which is on the critical path of the product.</span></p>
<p><span style="font-size: small;">4) Any change in the product is very costly. Let&rsquo;s say we do need to change the design of M1 part; all the excess M1 inventories are now wasted.</span></p>
<p><span style="font-size: small;">Now let&rsquo;s redesign the system a bit: maybe M2 can be used to produce M3 parts as well (increasing the throughput), but there needs to be a setup cost to switch between parts each time. Also we slow down M1 to produce only as much as what machines that produce M3 parts can process (adding some idle time to M1). As you see, we decreased the efficiency of the individual machines to achieve higher productivity. We now produce more than before, deliver more to our customers and make more money.</span></p>
<p><span style="font-size: small;">A software development team is just like that factory: it produces products using limited resources with various capacities, only add the uncertainty of how long an activity would take and the fact that the 'machines' are much more sophisticated and multi-purpose. You can relate all the items I mentioned for the factory to a software development team. If the team shares the same goal and on the same mission I mentioned above, it needs to focus on its productivity, not efficiency! Any process or activity that the team goes through should get the team closer to its final goal. Conforming to this mindset is not easy though, it requires a culture change.</span></p>
<p><span style="font-size: small;">Once I heard from a project manager that &ldquo;we pay these people, so better keep them busy all the time&rdquo;! That is exactly the kind of thinking that could blow up a team&rsquo;s productivity.</span></p>
<p><span style="font-size: small;">Final word: I believe the most efficient team is not the most productive one!</span></p>
<p><span style="font-size: small;">--</span></p>
<p>Good day to you</p>
<p>Hamed</p>]]></content:encoded>
    </item>
    <item>
      <title>User's Perspective of Software Performance</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/users-perspective-of-software-performance</link>
      <pubDate>Sun, 12 Dec 2010 15:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/12/12/users-perspective-of-software-performance/</guid>
      <description><![CDATA[The software performance is usually defined as the responsiveness and scalability of the software*...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The software performance is usually defined as the responsiveness and scalability of the software* and it is a quality factor. Simply put, the responsiveness is how fast the software responds to an event and the scalability is how long the software can maintain the responsiveness under different loads. Note that both of the these software characteristics can be precisely defined (a goal(s) is set for each) and measured, and therefore, they are quantitative. </span></span></span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Now let me tell you an story about an experience I had&nbsp;when I was in college. I worked on a project which was supposed to make me rich (you know, "student rich" not "business rich"!). There was a demand for a system that could transfer live videos through the phone line. Different industries were interested in this system because managers and top engineers wanted to monitor what was going on in the manufacturing plants, usually placed in remote areas with no high speed internet, fiber optics, or satellite equipment.</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">My friend and I were offered to develop the software to stream videos captured by different types of industrial cameras over the phone line. Basically, the software should encode the live video captured by the camera in station A, encode the video and send it through the phone line to another instance of the software sitting on the other end of the phone line, station B. The software in station B should decode the stream and play it. Everything looked straight forward until the customers introduced and insisted on a set of requirements: </span></span></p>
<ol type="1" style="FONT-STYLE: normal; MARGIN-TOP: 0in; unicode-bidi: embed; FONT-FAMILY: Calibri; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; FONT-SIZE: 11pt; FONT-WEIGHT: normal">
<li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-style: normal; font-weight: normal;">The software should stream and play the video </span><span style="font-style: italic; font-weight: normal;">very fast </span><span style="font-style: normal; font-weight: normal;">(live, without a delay)</span></span></span></li>
</ol><ol type="1" style="FONT-STYLE: normal; MARGIN-TOP: 0in; unicode-bidi: embed; FONT-FAMILY: Calibri; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; FONT-SIZE: 11pt; FONT-WEIGHT: normal">
<li value="2" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"><span style="font-style: normal; font-size: 11pt; font-weight: normal;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The quality of the video should not change during the transmission</span></span></span></li>
</ol><ol type="1" style="FONT-STYLE: normal; MARGIN-TOP: 0in; unicode-bidi: embed; FONT-FAMILY: Calibri; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in; FONT-SIZE: 11pt; FONT-WEIGHT: normal">
<li value="3" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"><span style="font-style: normal; font-size: 11pt; font-weight: normal;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The video should play smoothly in station B</span></span></span></li>
</ol>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">We struggled a couple of months and reduced the delay between the time the video is fed to the software and when the video is played to six seconds. The quality changed during the transmission due to the encoding/decoding method we chose to reduce the delay. And also the video was playing with a few hiccups per minute because of the type of line (phone line) was used to transfer the stream.</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">When we demoed the software for the first time, one of the users who had never experienced video streaming before got excited and gave two thumbs up. He thought the delay was not really bad, the quality was acceptable, and the hiccups could be ignored. The other one, who regularly used high-speed internet video chatting, did not think the same way and he wanted all the requirements together...<span style="mso-spacerun: yes;">&nbsp; I did not become a rich student after all!</span></span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"></span></span>&nbsp;</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">OK, what we&nbsp;missed&nbsp;was defining proper performance expectations. I believe setting the correct set of performance goals, i.e. defining what our performance expectations are,&nbsp;is the half way through having a performant software. Sometimes, the goals are clear. For instance, the software that monitors a nuclear reactor should calculate different criteria, such as pressure and temperature, and alert the abnormal cases in less than one second (I made up the number just for the sake of the example), or consequences could be sever. This goal can be calculated scientifically and there is no compromises. However, in most cases unlike the nuclear reactor, customers just want the software to be <span style="font-style: italic;">fast</span>, like our customers. </span></span><span style="font-family: verdana,geneva;"><span style="font-size: small;">There are some studies to be done and discussions to happen with the customer before setting the goals.&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"></span></span>&nbsp;</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"></span></span><span style="font-family: verdana,geneva;"><span style="font-size: small;">From the user standpoint, the performance is mostly a perception; the user's impression of how fast the software responds. How a user perceives the performance actually depends on many factors including: </span></span></p>
<ul type="disc" style="MARGIN-TOP: 0in; unicode-bidi: embed; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in">
<li style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"><span style="font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The user's previous experiences and how the user used to do the task that the software does now: just compare our two users in the above example. One had used similar products (although for different purposes) so his expectation was different from that of the other user. </span></span></span></li>
</ul>
<ul type="disc" style="MARGIN-TOP: 0in; unicode-bidi: embed; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">What the software does and what end users do while the software is trying to respond to an event: users usually consider a software showing some sorts of visual indication on what it is doing, faster. The reason for that is the users do not like the "Not responding" state. Responding to the same event, a software with "not responding" state for five seconds <span style="font-style: italic;">looks</span> slower than one that shows a progress bar for seven seconds. Do you think our customers would have considered the six second delay a bad performance if they were not sitting in front of the monitor and watching the live video?</span></span></li>
</ul>
<ul type="disc" style="MARGIN-TOP: 0in; unicode-bidi: embed; DIRECTION: ltr; MARGIN-BOTTOM: 0in; MARGIN-LEFT: 0.375in">
<li style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; VERTICAL-ALIGN: middle"><span style="font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The scalability of<span style="mso-spacerun: yes;">&nbsp; </span>the software: imagine that our software streamed the video with no delay for two minutes and then it started streaming with a five second delay afterward. Users would still describe the software as "slow". </span></span></span></li>
</ul>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">We definitely should translate the users' feelings into numbers to be able to measure them. For instance, the goal for the responsiveness of the software in the above project should have been set to something like "no more than&nbsp;six second delay".</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"></span></span><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The next question we need to answer is how the end users, and more importantly the customer, benefit from the software reaching a specific performance goal. When we asked our customers why there should be no delay on the video streaming, we did not hear any valid reason. There was no real time evaluation or analysis on the video in station B, thus, there was no business value on reaching a zero delay. So, you should always talk to your customer about the value achieving a performance goal delivers. Most of the customers do not do a cost-benefit analysis of reaching a certain performance level. In addition, to achieve a performance goal we might need to sacrifice other requirements. To reduce the streaming delay, we had to choose an encoding method that compressed the video to a level that impacted the quality, contradicting another objective. The decision maker here is again the customer, considering the business value each objective delivers.</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Another important aspect to consider is the environment and hardware equipment the users are going to use to run the software. You probably can feel the performance difference running a software on different machines or OSs. Had we gotten a fiber optic infrastructure, we would have not struggled to reduce the delay. So there was a restriction on the equipment available to us. We also managed to improve the video hiccups by changing the video card. However, the customer could not afford buying the video card for all the users. </span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The last but not the least, there are some alternatives to compensate for a lower performance. A user who loves classic music could live with a two minute response time if the software plays a piece from Mozart for her (an exaggeration, but hopefully you get my point!). So open your mind and be innovative.</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">In summary, before thinking about how to develop a performant software, first, try to understand how the performance can impact the users'. Spend some time with your customer discussing the performance objectives and the values they deliver;&nbsp;help the customer to do a cost-benefit analysis. Also pay attention to contradicting objectives and restricting requirements. </span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Good day to you</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Hamed</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">--</span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">* <span style="font-style: italic;">C. U. Smith and L. G. Williams, Performance Solutions: A Practical Guide to Creating Responsive, Scalable Software, Boston, MA, Addison-Wesley, 2002</span></span></span></p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>It is All About Performance Now!</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/it-is-all-about-performance-now</link>
      <pubDate>Sun, 03 Oct 2010 09:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/10/03/it-is-all-about-performance-now/</guid>
      <description><![CDATA[After spending two years in the Office tools team (SharePoint and VSTO), I joint the Visual Studio...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">After spending two years in the Office tools team (SharePoint and VSTO), I joint the Visual Studio Performance Engineering team. I am really excited to be a part of a process&nbsp;that makes Visual Studio faster and more efficient. </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">I will get back to you with a performance topic.</span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">--</span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Hamed</span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Flow-Driven Development for Agile Teams</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/flow-driven-development-for-agile-teams</link>
      <pubDate>Mon, 12 Jul 2010 21:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/07/12/flow-driven-development-for-agile-teams/</guid>
      <description><![CDATA[I&rsquo;ve been involved in many agile projects and practiced agility on personal projects. However,...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">I&rsquo;ve been involved in many agile projects and practiced agility on personal projects. However, sometimes, I feel there are still&nbsp;practices&nbsp;in our process which are not really aligned with the agile concept. I believe there is a lot we can do to see the real capabilities of agile development.&nbsp;Everything I am talking about here is in the context of Scrum, but may apply to other frameworks as well.&nbsp;</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-size: large;"></span></span></b></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-size: large;">Problem</span></span></b><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">To build something you need to have a&nbsp;sketch in mind, build it and test it to see&nbsp;how it works. That is almost the same story with developing software; it <span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">requires three&nbsp;activities regardless of the methodology being used: design, implementation, and testing.&nbsp;However, different methodologies utilize these activities in different ways. Some s</span></span></span></span><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">crum developers still use "mini waterfalls" to develop user stories in each sprint and this&nbsp;mostly happens&nbsp;when a developer&nbsp;shifts from waterfall&nbsp;mindset to Agile. &ldquo;Agile Development&rdquo; tries to deliver shippable features in each sprint and be more focused on user stories and reacts to the changes. The sequential development process limits the agility of the development in a sense that a design should be at least partially completed to start implementation (don&rsquo;t tell me you are one of those who jumps into implementation with absolutely no design at all!) and an end-to-end testing is not possible until a big piece of implementation is done, let&rsquo;s say half way through the sprint. By testing I mean making sure that from the beginning to the end of the user story every piece of code works well and matches what user expects. Halfway through the sprint, what if the developer finds out that the implementation does not quite match the user story after running the end-to-end scenario for the first time? This is analogous to building different pieces of a car separately and then assembling them at once. The car <i style="mso-bidi-font-style: normal;">might</i> work well, but we could find out that it does not look good with the big bumpers or it is not comfortable because we did not realize that the dashboard is too big comparing to the whole interior space. This is the result of getting too deep&nbsp;into one piece before sketching the whole thing. We would have been able to see these issues if we&rsquo;d had the &ldquo;so-far&rdquo; image of the car in mind during the building process or stepped back once in a while and took a look at the overall progress and the result. My main point is that with the current development process, the end-to-end scenario, which I call it &ldquo;the flow&rdquo; of the user story, does not come together till the near end of the implementation. </span><br /></span>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">I believe agile development needs an interactive and flexible development practice that enables developers to focus on the essential development activities, customize the sequence of developing different pieces for each user story, change the design and implementation very easily, and most importantly start the end-to-end testing from the very beginning of the development. It is very crucial that the flow of the user story in the code matches what the users expect. It is very easy to get caught in the implementation details and lose the big picture.</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">In addition, we all have seen that documentation is not a priority for hardcore agile developers; however, I strongly believe that investing in &ldquo;proper documentation&rdquo; will pay off in the long run. Sometimes documentation is part of the deliverables and very clear how it should look like, but if it is not being delivered,&nbsp;the "proper documentation"&nbsp;should enable somebody new to the team or any team member&nbsp;after 2 years understands&nbsp;the system and be able to maintain it.&nbsp;But the truth is documents such are usually time-consuming to produce and get out of sync with the actual implementation over time.</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">I am proposing a practice in which you can address the above issues in your agile development environment. I am not trying to change how you design, implement, or test, rather just use a different order and introduce some steps in between.</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;">I have tried this many times and gotten very good results so far. The practice could use more developers to adopt and lots of feedback (Thank you in advance </span></span><span style="font-family: Wingdings; color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings;"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings;">J</span></span><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"> ). Since this development practice focuses on the end-to-end flow of the user story, I call it &ldquo;Flow-Driven Development&rdquo;.<span style="mso-spacerun: yes;">&nbsp; </span></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-size: large;"></span></span></b></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-size: large;">My Solution, the Flow-Driven Development</span></span></b></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span></b><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><strong>Overview</strong>:</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Flow-driven development is a development process suitable for developing user stories in an agile environment such as Scrum. Developers integrate the design, implementation, and testing of a user story into one comprehensive phase, consisting three activities: Stubbing, Filling, and Walkthrough. Each of these activities tries to accomplish the goal of a&nbsp;waterfall phase, i.e. design, implementation, and testing, but they could be practiced in different orders to overcome the problems I described before. I need to mention that the details of executing these activities are decided based on the team and the project dynamics.</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Also please note that this process relies heavily on code comments which satisfy a specific format presenting all necessary information for development activities (which could be standardized). </span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><strong><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">The practice in a high level:</span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></strong></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Having a user story in hand and a good-enough design in mind, &ldquo;stubbing&rdquo; starts from high-level items to low-level ones (top-down approach). I want to stress on the fact that you do not need to have all the high-level objects in your system laid out before starting the stubbing;&nbsp;start from a few ones and other stubs will be added gradually as the process moves forward. </span></span><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Stubs are first created for classes. I suggest putting the following comments at the top of each class: 1) the concept in the system that the class represents (e.g. student), 2) responsibilities of the class (e.g. take courses), and 3) relations/interactions to other classes (e.g. has a teacher in each course). Other comments may be required occasionally. Then, stubs are created for class members to enable the class to accomplish its responsibilities and provide proper communication channels and interfaces to other classes and the outside world. I would provide each member at least with the following comments: 1) the description of data/functionality that the member caries (e.g. the number of credits the student has taken so far), 2) for functions, the description and the valid range of input/output and any exception/error the function may throw, and 3) who should/may use this member. We should be able to follow the flow of the user story from the beginning to the end by reading the comments. Be sure to have the code compile-able and runnable at all time; for instance, all methods and properties that need to return something have a return value hardcoded for now. The user story may not be complete now, but we should be able to walk through &ldquo;a happy path&rdquo; from the beginning to the end.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;">When you feel that you have laid down the skeleton of the user story, the filling starts.&nbsp;Keep in mind that we want to have&nbsp;a happy path of the&nbsp;end-to-end scenario stubbed at the beginning before getting lost into the implementation details. Each stub is being filled accomplishing what is described in comments. The order of the filing is totally up to you, but I like to start from simple stuff, so I fill a method that verifies an email address before the one that calculates a company&rsquo;s revenue. The filling activity contains two steps: the implementation is described in natural language at the top of the stub and then converted to the code. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;">A unit test needs to be written if applicable (and yes, it is worth the time; if you care about the quality, write the unit test). You can write the unit test just after the filing or utilize the TDD, whichever you are more comfortable with.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">The filled stub should be tested by walking through the different scenarios of the user story that the stub is involved in. During the walkthrough, the developer does what the user would do, but he also can see what is going on under the hood. The developer must refer to the user story to validate the flow has been implemented precisely. The developer can change the flow anytime if it does not &ldquo;feel&rdquo; or &ldquo;look&rdquo; right!</span> <br /><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Developers can go back and forth between different activities if needed. For example, a class member stub maybe created during filling another member stub to provide required data/functionality. The return value of this new member can be hard-coded for that moment just to get us going and can be filled later. Also a walkthrough can be done before any filling just to make sure the code flows between different components correctly. In my opinion, this is a very good &ldquo;design review&rdquo; practice!</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">These three activities are repeated until all the stubs are filled completely and walkthroughs are successfully passed on all paths of the user story. Obviously unit tests are all green at this moment. Also, a</span></span><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;">t the end, a tool can extract all the comments from the code to form a document. The better and more complete the comments, the better the document.</span></span></p>
<p class="MsoNormal"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/42/5850.fdd.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-31-42/5850.fdd.jpg" border="0" /></o:p></span></span></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">In summary, using mini waterfalls to implement user stories in sprints may not be the best option and has its own limitations. Since user stories are a key part of the agile development, we want to make sure that the delivered product does exactly what the stories are telling. This goal can be achieved more effectively if we always have the end-to-end scenario in mind. By integration the three phases of the traditional waterfall methodology and paying more attention to the flow of the user story we have a better chance of making our customers happy.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Good day to you. </span><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="color: black; font-size: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri;">Hamed</span></span></p>
</p>
<p><span style="font-family: 'Times New Roman','serif'; color: black; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></p>]]></content:encoded>
    </item>
    <item>
      <title>My Office Addin does not Load!</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/my-office-addin-does-not-load</link>
      <pubDate>Wed, 26 May 2010 15:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/05/26/my-office-addin-does-not-load/</guid>
      <description><![CDATA[&ldquo;I installed my Office solution (VSTO add-in) successfully but when I open the Office...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="color: #808080;"><strong><em>&ldquo;I installed my Office solution (VSTO add-in) successfully but when I open the Office application, my add-in does not load. What is the problem?&rdquo; <o:p></o:p></em></strong></span></span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">This is a common question which I came across many times in Forums.&nbsp;Here are simple and quick checks that you can do before you start scratching your head or jump to the Forums. I&rsquo;ll be using Excel as the Office application, but the approach is applicable to others more or less.</span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small;">1.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: small;">Make sure your add-in is installed correctly and it is enabled<o:p></o:p></span></strong></span></span></p>
<p class="MsoNormal"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Open registry editor and navigate to &ldquo;</span></span><a href="https://support.microsoft.com/default.aspx/kb/291392"><span style="font-family: verdana,geneva;"><span style="font-size: small;">HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins</span></span></a><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&rdquo;. Here is how this registry key looks like after I installed MyExcelAddin:</span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><o:p><img height="132" width="597" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/42/7268.Registry.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-31-42/7268.Registry.jpg" border="0" /></o:p></span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoNormal"><span style="font-family: verdana,geneva;"><span style="font-size: small;">The registry string we are interested in the most is the LoadBehavior. Whenever you see "3" (Loaded at Startup) as the value of this string you are good in this part and your add-in tries to load when the Excel starts. For more information about registry entries for application-level Office solutions see <a href="https://msdn.microsoft.com/en-us/library/bb386106.aspx">this article</a></span></span><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">. </span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small;">2.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: small;">Check out &ldquo;COM Add-Ins&rdquo; dialog in Excel<o:p></o:p></span></strong></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Now open Excel and see if your add-in loads successfully. If not, open Excel Options dialog (File-&gt;Options) and navigate to Add-Ins tab. <o:p></o:p></span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/42/7802.ExcelOptions.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-31-42/7802.ExcelOptions.jpg" border="0" /></span></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">&ldquo;Healthy add-ins&rdquo; show up as &ldquo;Active Application Add-ins&rdquo;, however, if an add-in is disabled for whatever reason, it will appear under the &ldquo;Inactive Application Add-ins&rdquo;. You can select the &ldquo;COM Add-ins&rdquo; from the Manage dropdown at the bottom of this dialog and see the LoadBehavior of all COM add-ins. In normal cases, the add-in should be checked and its "Load Behavior" should be &ldquo;Loaded at Startup&rdquo;:</span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><o:p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/42/6403.COMAddin.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-31-42/6403.COMAddin.jpg" border="0" /></o:p></span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">If the VSTO runtime encounters a problem loading the add-in, you&rsquo;ll see this message instead.</span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><em>&ldquo;Load Behavior: Not Loaded. A runtime error occurred during the loading of the COM Add-in&rdquo;</em>.</span></span></span></p>
<p class="MsoNormal"></p>
<p class="MsoListParagraphCxSpFirst"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small;">3.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: small;">Find the problem</span></strong></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Set the "VSTO_SUPPRESSDISPLAYALERTS" environment variable to 0. Then go back to the registry key I mentioned in step 1 and set the LoadBehavior to 3. Now restart the Excel. You should be able to see a dialog describing what is happening:<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><o:p><span style="font-family: verdana,geneva;">&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/31/42/6355.RuntimeError.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-31-42/6355.RuntimeError.jpg" border="0" /></span></o:p><span style="mso-no-proof: yes;"></span><o:p></o:p></span></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">It is also a good practice to enclose the code inside the add-in's startup event in a try-catch block and log all exceptions.</span></span></o:p></p>
<p class="MsoNormal"></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">&nbsp;</span></span></o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small;">4.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: small;">Hard disabled add-ins</span></strong></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-family: verdana,geneva;"><span style="font-size: small;">If an add-in causes the Office application to crash (close unexpectedly), the add-in gets &ldquo;hard disabled&rdquo;. Please follow </span></span><a href="https://msdn.microsoft.com/en-us/library/ms268871.aspx"><span style="font-family: verdana,geneva;"><span style="font-size: small;">this</span></span></a><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"> instruction to re-enable the add-in. In addition, you might want to check the &ldquo;HKEY_CURRENT_USER\Software\Microsoft\Office\<b style="mso-bidi-font-weight: normal;">12.0</b>\Excel\Resiliency\DisabledItems&rdquo; (replace <b style="mso-bidi-font-weight: normal;">12.0</b> with 11.0 for Office 2003 and with 14.0 for Office 2010). Your add-in should not have an entry under this registry key.<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">More References:</span></span></strong></span></span></span></span></o:p></p>
<ul>
<li>
<div class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><a href="https://msdn.microsoft.com/en-us/library/ms269003.aspx">Debugging in Application-Level Projects</a></span></span></span></span></span></span></o:p></div>
</li>
<li>
<div class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><a href="https://blogs.msdn.com/b/vsod/archive/2008/04/22/troubleshooting-com-add-in-load-failures.aspx">TroubleShooting COM Add-In Load Failure</a></span></span></span></span></span></span></o:p></div>
</li>
<li>
<div class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><a href="https://blogs.msdn.com/vsto">VSTO blog</a></span></span></span></span></span></span></o:p></div>
</li>
<li>
<div class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="font-family: verdana,geneva;"><span style="font-size: small;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><a href="https://social.msdn.microsoft.com/Forums/en-US/vsto/threads">VSTO forum</a></span></span></span></span></span></span></o:p></div>
</li>
</ul>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">--</span></span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Good day to you!</span></span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Hamed</span></span></o:p></p>]]></content:encoded>
    </item>
    <item>
      <title>How to Deploy and Use Executable Files with VSTO Add-ins?</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/how-to-deploy-and-use-executable-files-with-vsto-add-ins</link>
      <pubDate>Thu, 22 Apr 2010 17:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/04/22/how-to-deploy-and-use-executable-files-with-vsto-add-ins/</guid>
      <description><![CDATA[I recently came across an interesting scenario: it is desired to deploy an executable file with a...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">I recently came across an interesting scenario: it is desired to deploy an executable file with a VSTO add-in and run the executable within the add-in code. </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Well, at the first glance, this seemed to be a usual ClickOnce deployment which I had done before with different .NET applications many times: dealing with projects with more than one executables, I just needed to set the main project as &ldquo;Startup Project&rdquo;, include the second exe in the main project, and call the second exe from the main&nbsp;project using the </span></span><a href="https://msdn.microsoft.com/en-us/library/53ezey2s.aspx"><span style="color: #770000;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Process.Start</span></span></span></a><span style="font-family: verdana,geneva;"><span style="font-size: small;">. I was never worried about the path to the second exe since it gets deployed next to the main one, so I always used relative path. </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">However, it is different when you try it with VSTO add-ins. The following code in my add-in startup could not find the exe file, despite the fact that &ldquo;MySecondExe.exe&rdquo; is deployed correctly: </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Process.Start("MySecondExe.exe"); </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">So, why the file could not be found? If you retrieved the value of the </span></span><a href="https://msdn.microsoft.com/en-us/library/system.io.directory.getcurrentdirectory.aspx"><span style="color: #770000;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">Current Directory</span></span></span></a><span style="font-family: verdana,geneva;"><span style="font-size: small;"> in your add-in project and a WinForm project deployed through ClickOnce, the former returns something like &ldquo;C:\Users\hamed\Documents&rdquo;, and the latter returns the ClickOnce cache path. There you go! The base working directory is not&nbsp;what you would expect&nbsp;in add-in case. Easy to explain though, add-in is not an executable, it is a package of a manifest, assemblies, resources and other files such as data files. The manifest is parsed by the VSTOLoader, an </span></span><a href="https://msdn.microsoft.com/en-us/library/system.appdomain.aspx"><span style="color: #770000;"><span style="font-family: verdana,geneva;"><span style="font-size: small;">AppDomain</span></span></span></a><span style="font-family: verdana,geneva;"><span style="font-size: small;"> is created, and the add-in assembly gets loaded into the AppDomain. So we need to retrieve the assembly location, i.e. the ClickOnce cache path in which the add-in is deployed to, using the following statement: </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">string assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">You can then use the above path to locate your second exe file. </span></span></p>
<p><span style="font-family: verdana,geneva;"><span style="font-size: small;">Good day!</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Installing VSTO Add-in for “Some” users</title>
      <link>https://docs.microsoft.com/archive/blogs/haahmadi/installing-vsto-add-in-for-some-users</link>
      <pubDate>Sun, 04 Apr 2010 14:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Hamed Ahmadi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/haahmadi/2010/04/04/installing-vsto-add-in-for-some-users/</guid>
      <description><![CDATA[There have been great discussions around how a VSTO add-in can be deployed for “All Users”. Misha...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>There have been great discussions around how a VSTO add-in can be deployed for “All Users”. Misha described a workaround </FONT><A href="https://blogs.msdn.com/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx" mce_href="https://blogs.msdn.com/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx"><FONT size=3 face=Calibri>here</FONT></A><FONT size=3><FONT face=Calibri> and <SPAN style="mso-ansi-language: EN" lang=EN>Saurabh also talked about a hotfix for Office 2007 for this issue in this <A href="https://blogs.msdn.com/vsto/archive/2010/03/08/deploying-your-vsto-add-ins-to-all-users-saurabh-bhatia.aspx" mce_href="https://blogs.msdn.com/vsto/archive/2010/03/08/deploying-your-vsto-add-ins-to-all-users-saurabh-bhatia.aspx">blog post</A>.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><SPAN style="mso-ansi-language: EN" lang=EN><FONT size=3><FONT face=Calibri>Another requirement that mostly concerns corporates is to make an application or functionality, in this case a VSTO add-in, available for some users of a machine in an automated way. Basically, the idea is to have the add-in available based on the user credential. Of course the first solution that comes to mind is to install the add-in for all users and have the add-in decides who should have access to it. You should not be concerned about deployment if you are using this approach, however, you need to add the logic for authentication/authorization and decision making to grant/revoke access to users. I would say this is best if you want to filter functionalities in your add-in based on the user’s credential rather than making the whole add-in unavailable. </FONT></FONT></SPAN></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><SPAN style="mso-ansi-language: EN" lang=EN></SPAN><FONT size=3><FONT face=Calibri>If you are using ClickOnce as your deployment method, I should say your hands are kind of tight for one-step installation, since the add-in gets installed in the ClickOnce cache which is a per-user storage. For instance, all add-ins installed under my credential lives under “</FONT><SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; COLOR: #333333">C:\Users\<STRONG><SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'">hamed</SPAN></STRONG>\AppData\Local\Apps\2.0”. </SPAN><FONT face=Calibri>That is why </FONT></FONT><A href="https://social.msdn.microsoft.com/Forums/en-US/vsto/thread/4a5f4daa-5833-4f37-91e8-f0bb2eca5463/#066cfcc0-84bd-4c12-bede-1949f037d1e4" mce_href="https://social.msdn.microsoft.com/Forums/en-US/vsto/thread/4a5f4daa-5833-4f37-91e8-f0bb2eca5463/#066cfcc0-84bd-4c12-bede-1949f037d1e4"><FONT color=#0000ff size=3 face=Calibri>Thony</FONT></A><FONT size=3><FONT face=Calibri> could not get his add-in work just by copying the registry keys. In this case, you need to install the add-in for each user on your “have access” list. This does not seem easy in companies with great number of computers and users. However, do not let this solvable issue take all the great features of ClickOnce deployment away. An active directory group can be created and access to the installer on a shared server could be granted to the group. Therefore, each user on the list can install the add-in on her machine under her user account. </FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Using </FONT><A href="https://msdn.microsoft.com/en-us/library/cc563937.aspx" mce_href="https://msdn.microsoft.com/en-us/library/cc563937.aspx"><FONT size=3 face=Calibri>Windows Installer</FONT></A><FONT size=3><FONT face=Calibri> (MSI) gives you the option to choose where your add-in gets installed and, therefore, you can just have a batch file to copy the required registry keys to different users registry, having the add-in live on a shared path for those users. I am personally not in favor of this approach though, if I do not have specific reason to follow that. Customizing an MSI needs some degree of expertise and is sometimes error-prone, at least for novice users. The major drawback would be not having the auto-updating feature of the ClickOnce, which could be a pain point in big companies (read <A href="https://blogs.msdn.com/krimakey/archive/2009/04/08/enterprise-level-deployment-of-vsto-solutions-deployment-design.aspx" mce_href="https://blogs.msdn.com/krimakey/archive/2009/04/08/enterprise-level-deployment-of-vsto-solutions-deployment-design.aspx">Enterprise level deployment</A> by Kris for more information).</FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Always look for your environment limitations and needs&nbsp;comparing different approaches and find out which one gives you the best bang for your buck, especially in the long run.</FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Good luck.</FONT></P>]]></content:encoded>
    </item>
  </channel>
</rss>