| Eric's profileLong Lost EricPhotosBlog | Help |
Long Lost EricThoughts about nothing and everything |
||||
|
June 21 Flight LessonsI've always wanted to get my private pilot's license and today I embarked on the journey. I rode my bike to Boeing Field, met with my instructor and we went up in a Cessna C-150. It was a great time and from here on out I'll be flying 3 - 4 times a week getting in my hours and building up my experience.
Expect future updates on this subject. April 27 Environment Agnostic TestsWhat is an environment agnostic test? What are some possible environment variables? As seen here there are many variables and one thing that my team expects is that our tests will execute the exact same way under all circumstances providing that the test is executing in a supported scenario. This leads to a rather large automation matrix that must be tested against before we ship (this will be another post), but it also leads to a very well defined and efficient test infrastructure. The above expectation sparked a discussion because we were executing a joint run that included both VB IDE and C# IDE tests, which resulted in some of the C# tests failing. They were failing because in order to execute a joint run with both VB and C# tests, all tests must execute under the VB profile. All tests must execute under this profile, because the VB tests are not environment agnostic (yet!) and all of the C# tests are (well should be). We will be discussing this topic more in our team meeting on Monday in order to assure we are all on the same page and I will make it one of my missions over the next few months to ensure my teams tests will execute flawlessly under any supported circumstances. My questions for you are what kind of tests do you execute? What expectations do you have for your environment? Have you had similar discussions at your company? April 23 Live Mesh AnnouncedThe Live Mesh team has announced their technology preview. I've been using this service for well over a month now and it's pretty slick. Today is basically has parity with another entity called Folder Share, but let me promise you that much more will be coming soon. April 12 DevDiv Source ControlA question that I was recently asked on a trip was what source control system we use and what it looks like. I've spent quite a bit of time in this space for our team and will try to answer the question with this post. What source control provider does your team use? Once 2008 was shipped the entire division focused on moving to TFS. This is now the only supported source control provider moving forward for new and future work. We will continue to support Source Depot for a while as our 2003, 2005 and 2008 source code lives there and we must continue to support those products. What does your source control structure look like? How many integration\merge conflicts do you normally have to deal with? Is your test code under source control and if so where do the sources live? How long does it take to sync all of Main? April 09 Disposing Your FinalizersYesterday I was bitten by a bug in our test infrastructure where the code was attempting to dispose of an object in the finalize method. It took me a bit longer then I had hoped to track down the issues, but in the end I did track it down and fixed it. Here is some example code where the bug exists: class Logger : IDisposable You may be looking at this code and asking what is wrong even after you glance over the MSDN article, Overriding the Finalize Method. The first sentence of the article is, "A Finalize method acts as a safeguard to clean up resources in the event that your Dispose method is not called." At a quick glance one might think the following. A dispose method is designed to be called multiple times without adversely affecting the object and the framework has a notion of a Finalize method that will always be called, so why don't I just call the Dispose method from Finalize? The reason that you never want to call a Dispose method from a Finalize method is that the Finalize method was implemented to ensure that all unmanaged resources are cleaned up since the GC cannot handle these. Since the GC is allowed to clean up/finalize managed resources in which ever order it wishes if you run the above code enough you will notice that the StreamWriter object is finalized before the Logger object. At this point when the Logger object is finalized it attempts to invoke it's Dispose method, which in turn attempts to invoke Dispose on StreamWriter which throws because the object has been cleaned up. To fix this code I removed the Finalize method, since it should have never been implemented as we are never allocating any unmanaged resources. Here are some other resources on the topic. |
|
|||
|
|