<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I Love that New Syntax Smell : A day in the life</title><link>http://blogs.msdn.com/arich/archive/tags/A+day+in+the+life/default.aspx</link><description>Tags: A day in the life</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>A Bug's Life</title><link>http://blogs.msdn.com/arich/archive/2004/06/14/buglife.aspx</link><pubDate>Mon, 14 Jun 2004 21:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:155440</guid><dc:creator>arich</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/arich/comments/155440.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arich/commentrss.aspx?PostID=155440</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;No, not the Pixar &lt;A href="http://us.imdb.com/title/tt0120623/"&gt;movie&lt;/A&gt;.&amp;nbsp; This is about the lifetime of a bug in our product.&amp;nbsp; How they go from discovery, to fix, to maintainance.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 1: Discovery.&lt;/STRONG&gt;&amp;nbsp; Perhaps what's most interesting are the various ways a bug can be discovered. We often find them through test suites, where a build of the compiler is run on a test suite by means of automation.&amp;nbsp; The front-end compiler test suites are&amp;nbsp;mostly a&amp;nbsp;mix of specific feature tests, regression tests (more on that later), and third-party conformance tests.&amp;nbsp; (For a lot more on how we test, you might check out some &lt;A href="http://blogs.msdn.com/fivetestersfromvc/archive/2004/02/10/70438.aspx"&gt;posts&lt;/A&gt; from &lt;A href="http://blogs.msdn.com/fivetestersfromvc/"&gt;FiveTesters&lt;/A&gt;.)&amp;nbsp; Sometimes, a bug is found by a customer - these usually come to us via &lt;A href="http://support.microsoft.com/"&gt;PSS&lt;/A&gt;, through newsgroup postings, or as beta feedback.&amp;nbsp; Generally, simply the fact that a bug was discovered by a customer affects its impact.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 2: Determination.&lt;/STRONG&gt;&amp;nbsp; Is it a bug?&amp;nbsp; Just because you see odd behavior doesn't always indicate a bug.&amp;nbsp; Determining if something is a bug usually means digging through the ISO C++ or C standards, or through other standards documentation.&amp;nbsp; (Except for the obvious bugs, like an ICE or a rare compiler crash.)&amp;nbsp; I like to get the confirmation of at least one other person, too, when it isn't completely obvious.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 3: Raiding.&lt;/STRONG&gt;&amp;nbsp; I've mentioned &lt;A href="http://blogs.msdn.com/arich/archive/2004/06/09/151990.aspx"&gt;before&lt;/A&gt; why we call it &amp;#8220;Raiding&amp;#8221; a bug.&amp;nbsp; When you file a bug in our bug system, a lot of other pertinent information is included.&amp;nbsp; Usually, you include the source code that reproduces the bug, along with a note to the developer (or other people looking at the bug) that justifies the bug, and explains why it is a bug.&amp;nbsp; We also try to use very descriptive titles, so that when other people are searching for bugs, they have a high probability of finding the right one.&amp;nbsp; When bugs are raided, their status is &amp;#8220;Active.&amp;#8220;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;You give the bug a Severity and Priority - usually these two are quite similar.&amp;nbsp; They range from 1 (most severe) to 4 (typo in the diagnostic?).&amp;nbsp;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;There's a zero priority, in Microsoft lingo, we call that &amp;#8220;Pri Zero.&amp;#8221;&amp;nbsp; Pri 0 bugs have an expected turnaround time of 24 hours.&amp;nbsp; Like most Microsoft-isms, I hear people using them in other contexts.&amp;nbsp; My former officemate&amp;nbsp;referred to his son as &amp;#8220;Pri 0.&amp;#8220;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 4: Triage.&lt;/STRONG&gt;&amp;nbsp; Representatives from the dev, QA, and product&amp;nbsp;management&amp;nbsp;team meet about twice a week, and go through Triage, where they inspect all newly-raided bugs and give them a quick once-over.&amp;nbsp; They try to verify that it is a bug, that it isn't already raided, and that the priority and severity are correct.&amp;nbsp; They then assign it over to a developer to investigate and fix.&amp;nbsp; (Occasionally, the bug is kicked back to the QA person, either because it is duplicate of another bug or because it isn't a bug at all.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 5: Fixing.&lt;/STRONG&gt;&amp;nbsp; The developer performs his or her magic, and fixes the bug, linking in the pertinent&amp;nbsp;information, and a link to the source diffs that represent their fix.&amp;nbsp; They then &amp;#8220;resolve&amp;#8220; the bug.&amp;nbsp; A bug can have a number of resolutions, some of the most common are &lt;EM&gt;Fixed &lt;/EM&gt;(the developer fixed the bug), &lt;EM&gt;Not Repro&lt;/EM&gt; (the developer couldn't reproduce the behavior), and&lt;EM&gt; By Design&lt;/EM&gt; (that behavior is not a bug).&amp;nbsp; The Resolved bug usually ends up assigned back to the QA who opened the bug.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 6: Verification.&lt;/STRONG&gt;&amp;nbsp; The QA who opened the bug gets a build of the compiler containing the fix, and verifies that the bug is fixed properly.&amp;nbsp; If they don't feel the bug is fixed, or don't agree with the resolution of the developer, they &amp;#8220;push back.&amp;#8221;&amp;nbsp; This is another Microsoft-ism (perhaps I should create a glossary...) - but at least this one&amp;nbsp;is pretty self evident.&amp;nbsp; Usually, this just means they re-assign the bug back to the developer with justification.&amp;nbsp; Sometimes, they just go down the hall, knock on the developer's door, and have a discussion.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;The QA person is also responsible for ensuring that this scenario is covered by our test suites.&amp;nbsp; If there's no test to cover it, they check one in, and&amp;nbsp;mark the&amp;nbsp;location of the test case in the bug.&amp;nbsp; We typically call these &amp;#8220;regress tests.&amp;#8220;&amp;nbsp; They're just there to make sure the bug gets fixed, and, if it somehow gets un-fixed, we catch it.&amp;nbsp; When this is complete, the QA closes the bug.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Stage 7: Maintainance.&lt;/STRONG&gt;&amp;nbsp; Closed bugs don't disappear from our bug database.&amp;nbsp; If a bug ever regresses, we can usually find the bug in our database, and reactivate it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;So, there's my quick explanation of a bug's life cycle.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=155440" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/arich/archive/tags/A+day+in+the+life/default.aspx">A day in the life</category></item><item><title>QA Mode</title><link>http://blogs.msdn.com/arich/archive/2004/06/09/151990.aspx</link><pubDate>Wed, 09 Jun 2004 20:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:151990</guid><dc:creator>arich</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/arich/comments/151990.aspx</comments><wfw:commentRss>http://blogs.msdn.com/arich/commentrss.aspx?PostID=151990</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;This will be the first post in a new category, &amp;#8220;A day in the life.&amp;#8220;&amp;nbsp; Through these posts, I hope to provide some background into what QA for the compiler team is like.&amp;nbsp; Hopefully, you won't think I'm a bungling idiot.&amp;nbsp; So, to get the ball rolling, I thought I might try and give a bit of perspective as to how we sometimes stumble across bugs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;So, a few weeks back, I was fooling around with a personal project (the details of which are really boring), and I was looking for a C# decompiler. I wanted to see how a method was accomplishing something. I did a bit of searching, and came up with Lutz Roeder's &lt;A href="http://www.aisto.com/roeder/dotnet/"&gt;.NET Reflector&lt;/A&gt;. Now, if you haven't seen this tool, you should really go download it. It's like ildasm on steroids.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I was fooling around with it, and I discovered that it had C#, VB.NET, and even Delphi decompilation, but no C++!&amp;nbsp; I emailed the author to see if there were any plans to develop one.&amp;nbsp;&amp;nbsp;There weren't any,&amp;nbsp;but he pointed me at the GotDotNet &lt;A href="http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=0f5846c3-c7aa-4879-8043-e0f4fc233ade"&gt;workspace&lt;/A&gt; where people developed the snap-ins. From there, I was a few quick samples away from starting development on a C++ decompiler for Reflector. Being the good QA person that I am, I wanted to use my product to develop my snap-in (as opposed to C#).&amp;nbsp; I worked for a while, and had a few things populating correctly, when I ran into a bit of a brick wall.&amp;nbsp; Basically, the C++ compiler was balking when I tried to instance a particular public type from the assembly. I immediately switched into "QA Mode" to try and diagnose the problem.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step one: Repro!&lt;/STRONG&gt;&amp;nbsp; &amp;#8220;Repro&amp;#8221; is like a holy word to a tester.&amp;nbsp; It's short for &amp;#8220;reproduction,&amp;#8221; or maybe &amp;#8220;reproducible,&amp;#8221; but were I adding it to The Oxford Standard, I would probably define it as the smallest code sample that will demonstrate a bug.&amp;nbsp; It's useful for giving the developers a bee-line to the problem, but not so useful as a test case, simply because its impact is too low.&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;EM&gt;(digression)&lt;/EM&gt; And lately, I'm discovering that depending on the dev you give your repro to, there's such a thing as &lt;EM&gt;too small&lt;/EM&gt;.&amp;nbsp; Sometimes, if the repro is too small, the dev only fixes part of the bug.&amp;nbsp; This is part of the difficulty of being a tester.&amp;nbsp; Knowing what's too much, what's too little.&amp;nbsp; Perhaps I'll get to this in a later posting.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;Anyhow, in this case, I was able to boil down to about two lines of code.&amp;nbsp; I'll preface this sample by saying that I didn't bother to instantiate the types necessary to pass to the &lt;FONT face="Courier New"&gt;TypeInformation &lt;/FONT&gt;constructor, but that wasn't important, as the bug reproed without it.&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT face="Courier New" color=#800080 size=2&gt;#using "reflector.exe"&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt; main(){&lt;BR&gt;&amp;nbsp; Reflector::TypeInformation^ ti = &lt;FONT color=#0000ff&gt;gcnew&lt;/FONT&gt; Reflector::TypeInformation();&lt;BR&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;When I compiled this, I received a few warnings (which wouldn't have stopped compilation) and one error:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT size=+0&gt;&lt;FONT face=Arial size=2&gt;t.cpp(4) : error C2373: 'Reflector::TypeInformation::_1' : redefinition; different type modifiers&lt;BR&gt;t.cpp(1) : see declaration of 'Reflector::TypeInformation::_1'&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;I know this is a bug for two reasons.&amp;nbsp; One: the author of this assembly intended for&amp;nbsp;me to instantiate this type.&amp;nbsp; Two: C# is able to instantiate this type without problem.&amp;nbsp; (For us C++ guys, the .NET litany is sometimes &amp;#8220;Can C# do it?&amp;nbsp; Yes?&amp;nbsp; Then so must we.&amp;#8220;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step two: Workarounds!&lt;/STRONG&gt;&amp;nbsp; Workarounds are important in determining the impact of a bug.&amp;nbsp; If a bug can be worked around in a simple and straightforward manner, then it's impact is far lower than a bug which completely prevents the user from doing something important.&amp;nbsp; In this case, there was no workaround.&amp;nbsp; I wanted that type, and I couldn't have it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step three: Investigation!&lt;/STRONG&gt;&amp;nbsp; Often, this is part-and-parcel with finding a repro.&amp;nbsp; Usually, I like to have another person to concur with my investigation.&amp;nbsp; Sometimes, part of investigation is determining &lt;EM&gt;if&lt;/EM&gt; something is a bug.&amp;nbsp; (For me, that means I grab a handy copy of the ISO C++ standard.)&amp;nbsp; In this case, what interested me were the _1's.&amp;nbsp; That's a weird name for a type.&amp;nbsp; If it was labelled foo, I wouldn't have blinked, but _1 doesn't seem like even lazy identifier naming.&amp;nbsp; So, I loaded up ildasm, and poked around inside the assembly for a while:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;IMG src="http://www.winisp.net/taratr98/images/reflector_ob.jpg"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;Now, I began to get suspicious.&amp;nbsp; Why would someone name their types like this?&amp;nbsp; All underscores and numbers, no indication of anything.&amp;nbsp; It's like they were almost trying to make this&amp;nbsp;difficult... to... read.&amp;nbsp; Like they were &lt;EM&gt;obfuscating&lt;/EM&gt;.&amp;nbsp; Is this what output from a code obfuscator looks like?&amp;nbsp; I hopped over to the Dotfuscator website and started &lt;A href="http://preemptive.com/products/dotfuscator/FAQ.html"&gt;reading up&lt;/A&gt;.&amp;nbsp; Turns out, they do something called Enhanced Overload Induction, where they obfuscate types by overloading on return type, when possible, to further obfuscate.&amp;nbsp; In fact, it appears they do this intentionally to prevent people from decompiling their code, since C# and C++ don't support overloading by return type, most of the time.&amp;nbsp; Bingo.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;So, I contacted Lutz, and he got back to me within an hour's time (good turnaround, considering it a Saturday afternoon).&amp;nbsp; He said that he was running &lt;A href="http://www.wiseowl.com/products/products.aspx"&gt;Demeanor&lt;/A&gt; on the assembly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step Four:&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;RAID it!&amp;nbsp; &lt;/STRONG&gt;This is one of those fascinating Microsoft-isms.&amp;nbsp; The bug-tracking system employed &lt;EM&gt;used &lt;/EM&gt;to be called RAID.&amp;nbsp; It isn't any longer, but people still refer to filing bugs as RAIDing them.&amp;nbsp; What's interesting is, RAID was before my time here, but I still refer to filing bugs as RAIDing them.&amp;nbsp; Anyhow, I filed the bug into our bug database, and it began its trek around our group.&amp;nbsp; (I'll probably post another article detailing the life of a bug.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step Five: Verify!&lt;/STRONG&gt;&amp;nbsp; When the bug makes its way back to me, I verify that the fix has been implemented correctly, and that I agree with how the developer made it work.&amp;nbsp; In this case, what the developer did was turn an error into a level-2 warning.&amp;nbsp; This still lets the user know something is amiss, and lets them know what fields in the type are going to&amp;nbsp;be a problem, should they try to use them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;&lt;STRONG&gt;Step Six: Regression&lt;/STRONG&gt;!&amp;nbsp; This is perhaps the most important step - making sure this feature does not regress.&amp;nbsp; We typically do this by ensuring we have appropriate test cases in our suite that cover the recently-broken scenario.&amp;nbsp; That way, if the test starts failing, we know that this bug has regressed.&amp;nbsp; Sometimes, the simple fact that a bug is a regression is enough to raise its priority.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;So, I hope this has given you some insight into how us QA people sometimes go from discovering a bug, to its eventual fix.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=151990" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/arich/archive/tags/A+day+in+the+life/default.aspx">A day in the life</category></item></channel></rss>