<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10438017</id><updated>2024-12-18T21:31:04.782-06:00</updated><category term=".NET"/><category term="Imaginet"/><category term="CLFS"/><category term="IOC"/><category term="System.IO.Log"/><category term="WebCasts"/><category term="log4net"/><category term="logging"/><title type='text'>Miscellaneous Jibberish</title><subtitle type='html'>Talking about anything and everything that I find interesting and worth commenting on.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default?start-index=26&amp;max-results=25'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10438017.post-3398396051195472361</id><published>2011-08-04T19:13:00.000-05:00</published><updated>2011-08-04T19:13:32.862-05:00</updated><title type='text'>Moving</title><content type='html'>I&#39;ve decided to move my blog over to WordPress.&lt;br /&gt;
&lt;br /&gt;
You can now find all my old posts plus any future posts here: &lt;a href=&quot;http://jeremywiebe.wordpress.com/&quot;&gt;http://jeremywiebe.wordpress.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/3398396051195472361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/3398396051195472361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3398396051195472361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3398396051195472361'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2011/08/moving.html' title='Moving'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-1381024291924578079</id><published>2011-06-16T20:31:00.003-05:00</published><updated>2011-06-16T21:13:25.347-05:00</updated><title type='text'>Knockout.js - cleaning up the client-side</title><content type='html'>I&#39;ve started a new project with a client and it&#39;s quite a shift for me.  Coming off a heavy client (WinForms), 3-year project I&#39;m now working in ASP.NET MVC and javascript.  One of my goals with regards to the architecture was to keep a handle on the javascript.  The project is integrating with the &lt;a href=&quot;http://help.arcgis.com/en/webapi/javascript/arcgis/index.html&quot;&gt;ESRI ArcGIS Javascript API&lt;/a&gt; and so there will be lots of client-side javascript and it will be important to keep it organized and maintainable. &lt;br /&gt;
&lt;br /&gt;
In looking around for javascript libraries to help with this I found &lt;a href=&quot;http://knockoutjs.com&quot;&gt;Knockout.js&lt;/a&gt;.  This is a library for building larger-scale web applications that use javascript more heavily.&lt;br /&gt;
&lt;br /&gt;
Knockout works by extending the properties of your javascript models (basically a POJO... Plain Old Javascript Object).  You can then bind your model to the view (HTML elements) by marking up the HTML elements using &quot;knockout bindings&quot; (there are quite a few to choose from and they&#39;re listed here).  Basically a knockout binding is a way to bind a property on your model to a specific attribute of an HTML element.  There are quite a few that come built into Knockout (including things like text, visible, css, click, etc).&lt;br /&gt;
&lt;br /&gt;
Once you&#39;ve got the view marked up you simply call &lt;pre&gt;ko.applyBindings(model);&lt;/pre&gt;and Knockout takes it the rest of the way.  &lt;br /&gt;
&lt;br /&gt;
Let&#39;s walk through a simple example as that&#39;ll make things more clear (I&#39;m going to use the same Login UI example as Derick Bailey used for his first &lt;a href=&quot;http://lostechies.com/derickbailey/2011/06/14/intro-to-backbone-js-how-a-winforms-developer-is-at-home-in-javascript/&quot;&gt;Backbone.js post&lt;/a&gt; so it&#39;s a bit easier to compare apples-to-apples... hopefully). &lt;br /&gt;
&lt;br /&gt;
The layout is very similar to a Backbone view except that in a Knockout view you add extra &#39;data-bind&#39; attributes.  &lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1030646.js?file=3-SimpleLoginForm.html&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Notice the &#39;data-bind&#39; attributes in the markup.  These dictate how knockout will bind the model we provide to the UI.  Let&#39;s move on to the model now.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1030646.js?file=4-LoginView.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
This is very close to being a simple javascript object.  The only trick is that any property that we want to bind to the UI should be initialized via the ko.observable() method.  The value we pass to the ko.observable() will become the property&#39;s underlying value.  &lt;br /&gt;
&lt;br /&gt;
Once we&#39;ve instantiated a model object we simply call ko.applyBindings() and Knockout does the rest.  (Note that the second parameter is the HTML element that should be the root of the binding.  It is optional if you are only binding one object to your page, but I think in almost any application you&#39;ll get to a point where you want to bind multiple objects so this shows how to do that.)&lt;br /&gt;
&lt;br /&gt;
At this point Knockout will keep the UI and model in sync as we manipulate it.  This is full 2-way binding for the text elements.  So if the user types in the username field, the model&#39;s username property is updated.  If we update the model&#39;s username property the UI will be updated as well.  &lt;br /&gt;
&lt;br /&gt;
Derick noted in his blog post the mixing of jQuery and Backbone.js.  I&#39;m doing some of that here, but I think Knockout.js doesn&#39;t need jQuery as much because of how the binding is declared (on the HTML elements themselves).  &lt;br /&gt;
&lt;br /&gt;
I&#39;m going to try to follow Derick&#39;s excellent series of posts on Backbone.js and comment on how the subjects he discusses compare and contrast with Knockout.js.  &lt;br /&gt;
&lt;br /&gt;
In the end I think both are very capable libraries even if they come at the problem from slightly different angles.  In the end it&#39;s all about better organization of javascript and better assignment of responsibilities in the javascript you write.</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/1381024291924578079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/1381024291924578079' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1381024291924578079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1381024291924578079'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2011/06/knockoutjs-cleaning-up-client-side.html' title='Knockout.js - cleaning up the client-side'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-5446110596289908159</id><published>2011-04-21T22:50:00.002-05:00</published><updated>2011-04-22T08:22:11.648-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>Getting Started with AutoTest.Net</title><content type='html'>&lt;p&gt;I recently came across a new tool called &lt;a href=&quot;https://github.com/acken/AutoTest.Net&quot;&gt;AutoTest.Net&lt;/a&gt;.&amp;nbsp; This is a great tool if you are a TDD/BDD practitioner.&amp;nbsp; Basically AutoTest.Net can sit in the background and watch your source tree.&amp;nbsp; Whenever you make changes to a file and save it, AutoTest will build your solution and run all unit tests that it finds.&amp;nbsp; When it has run the tests it will display the failed tests in the AutoTest window (there is also a console runner if you are a hardcore console user).&amp;nbsp; &lt;/p&gt;&lt;p&gt;This takes away some of the friction that comes with unit testing because now you don’t have to do the step of build and run tests during development.&amp;nbsp; Simply write a test and save.&amp;nbsp; AutoTest runs your tests and you see a failed test.&amp;nbsp; Now implement the code that should make the test and save again.&amp;nbsp; AutoTest again detects the change and does a build and test run.&amp;nbsp; This cycle becomes automatic quite quickly and I’m finding I really like not having to explicitly build and run tests.&amp;nbsp; &lt;/p&gt;&lt;h1&gt;Features&lt;/h1&gt;&lt;p&gt;AutoTest.Net sports a nice set of features.&amp;nbsp; You can see the full list of features on the &lt;a href=&quot;https://github.com/acken/AutoTest.Net&quot;&gt;main GitHub repo page&lt;/a&gt; (scroll down) but here’s a few.&amp;nbsp; It supports multiple test frameworks including MSTest, NUnit, MSpec, and XUnit.net (I believe other frameworks can be supported by writing a plugin).&amp;nbsp; It can also monitor your project in two different ways.&amp;nbsp; One is by watching for changes to all files in your project (ie. watching the source files).&amp;nbsp; The other is by watching only assemblies.&amp;nbsp; Using this second method it would only run tests when you recompile your code manually.&amp;nbsp; I’m not sure where this would be preferred but I might find a use for it yet. &lt;/p&gt;&lt;p&gt;&lt;em&gt;Edit: Svein (the author of AutoTest.Net) commented that one other compelling feature is Growl/Snarl support.  If you have either one installed you can get test pass/fail notifications through Growl/Snarl, which means you don&#39;t have to flip back to the AutoTest window to check that status of your code.  Nice!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;This leads me to one other feature that I missed and that is that AutoTest.Net is cross-platform.  It currently supports both the Microsoft .NET framework as well as Mono.  This means you can develop on OS X or Linux.&lt;/em&gt;&lt;/p&gt;&lt;h1&gt;Getting AutoTest.Net&lt;/h1&gt;&lt;p&gt;So, to get started, download AutoTest.Net from GitHub.&amp;nbsp; The easiest way is to click the “Downloads” link on the main AutoTest.Net project page and click one of the AutoTest zipfile links (at this time AutoTest.Net-v1.1.zip is the latest).&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJF4r793PQ3goaxk6JEPvlKTKc64VS9kb_JvUdGjjXBHqqt0CICT7D3eSkoNupA_phHIO9G4p4nxd2XBJ3LEu70jKiXVGsG-yDapxHxcAI_PSTuEAXGwOV0xwDigtWQyTApH4Ttw/s1600-h/AutoTest.Net%20Download%5B4%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;AutoTest.Net Download&quot; border=&quot;0&quot; alt=&quot;AutoTest.Net Download&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkZwOEBGRL68lNPT17rtkRc8YshsGTBWRRoMvVEUqXMIzZis6nABt19UKPlLxSytSF-VsEbcIJHVOD-9QHIllvy5EsF7XCGCwri4cIlQl3rcQ5UmqkVcbb4fhoZATZ7VoF4ZN1bA/?imgmax=800&quot; width=&quot;466&quot; height=&quot;175&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Once downloaded, unzip to a directory that you’ll run it from.&amp;nbsp; I’ve put it in my “utilities” directory.&amp;nbsp; At this point you can start using AutoTest.Net by running &lt;em&gt;AutoTest.WinForms.exe&lt;/em&gt; or &lt;em&gt;AutoTest.Console.exe&lt;/em&gt;.&amp;nbsp; If you run the WinForms version, AutoTest will start by asking you what directory you’d like to monitor for changes.&amp;nbsp; Typically you would select the root directory of your .Net solution (where your .sln file resides).&amp;nbsp; Once you’ve selected a directory and clicked OK, you’re ready to start development.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4L-lKe-D-U16wI6rFpxvOU-FIOFbGRyrhJkRuy_XCCsqghwmlAFUcIIpdpvODjkeCKw26ikSqSzyH6N-pjiu01WIPRqGeLRqZxrVCdc4-KgLPZlPIcdOIbxSHAPn_16m9ia4zMw/s1600-h/image%5B5%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-840ie9_9H21VaYFaZtOQfChgVqh12f7EDjrwnktTdINzRsYk0g7t4QE_wlbVMt-FMnKAQFZg3RZalHyziAPBwBkYl25DDcWHCZ6MQR4ATVj0h6DgXvOy6_MCgA2b_-3RrqSQow/?imgmax=800&quot; width=&quot;244&quot; height=&quot;90&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The screenshot above is the main AutoTest.Net window.&amp;nbsp; You can see that it ran 1 build and executed a total of 13 unit tests.&amp;nbsp; The neat thing is that now as I continue to work, all I need to do to cause AutoTest.Net to recompile and re-run all tests is to make a code change and save the file.&amp;nbsp; This sounds like a small change in the regular flow of code, save, build, run tests.&amp;nbsp; However, once I worked with AutoTest.Net for a while it started to feel very natural and going back to the old flow will feel like adding friction.&lt;/p&gt;&lt;h1&gt;Configuration&lt;/h1&gt;&lt;p&gt;Alright, so we have AutoTest.Net running and that’s good.&amp;nbsp; As with most tools, it comes with a config file, &lt;em&gt;AutoTest.config&lt;/em&gt; (which is shared between the WinForms and Console apps).&amp;nbsp; This config file is well-documented so for the most part you can just open it up and figure out what knobs you can adjust.&lt;/p&gt;&lt;h3&gt;Overriding Options&lt;/h3&gt;&lt;p&gt;One nice feature that AutoTest.Net has is that you can have a base configuration in the directory where the AutoTest binaries reside but then override it by dropping an AutoTest.config file in the root directory that you are monitoring.&amp;nbsp; This allows you to keep a sensible base config in your AutoTest application directory and then override per-project as needed.&amp;nbsp; Typically I’ve been setting the “watch” directory as the directory that my .sln file is in and so you’d drop the AutoTest.config file in the same directory as the .sln file.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMebswNUajuPdicsaHjmVRZXVX1Tv7u7v41G8FKbPsYP05GaAFD3MCm5qe6UZQDy5VX-4WbpHMOiVZDc3cVljFinM6PJcbBWL0FvQa7vVKOT1oq3EXpAnbYZqQNBfjXeDuwiu5dA/s1600-h/image%5B8%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHz8b1JRqZCQhP31rYVF3ezPLLuv5lBOb724rNwSQi9WzdO-tL5DWg9uLonqJULEhr1DrpJ2SfprRTY5c5xr_E-CZlLZY1FD1x1sVhcmo7cZHC9xJr0CamfXJ8fZRSysN12hduog/?imgmax=800&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In the above screenshot I have the AutoTest.config file which overrides a few settings, one of which is the ignore file: &lt;em&gt;_ignorefile.txt&lt;/em&gt;.&amp;nbsp; &lt;/p&gt;&lt;h3&gt;IgnoreFile Option&lt;/h3&gt;&lt;p&gt;One option that is useful is called the &lt;em&gt;IgnoreFile&lt;/em&gt;.&amp;nbsp; This is well-documented in the config file but it didn’t click with me initially.&amp;nbsp; The &lt;em&gt;IgnoreFile&lt;/em&gt; option specifies a file that contains a list of files and folders that AutoTest.Net should ignore when monitoring the configured directories for changes.&amp;nbsp; The config file mentions the .gitignore file as an similar example so if you are familiar with git, it should make sense.&amp;nbsp; The one piece that took me a while to figure out was &lt;u&gt;where&lt;/u&gt; this ignore file should go.&amp;nbsp; I finally figured out that if you put it in the root of the monitored directory (ie. beside your .sln file), it will pick it up (see above screenshot).&amp;nbsp; &lt;/p&gt;&lt;h1&gt;Wrapping up&lt;/h1&gt;&lt;p&gt;AutoTest.Net is a great tool to help with the Red, Green, Refactor flow.&amp;nbsp; It removes some of the friction in my day-to-day work by eliminating the need to manually invoke a compile and test run.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Lastly, the observant readers will have noticed that I said it builds and runs all tests any time it notices a file change.&amp;nbsp; Greg Young is working on a tool called Mighty Moose that builds on top of AutoTest.Net as an add-in to Visual Studio (I think there’s a standalone version too).&amp;nbsp; Mighty Moose ups the ante by figuring out what code changed and what tests would be affected by that change.&amp;nbsp; It then only runs the affected tests, significantly cutting down the test run time.&amp;nbsp; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/5446110596289908159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/5446110596289908159' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5446110596289908159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5446110596289908159'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2011/04/getting-started-with-autotestnet.html' title='Getting Started with AutoTest.Net'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkZwOEBGRL68lNPT17rtkRc8YshsGTBWRRoMvVEUqXMIzZis6nABt19UKPlLxSytSF-VsEbcIJHVOD-9QHIllvy5EsF7XCGCwri4cIlQl3rcQ5UmqkVcbb4fhoZATZ7VoF4ZN1bA/s72-c?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-711138998585539599</id><published>2011-01-04T18:56:00.001-06:00</published><updated>2011-01-04T18:56:39.646-06:00</updated><title type='text'>Querying XML Columns in SQL Server 2008</title><content type='html'>&lt;p&gt;We make use of XML columns in a few places on our current project.&amp;#160; XML columns are great for storing “blobs” of data when you want to be able to change the schema of the stored data without having to make database changes (it also provides flexibility in what you store in that column).&lt;/p&gt;  &lt;p&gt;Occasionally, we need to query based on parts of the XML in these columns.&amp;#160; Now because these are XML columns it’s not quite as easy to query on parts of the column as an int or nvarchar column.&amp;#160; This is further complicated when the XML being stored uses namespaces.&amp;#160; &lt;/p&gt;  &lt;p&gt;Let’s start with the following table:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBYCt90hVSNDtN2jV7TV46dew57Bo1gHIhzphlvZ11ZUQsCiW0sQQuligK0g4Uk6_fhTpmYSsMmC1NPeEtX8aLRgzI4o6US4j-Xp3VbBzRi_R9zBlyXJQm79OLQVIcyKzvMUdy9Q/s1600-h/customer_table%5B3%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;customer_table&quot; border=&quot;0&quot; alt=&quot;customer_table&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtaghaNllTCQOXXGd0I6Qp9b1DcZGL_F7UPM7zn1tZ24cVItPvc8AlkakAil60_Lpx7FxYCZij1LWv5gbXHVnzHqZQKkU9xt8YewRK6UNfAnw2Mp7OmDkg3p_vXzmQ9HrM9nLeIw/?imgmax=800&quot; width=&quot;358&quot; height=&quot;181&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And here’s a sample of the XML stored in the column:&lt;/p&gt;  &lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;CustomerInfo xmlns=http://schemas.datacontract.org/2004/07/Sample.Dto&lt;br /&gt;              xmlns:i=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;              xmlns:d=&amp;quot;http://custom.domain.example.org/Addresses&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;FirstName&amp;gt;Jeremy&amp;lt;/FirstName&amp;gt;&lt;br /&gt;    &amp;lt;LastName&amp;gt;Wiebe&amp;lt;/LastName&amp;gt;&lt;br /&gt;    &amp;lt;d:Address&amp;gt;&lt;br /&gt;        &amp;lt;d:AddressId&amp;gt;82FC06FA-46A9-47CA-81AA-A0B968BCEE49&amp;lt;/d:AddressId&amp;gt;&lt;br /&gt;        &amp;lt;d:Line1&amp;gt;123 Main Street&amp;lt;/d:Line1&amp;gt;&lt;br /&gt;        &amp;lt;d:City&amp;gt;Toronto&amp;lt;/d:City&amp;gt;&lt;br /&gt;    &amp;lt;/d:Address&amp;gt;&lt;br /&gt;&amp;lt;/CustomerInfo&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now we could query for this row in the table by first name using the following query:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: xml;&quot;&gt;WITH XMLNAMESPACES (&#39;http://www.w3.org/2001/XMLSchema-instance&#39; as i, &lt;br /&gt;                    &#39;http://schemas.datacontract.org/2004/07/Sample.Dto&#39; as s,&lt;br /&gt;                    &#39;http://custom.domain.example.org/Addresses&#39; as d)&lt;br /&gt;select CustomerInfo.value(&#39;(/s:CustomerInfo/s:FirstName)[1]&#39;, &#39;nvarchar(max)&#39;) as FirstName,&lt;br /&gt;       CustomerInfo.value(&#39;(/s:CustomerInfo/s:LastName)[1]&#39;, &#39;nvarchar(max)&#39;) as LastName,&lt;br /&gt;       CustomerInfo.value(&#39;(/s:CustomerInfo/d:Address/d:City)[1]&#39;, &#39;nvarchar(max)&#39;) as City,&lt;br /&gt;from Customer&lt;br /&gt;where &lt;br /&gt;    MessageXml.value(&#39;(/s:CustomerInfo/d:Address/d:AddressId)[1]&#39;, &#39;nvarchar(max)&#39;) = &#39;82FC06FA-46A9-47CA-81AA-A0B968BCEE49&#39;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This would list out the FirstName, LastName, and City for any row where the AddressId was ‘82FC06FA-46A9-47CA-81AA-A0B968BCEE49’. There are a two things to note:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Namespaces&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Any time you query XML (in any language/platform) that include XML your query must take that into account.&amp;#160; In T-SQL, you define namespaces and their prefixes using the WITH XMLNAMESPACES statement.&amp;#160; This statement defines the namespace prefix and associated namespace URI.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once you’ve defined them, you can use the namespace prefix in your XPath queries so that you can properly identify the XML elements you want.&amp;#160; One final note about namespaces here is that we have to define a namespace prefix for the namespace that was the default namespace in the XML sample.&amp;#160; As far as I know there’s no way to define a default XML namespace using the WITH XMLNAMESPACES statement.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;XPath Query results&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Notice that the XPath queries (the CustomerInfo.value() calls) always index into the results to get the first item in the result.&amp;#160; The .value() function always returns an array of matching XML nodes, so if you only want the first (which is often the case, you need to index into the results.&amp;#160; Also note that with these XPath queries, the results are a 1-based array, not 0-based.&amp;#160; So in this example we’re always taking the first element in the result set.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are other functions you can use to query XML columns in T-SQL and you can find out more about this in the Books Online or via MSDN.&amp;#160;&amp;#160; This page is a good starting point for querying XML columns: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189075.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/ms189075.aspx&lt;/a&gt;.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/711138998585539599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/711138998585539599' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/711138998585539599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/711138998585539599'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2011/01/querying-xml-columns-in-sql-server-2008.html' title='Querying XML Columns in SQL Server 2008'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtaghaNllTCQOXXGd0I6Qp9b1DcZGL_F7UPM7zn1tZ24cVItPvc8AlkakAil60_Lpx7FxYCZij1LWv5gbXHVnzHqZQKkU9xt8YewRK6UNfAnw2Mp7OmDkg3p_vXzmQ9HrM9nLeIw/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-680422090986989465</id><published>2009-09-03T08:22:00.001-05:00</published><updated>2009-09-03T08:24:58.054-05:00</updated><title type='text'>Uncovering intermittent test failures using VS Load Tests</title><content type='html'>&lt;p&gt;Our team build has been flaky lately with several unit tests that fail intermittently (and most often only on the build server).&amp;#160; I was getting fed up with a build that was broken most of the time so I decided to see if I could figure out why the tests fail.&lt;/p&gt;  &lt;p&gt;Working on the premise that the intermittent failure was either multiple tests stepping on each other’s toes or timing related.&amp;#160; I decided the easier one to figure out would be the timing issue.&amp;#160; &lt;/p&gt;  &lt;p&gt;To create a new load test:&lt;/p&gt;  &lt;p&gt;1) Select “Test –&amp;gt; New Test” and select “Load Test” from the “Add New Test” dialog&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_ehdU7ty0G9jB1Km6EN8-1kvFRHUyc3wPUxsj9XSmWxs4wlm8h_g78MctmYye2NBV1R-kLhzszAxEUajpdo6q7AC3qq67jW0OvidHDE7lMFoNVHMB-FKgbtXBbHyxLkVioUc-w/s1600-h/AddNewTest2.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;Add New Test&quot; border=&quot;0&quot; alt=&quot;Add New Test&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jRl-vm7Upi4Jk-bcB907fWuQ-uPv5sUPlW4D3wNFxCNSAwZlsvvzkIR02JFQMyEnvu4SDMr6nWBmvWEMJkBsj0P1qNb_RPD8herqRQdywTtX2tNPGdMBNjtIXl4fR1vARJ1-1g/?imgmax=800&quot; width=&quot;244&quot; height=&quot;203&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;2) You will be presented with a Wizard that will help you build a load test.&amp;#160; I don’t know what each setting means, but for the most part I left the settings at their defaults.&amp;#160; I’ve noted the exceptions below.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;a) Welcome&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzhH9_seCIx4seiKa_xKlcuxH0xSkvNTmBGqzHiOlOYxP862U1g_Ui2VDGi9K-vg-4WZjtCLONY5iU_KEAB_6l4EBScZt_vzslje2Zlz01907RLZSy7fQ5ZdC9byRSfBZW6p4AfQ/s1600-h/NewLoadTestWizardWelcome5.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Welcome&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Welcome&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYu89by8Nb4cUnANU2pwIFSX8nrVj4i1tm1Fi6T2UWz-G1edGJC0G4HQi8Hnh833ZsuAjQ5Ci261QsYbppTTWGzDHAZkhIKDflRvcPOgKwa_880rE8BozOrtihysBf_Jj6oHlpPA/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;b) Scenario&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0JeN4ONxCKDg4VSL-dVVJNnbZ5aFnuvDCNnFWKGa6XPN6OLoesG87QfMjyVBRdYSIA6QubjIfTaigrMXye6FlQBsFTx_I8txxWyocfP6czGD2-aI5lzCI-y-YJk1zOfGho6yYbg/s1600-h/NewLoadTestWizardScenario2.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Scenario&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Scenario&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirYI7lJLa8LboFm7BXZ16YAuLbFROykBOVQLoRP6_gNdtbLcVK0UjmPVVQmImKbIAl-zK-D5-RneZAez5jUvhyxwYvikZPNBqPcRFsmIo94Bitog5j0waqyS1SZ2R9962KdVK18g/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;c) Load Pattern&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvV3ulKdJtGjvZ5QJiNFcJ0uuxRaNL_sfvJYZtrntITpuVDduRq2zxwqTFkXVZhNWgnTucSRgZoXzkOMaTkUOv4WrhJFIa67WnvKOZHlnKPxxMI9H2RSlA0IXc6VVa-ii7CSyjhA/s1600-h/NewLoadTestWizardScenarioLoadPattern%5B1%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Scenario - Load Pattern&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Scenario - Load Pattern&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixoVhZ-yUBQnPBcUMXH4QWRqRDfoj5jnTAh10m0x6tm9Omfc2AwLrfjoZ0tNf1ki4qU5Z33snzLnsj-2_j2c1IgtTrLHZxS6X1NglJsCd4S6IObzIhliCv3zS1vFgHaW2YW8Zh7g/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;d) Test Mix Model&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eHcdxQSZE-ptn_BOb0K3xLohvoXqNx3CwLCnytUJP1vlqNjpoe_RYI6yJaB90rf_iD2AUoJdUZEbovlY__ObNDV35QzM9_Z0c7-W1chjuaNc3dub5XbREBuoOW_NW7w-Zeb74g/s1600-h/NewLoadTestWizardScenarioTestMixMode%5B2%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Scenario - Test Mix Model&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Scenario - Test Mix Model&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFSi-pNkxc509_hEu2HH3sGmKcLb69WnnUlYdxkeNluFDovgI_S4BxHkv6d8qRhHGKMln3numP3ZrAl_BP8folvUCa_nJqMdv0pPbC4Jx93cIzpmqP8WJ1_7t0oZfROkFI0oOoFg/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;e) Test Mix&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;The Test Mix step allows you to select which tests should be included in the load test.&amp;#160; For my purposes, I selected the single test that was failing intermittently.&amp;#160; If you select multiple tests this step allows you to manage the distribution of each test within the load.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4wa1YI9kF0H0z0yIpXZ3WVL7w1ohDY3BDPIL7_AVDEYaN859RSmZev3NGWTb5KC-VnsQbrtYTNTk1Xjtwa2a1jV8AXMqrT_nmKBuYQMm-s5XXytw_WNPVSbb2bN9WB7gf60CBnw/s1600-h/NewLoadTestWizardScenarioTestMix2.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Scenario - Test Mix&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Scenario - Test Mix&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYxS9BD4sFSrv0YEd34w2tg_4zlXH9BT3954NnieNEV6C1mTVWNpgMBMfub59YbRVG0G0PTvpdtYO5mkRfmfeluSkEc6GYdyNMU_AXBwCZbTEmaMiy_T1u8VTtzApPeNvatxTVlQ/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;f) Counter Sets&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgobNDTPgXnaUEr0rfoX6zpBkONKzMA_nhvHQY9RVb7xvTkOad-HRVpKg0GBMfumghvrqbrl-vaH3ZSCh83lxkNNTL71EgINEVkMG9l816UkqaP5jpXIHBzjTBNHlw0WsRy94Biyg/s1600-h/NewLoadTestWizardCounterSets2.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Counter Sets&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Counter Sets&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirescvnE1-5rcqh_66O2-IBXUZ8494ne87LkhsDlbB8yGEDe2RQJMB4bikA14erjJFPzvRNGnoJeSdDbHTjdzIYIZH_75qK7vOF4-4NWF6a3JyphZvRewT6gJi0V4KQW7IgRnF1A/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;g) Run Settings&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color=&quot;#cceedd&quot;&gt;Finally, you are able to manage the Warm up duration and Run duration.&amp;#160; Warm up duration is used to “warm up” the environment.&amp;#160; During this time the load test controller simply runs the tests but does not include their results in the load test.&amp;#160; The Run duration represents how long the load test controller will run the mix of tests selected in the “Test Mix” step.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVdl0T7vwmGTAPz7YcAMkyYO2jcvylelxN6Z43C8jm5MHOkS9SWGtqzB7PrR9fAxoJEb3ZyKlor-33PPuUDyMX5N5si83kNwj4R-nCVlIkbKCCOUJxyOHyOB5n-nSmiRl-3bKRIw/s1600-h/NewLoadTestWizardRunSettings2.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;New Load Test Wizard - Run Settings&quot; border=&quot;0&quot; alt=&quot;New Load Test Wizard - Run Settings&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT6mTJ_cmD9tmaotVe-ZPRy5-OL1989PpW2TK5g4-Jz8GeXIxDkuUTCddhyphenhyphenKlMCq39i7lzkzj5mUa6F5RgTw8spm3S7ELRCla1Bg2NIInkm4opOfh5U9smW54Al0iZ_7J8RwHypg/?imgmax=800&quot; width=&quot;244&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once you click Finish, you will be presented with a view of the load test you’ve just created.&amp;#160; You can now click on the “Run test” button to execute the load test.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Gotcha: The first time I tried to do a load test it complained that it couldn’t connect to the database.&amp;#160; You can resolve this by running the following SQL script and then going into Visual Studio and selecting &lt;u&gt;T&lt;/u&gt;est –&amp;gt; Administer Test Controllers…&amp;#160; This will bring up the following dialog.&amp;#160; &lt;/p&gt;   &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3Ak_vTGMWqtw7TDUqtaghNuAQvmj90YH2dZQYk46glhGPIcowuU2H8thH0M9EwcANQyZc0JEIcwQdQYUwwIK_AVjKHsxVZdXMeUNMI5q1ma5AHMYtE4sIh_qPX8-DRdhmjgNeg/s1600-h/Administer%20Test%20Controllers%5B2%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;Administer Test Controllers&quot; border=&quot;0&quot; alt=&quot;Administer Test Controllers&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi398dZdbm5Add669vkoQCz0h6OHUbilO3w0wfdhFqYRrBYpBlCbEslFhVyIv8cw7XeTtL5dxlBusxk9xYYsVYZOR9IYeA3b0F-KIhnEyWuaM2Z_R7ssAk2AaGMpSHoeuBFNOjGHw/?imgmax=800&quot; width=&quot;244&quot; height=&quot;188&quot; /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;   &lt;p&gt;The only thing you need to configure in this dialog is the database connection (the script will create a database called “LoadTest”) so in my case the connection string looked like this:&lt;/p&gt;    &lt;pre&gt;Data Source=(local);Initial Catalog=LoadTest;Integrated Security=True&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now that you have the load test created, you are ready to run it.&amp;#160; Click the “Run test” button on the load test window (shown below).&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBfkJ-z4jUkHRcU0rQiig0uv6NMVmlJlTP67-Fk1-yqz7Ou-X8DOUr8TO6f5ZM65v1_rAPWZbBd4mavIJFDsCOZk9W3FF1PuXrZhE67nXKuFUlRdV29JsZSu4jVbgdX2EPFBxb5Q/s1600-h/Load%20Test%20-%20Ready%20to%20Run%5B7%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px&quot; title=&quot;Load Test - Ready to Run&quot; border=&quot;0&quot; alt=&quot;Load Test - Ready to Run&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIl0kR6aIWkcGtFaYqZchGzykcZ8AOCqZDYaxUfeXkG7xtDD18jlG6Vwi1cZlQ3uDoJsWT_H6f24U42-TUW0AqsZrCv4yLs2MLm9t9qsSdZuQ8TXNF8KFUwrWokXDDghQvCSc-A/?imgmax=800&quot; width=&quot;244&quot; height=&quot;178&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;While the load test is running, Visual Studio will show you 4 graphs that give you information about the current test run.&amp;#160; You can play with the option checkboxes to show/hide different metrics.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In my case, as the load test ran the unit test I’d selected started to fail.&amp;#160; This at least showed me that I could reproduce the failure on my local machine now.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next I added a bit of code to the unit test prior to the assertion that was failing.&amp;#160; Instead of doing the assertion I added code to check for the failure condition and called Debugger.Break().&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I ran the test again, but this time as I hit the Debugger.Break calls I could step through the code very well because the load test was running 25 simultaneous threads (simulating 25 users).&amp;#160; I dug around a bit and found that you can change the number of simultaneous users.&amp;#160; You can adjust the setting by selecting the “Constant Load Pattern” node and adjusting the “Constant User Count” in the Properties window.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I ran the test again and this time I was able to debug the test and figure out what was wrong.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Overall using the load test tool in Visual Studio was quite easy to set up and get going.&amp;#160; Other than the requirement of a database (which is used to store the load test results) it was very easy to set up.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/680422090986989465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/680422090986989465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/680422090986989465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/680422090986989465'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/09/uncovering-intermittent-test-failures.html' title='Uncovering intermittent test failures using VS Load Tests'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4jRl-vm7Upi4Jk-bcB907fWuQ-uPv5sUPlW4D3wNFxCNSAwZlsvvzkIR02JFQMyEnvu4SDMr6nWBmvWEMJkBsj0P1qNb_RPD8herqRQdywTtX2tNPGdMBNjtIXl4fR1vARJ1-1g/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-5272179107824984890</id><published>2009-08-26T16:39:00.004-05:00</published><updated>2009-11-30T16:20:49.506-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="IOC"/><title type='text'>Lessons learned using an IoC Container</title><content type='html'>&lt;p&gt;I am working on my first project that’s using an IoC container heavily.&amp;#160; Overall it’s been a very positive experience.&amp;#160; However, we have learned some things have caused us pain in testing, bug fixing, and general code maintenance.&lt;/p&gt;&lt;h2&gt;Separate component registration from application start-up&lt;/h2&gt;&lt;p&gt;This is a constant source of problem on our project.&amp;#160; If you don’t separate component registration from your component start-up path you often run into a chicken-and-egg problem.&amp;#160; You may be resolving a component that depends on other components that haven’t yet been registered.&amp;#160; This makes for a very brittle start-up path that is prone to breakage as you add dependencies to your components.&amp;#160; Now the container that is supposed to decouple things is causing you to micromanage your component registration and start-up.&amp;#160;&lt;/p&gt;&lt;p&gt;The solution is to split registration from component start-up.&amp;#160; This makes perfect sense to me now, but wasn’t so obvious when we started the project.&amp;#160; Lesson learned!&lt;/p&gt;&lt;h2&gt;Be careful with a global service locator&lt;/h2&gt;&lt;p&gt;We went quite a while without using a global service locator (essentially a singleton instance of the container) but eventually found that we needed it.&amp;#160; This might have been avoided with better design-fu but we couldn’t think of a better alternative at the time.&amp;#160; &lt;/p&gt;&lt;p&gt;What we found was that the global container made things difficult to test.&amp;#160; This became especially painful when we needed to push mock objects into our container and than manually clean up the registrations to replace them with the production components that other tests might expect.&amp;#160; I’d be interested in hearing if you have a way to solve this problem, and if so, how.&lt;/p&gt;&lt;h2&gt;Use a Full-Featured Container&lt;/h2&gt;&lt;p&gt;When we started the project we had intended to use Enterprise Library for some features.&amp;#160; EntLib has Unity integration so we settled on using Unity as our IoC container by default.&amp;#160; The container itself has served us extremely well.&amp;#160; What we’ve found lacking in the container though is it’s supporting infrastructure features.&amp;#160; A container like StructureMap comes with alot of nice features that aren’t core IoC features.&amp;#160; For example, it reduces the “ceremony” (as &lt;a href=&quot;http://codebetter.com/blogs/jeremy.miller/&quot;&gt;Jeremy D. Miller&lt;/a&gt; would say) of registering components by providing convention-based component registration.&amp;#160; StructureMap also provides detailed diagnostics that help you figure out what’s wrong with your component registrations if things don’t work.&lt;/p&gt;&lt;p&gt;That summarizes the biggest points that we’ve learned so far.&amp;#160; I’d be interested to hear some “gotchas” that you’ve learned from using an IoC container “in anger”.&amp;#160; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/5272179107824984890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/5272179107824984890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5272179107824984890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5272179107824984890'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/08/lessons-learned-using-ioc-container.html' title='Lessons learned using an IoC Container'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-3762288566582208068</id><published>2009-08-10T21:40:00.000-05:00</published><updated>2009-08-15T13:14:28.251-05:00</updated><title type='text'>An Introduction to StructureMap</title><content type='html'>&lt;p&gt;Over the next several months I will be presenting a walkthrough of &lt;a href=&quot;http://structuremap.sourceforge.net/Default.htm&quot;&gt;StructureMap&lt;/a&gt;.&amp;#160; I will be starting with the basics of how to construct objects using StructureMap and then move on to more advanced topics.&amp;#160; &lt;/p&gt;  &lt;p&gt;I know there is lots of great &lt;a href=&quot;http://www.dimecasts.net/Casts/ByTag/StructureMap&quot;&gt;information&lt;/a&gt; out there around how to use &lt;a href=&quot;http://structuremap.sourceforge.net/Default.htm&quot;&gt;StructureMap&lt;/a&gt;.&amp;#160; My intention for writing this series is mostly selfish.&amp;#160; I want to learn StructureMap, and as I learn it I&#39;ll be blogging the features I&#39;m learning as I go.&amp;#160; &lt;/p&gt;  &lt;p&gt;I’m currently working on a project that uses the Unity dependency injection container.&amp;#160; This container has worked very well for us, but as I’ve read various blogs and articles I’ve come to realize that a good DI container provides more than just DI.&amp;#160; It’s my intention to learn the basic usage of StructureMap, but also dig into the more advanced usages as well as much of it’s support infrastructure that helps you keep your dependency injection code to a minimum (thinking of auto-wiring, convention-based registration, etc).&lt;/p&gt;  &lt;p&gt;I’ll also be updating this post as I write each new article so that this post can remain as a table of contents for the whole series.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Manual component registration and resolution&lt;/li&gt;    &lt;li&gt;Auto-wiring components&lt;/li&gt;    &lt;li&gt;Convention-based registration&lt;/li&gt;    &lt;li&gt;Component lifetime management&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/3762288566582208068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/3762288566582208068' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3762288566582208068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3762288566582208068'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/08/introduction-to-structuremap.html' title='An Introduction to StructureMap'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-184525858129504392</id><published>2009-08-03T21:32:00.001-05:00</published><updated>2009-08-03T21:32:57.418-05:00</updated><title type='text'>Beware Calculations in Unit Tests</title><content type='html'>&lt;p&gt;Today our project’s continuous integration build failed.&amp;#160; I traced it down to a unit test that was exercising a scheduling class.&amp;#160; The class takes a schedule and figures out the next time it should run based on the current date.&amp;#160; &lt;/p&gt;  &lt;p&gt;Now in our project we’ve provided a way to stub the current date or current time by having a SystemClock class that has a static Instance property.&amp;#160; If we need to we can push a stubbed instance into that property in a unit test to control what the current date/time is.&lt;/p&gt;  &lt;p&gt;The problem in the unit test was that it was relying on DateTime.Now and then figuring out what the expected next scheduled time should be right in the unit test.&amp;#160; The calculations were wrong in the unit test and caused the unit test to fail.&lt;/p&gt;  &lt;p&gt;Almost every time I see calculations in unit tests to figure out what the expected value should be (especially date-based calculations) I cringe because I see those as unit tests waiting to fail.&amp;#160; If you’ve copied your calculations from the class under test, who says you got the calculations right in the production class?&amp;#160; If you did the calculations differently, your unit test’s calculations could be wrong.&amp;#160; Wherever possible I prefer to keep the moving parts to a minimum and have constant dates as my expected values in date-based unit tests.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/184525858129504392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/184525858129504392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/184525858129504392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/184525858129504392'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/08/beware-calculations-in-unit-tests.html' title='Beware Calculations in Unit Tests'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-3902939698107236981</id><published>2009-05-22T16:02:00.001-05:00</published><updated>2009-05-22T16:02:28.365-05:00</updated><title type='text'>ReSharper 4.5 - Tip #2 - Generate Members</title><content type='html'>One of the other developers on the team I&#39;m on pointed out a very handy feature in R# yesterday.  It is the &quot;Generate Members&quot; feature and can be accessed using Ctrl+Ins.  This handy tool is like a central point to accessing the generation features in R#.  The nice thing is that the generated members are placed at the current location and you can generate as many members as you like in one shot.  This makes doing things like wrapping a bunch of private fields really easy.  So, the next time you are using Alt+Enter (Quick Fix) to generate some code using R#, consider using Alt+Ins and see what it can do.  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/3902939698107236981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/3902939698107236981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3902939698107236981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3902939698107236981'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/05/resharper-45-tip-2-generate-members.html' title='ReSharper 4.5 - Tip #2 - Generate Members'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-1134313913083115145</id><published>2009-05-06T11:21:00.002-05:00</published><updated>2009-05-06T11:23:10.376-05:00</updated><title type='text'>ReSharper 4.5 - Tip #1 - Wildcards in Go To Type shortcut</title><content type='html'>&lt;p&gt;I tend to use the Go To Type shortcut in R# alot (&lt;strong&gt;ctrl+N&lt;/strong&gt; for you keyboard junkies).  It was only recently that I found out that you can use simple wildcards when using the shortcut.&lt;/p&gt;&lt;p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLe-eb-dBkxDrkCK-4gnr7yTt21gUj0kLZ8EkvKS-9wrFbfr4J_h5hTffiF-kJRnQ4XRQNPJbjIWYpVPsYmoZki5bH11O2YOpW9qdN9ppo8eSSUVrtUY062aH7z1ka2h6rN1X6wQ/s1600-h/ReSharper+-+Go+To+Type+Wildcards.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 400px; height: 141px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLe-eb-dBkxDrkCK-4gnr7yTt21gUj0kLZ8EkvKS-9wrFbfr4J_h5hTffiF-kJRnQ4XRQNPJbjIWYpVPsYmoZki5bH11O2YOpW9qdN9ppo8eSSUVrtUY062aH7z1ka2h6rN1X6wQ/s400/ReSharper+-+Go+To+Type+Wildcards.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5332747148358805938&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In the above screenshot you can see that I&#39;m looking for all classes that start with &quot;Pet&quot; and end with &quot;View&quot;.  I don&#39;t use this feature every time I want to jump to a type, but often I can&#39;t remember the exact name of a class but I&#39;ll know pieces of the name and this helps in those cases (it&#39;s especially helpful when I just know how the class name ends, eg. &quot;*Presenter&quot;).&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/1134313913083115145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/1134313913083115145' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1134313913083115145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1134313913083115145'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/05/resharper-45-tip-1-wildcards-in-go-to.html' title='ReSharper 4.5 - Tip #1 - Wildcards in Go To Type shortcut'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLe-eb-dBkxDrkCK-4gnr7yTt21gUj0kLZ8EkvKS-9wrFbfr4J_h5hTffiF-kJRnQ4XRQNPJbjIWYpVPsYmoZki5bH11O2YOpW9qdN9ppo8eSSUVrtUY062aH7z1ka2h6rN1X6wQ/s72-c/ReSharper+-+Go+To+Type+Wildcards.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-2513020471851700139</id><published>2009-04-15T10:59:00.001-05:00</published><updated>2009-04-15T10:59:20.033-05:00</updated><title type='text'>Build steps in Team Build</title><content type='html'>This is mostly for my own sake, but here&#39;s a link to the list of targets that are run during a Team Build on TFS 2008.    &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa337604.aspx&quot;&gt;Customizable Team Foundation Build Targets&lt;/a&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/2513020471851700139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/2513020471851700139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/2513020471851700139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/2513020471851700139'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/04/build-steps-in-team-build.html' title='Build steps in Team Build'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-4708605117983769548</id><published>2009-02-03T08:47:00.002-06:00</published><updated>2009-02-03T08:51:05.398-06:00</updated><title type='text'>Visual Studio Team System - The option that I&amp;#39;ve been missing all these years (Filter by Solution)</title><content type='html'>&lt;p&gt;I&#39;ve been using Team System for a number of years, and one thing that was frustrating was that the Pending Changes window showed all files in the current workspace.  This becomes unmanageable when you have several projects sharing a workspace (whether that&#39;s &quot;best practice&quot; is irrelevant).&lt;/P&gt; &lt;p&gt;Today I happened upon the option that I&#39;ve been thinking should exist but could never find: Filter by Solution.&lt;/p&gt;  &lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpatHqfk8F2Kpa4nyxlGbFOPgltrn12DOBd5UyeqxSqGNCXboMneTgibaYhJUg9IifbrBm7LngkzyiR5GzD2RQLHlsJiAEIyNJoIIv_nwzX7LSIIpLEXZNxklNBvz_itOVPH-r9g/s1600-h/FilterBySolution.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 400px; height: 70px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpatHqfk8F2Kpa4nyxlGbFOPgltrn12DOBd5UyeqxSqGNCXboMneTgibaYhJUg9IifbrBm7LngkzyiR5GzD2RQLHlsJiAEIyNJoIIv_nwzX7LSIIpLEXZNxklNBvz_itOVPH-r9g/s400/FilterBySolution.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5298583643915003090&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/4708605117983769548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/4708605117983769548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4708605117983769548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4708605117983769548'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/02/visual-studio-team-system-option-that-i.html' title='Visual Studio Team System - The option that I&amp;#39;ve been missing all these years (Filter by Solution)'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpatHqfk8F2Kpa4nyxlGbFOPgltrn12DOBd5UyeqxSqGNCXboMneTgibaYhJUg9IifbrBm7LngkzyiR5GzD2RQLHlsJiAEIyNJoIIv_nwzX7LSIIpLEXZNxklNBvz_itOVPH-r9g/s72-c/FilterBySolution.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-5466086199322260431</id><published>2009-01-23T09:39:00.001-06:00</published><updated>2009-01-23T09:39:27.547-06:00</updated><title type='text'>Consistency in APIs</title><content type='html'>&lt;p&gt;One thing that I feel is very important when building APIs is consistency in how method parameters are ordered. Abrams and Cwalina&#39;s Framework Design Guidelines talks about this as well.&lt;/p&gt; &lt;p&gt;I came across one instance of inconsistency that is a good example, I think. We&#39;re using MSTest for unit testing on our current project and so we make extensive use of it&#39;s &amp;quot;Assert&amp;quot; class. For most of the assertions that do a comparison between and expected and actual object, you pass the expected object first. For example: &lt;/p&gt;&lt;pre&gt;Assert.AreEqual(Of T)(expected as T, actual as T)&lt;/pre&gt; or &lt;pre&gt;Assert.AreSame(expected as Object, actual as Object)&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;And now we come to the exception.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Assert.IsInstanceOfType(value as Object, expectedType as System.Type)&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;When using the assertion for IsInstanceOfType, suddenly it takes the actual object in the first position.  This becomes annoying because now I have to remember if I put the actual or expected object first every time I use an assertion method.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Additionally, they&#39;ve also named the expected object parameter &quot;value&quot; instead of &quot;expected&quot;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, when building APIs even if you are not planning on publishing them for devs outside of your project, remember to be consistent with parameter ordering and naming.  It helps with discovery and adoption of the API.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/5466086199322260431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/5466086199322260431' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5466086199322260431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5466086199322260431'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/01/consistency-in-apis.html' title='Consistency in APIs'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-3125030351476393885</id><published>2009-01-05T12:56:00.001-06:00</published><updated>2009-01-05T12:56:55.559-06:00</updated><title type='text'>Splitting PDFs</title><content type='html'>&lt;p&gt;Today I needed to split up a PDF and went looking for a tool that would do that for me.&amp;#160; I came across the project named PDF Toolkit (&lt;a title=&quot;http://www.accesspdf.com/pdftk/&quot; href=&quot;http://www.accesspdf.com/pdftk/&quot;&gt;http://www.accesspdf.com/pdftk/&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;Using this tool I executed the following command and, voila, I had one PDF document for each page in my input document:&lt;/p&gt;  &lt;pre&gt;pdftk.exe input_file.pdf burst&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Check the included .txt file for the full set of command-line parameters.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/3125030351476393885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/3125030351476393885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3125030351476393885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3125030351476393885'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2009/01/splitting-pdfs.html' title='Splitting PDFs'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-4314746440270388003</id><published>2008-11-14T21:28:00.001-06:00</published><updated>2008-11-15T09:07:10.205-06:00</updated><title type='text'>WCF service blocking when self-hosting (or How The ServiceBehavior&amp;#39;s UseSynchronizationContext parameter saved me)</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;  .code { border: 1px solid #ccc; list-style-type: decimal-leading-zero; padding: 2px; margin: 0; }&lt;br /&gt;  .code code { display: block; padding: 2px; margin-bottom: 0; }&lt;br /&gt;  .code li { margin: 0 0 2px 2.2em; }&lt;/style&gt; &lt;p&gt;Today I was working on a feature in our application that uses WCF.&amp;#160; We wanted to make it possible to run the service piece in-process or as a service with minimal changes.&amp;#160; This is quite easy with WCF using the ServiceModelEx library from the iDesign crew.&amp;#160; Simply reference the ServiceModelEx.dll and wherever you&#39;d normally create your WCF client proxy, just use the following code instead:&lt;/p&gt;  &lt;ol class=&quot;code&quot;&gt;   &lt;li&gt;&lt;code&gt;Dim channel = InProcFactory.CreateInstance(Of TServiceImpl, TServiceInterface)()&lt;/code&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;However, when I ran this code the first call on the client proxy hung and timed out.&amp;#160; I started digging into why it was timing out.&amp;#160; Eventually I remembered reading about WCF&#39;s ability to use a SynchronizationContext with the ServiceBehaviorAttribute.&amp;#160; Essentially WCF will use a SynchronizationContext to manage some of the threading issues that arise from writing a WCF service and/or client.&amp;#160; (See more &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.servicemodel.servicebehaviorattribute.usesynchronizationcontext.aspx&quot;&gt;here&lt;/a&gt;).&amp;#160; It gets even better when you are hosting a WCF service within a Windows Forms application.&amp;#160; In that case the WCF service will grab the WinForm SynchronizationContext that manages threading of the UI thread.&lt;/p&gt;  &lt;p&gt;It turns out that was exactly my problem.&amp;#160; Using the InProcFactory (which uses the Named Pipe binding to host the service implementation in the same process as the client) my service was being hosted in my WinForms application.&amp;#160; This caused the default WCF behaviour of attaching to the UI thread&#39;s SynchronizationContext to occur.&amp;#160; When I called my WCF service, the service blocked because the WCF client proxy was invoked from the UI.&amp;#160; When the timeout occurred and the client-side had finished with the UI thread, the service happily proceeded to execute (which was far too late at this point).&lt;/p&gt;  &lt;h2&gt;The Solution&lt;/h2&gt;  &lt;p&gt;The solution turns out to be extremely easy.&amp;#160; The ServiceBehaviorAttribute can be applied to your WCF service implementation.&amp;#160; One of the parameters to that is &amp;quot;UseSynchronizationContext&amp;quot;.&amp;#160; Set that to false on your service and the service will create it&#39;s own SynchronizationContext and your client will no longer block when hosting the service in process.&lt;/p&gt;  &lt;ol class=&quot;code&quot;&gt;   &lt;li&gt;&lt;code&gt;ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Reentrant, UseSynchronizationContext:=False)&amp;gt; _ &lt;/code&gt;&lt;/li&gt;    &lt;li&gt;&lt;code&gt;Public Class MyService&lt;/code&gt; &lt;/li&gt;    &lt;li&gt;&lt;code&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Implements IMyService &lt;/code&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/4314746440270388003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/4314746440270388003' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4314746440270388003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4314746440270388003'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/11/wcf-service-blocking-when-self-hosting.html' title='WCF service blocking when self-hosting (or How The ServiceBehavior&amp;#39;s UseSynchronizationContext parameter saved me)'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-1630876555242733410</id><published>2008-09-19T10:22:00.001-05:00</published><updated>2008-09-19T10:22:50.833-05:00</updated><title type='text'>VB.NET and default values</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;A reminder for myself more than anything.&lt;br/&gt;&lt;br/&gt;In VB.NET &#39;Nothing&#39; can be used as the default value for &lt;u&gt;any&lt;/u&gt; type.  This is the equivalent to &#39;default(T)&#39; in C#.  &lt;br/&gt;&lt;br/&gt;This is especially handy when creating generic methods where you want to return the default value for the generic type.&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/1630876555242733410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/1630876555242733410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1630876555242733410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/1630876555242733410'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/09/vbnet-and-default-values.html' title='VB.NET and default values'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-5449023702517343065</id><published>2008-08-22T09:15:00.002-05:00</published><updated>2008-08-22T09:19:24.337-05:00</updated><title type='text'>UI Design - What am I moving?</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Here&#39;s a UI design snafu that I came across today in Vista.&lt;br/&gt;&lt;br/&gt;&lt;img src=&#39;http://lh4.ggpht.com/jeremy.wiebe/SK7KiJeRhvI/AAAAAAAAAHs/6sqHQadD9Dg/%5BUNSET%5D.jpg&#39; alt=&#39;Vista &amp;quot;Move&amp;quot; dialog&#39;/&gt;&lt;br/&gt;&lt;br/&gt;Can you tell me what the name of the folder I&#39;m moving is?  This isn&#39;t a big deal for a single move, but when you have a couple of these windows open and you are wanting to cancel one, how do you know which one to cancel.   It would have been nice if the title bar or banner said &quot;Preparing to move &#39;SomeFolder&#39;&quot;.   &lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/5449023702517343065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/5449023702517343065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5449023702517343065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5449023702517343065'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/08/ui-design-what-am-i-moving.html' title='UI Design - What am I moving?'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/jeremy.wiebe/SK7KiJeRhvI/AAAAAAAAAHs/6sqHQadD9Dg/s72-c/%5BUNSET%5D.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-5944817383815774474</id><published>2008-08-01T14:11:00.001-05:00</published><updated>2008-08-01T14:11:53.888-05:00</updated><title type='text'>Informative Podcasts</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Over the past 6 months I&#39;ve started listening to podcasts during my commute to and from work.  I&#39;ve included a list of podcasts that I listen to.  If you have others that you find useful/interesting, feel free to post them in the comments.  I&#39;ll update this list as time goes by as I find new ones of if somebody points one out in a comment.&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#39;http://www.dotnetrocks.com/&#39;&gt;.NET Rocks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://www.hanselminutes.com&#39;&gt;Hanselminutes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://www.pragprog.com/podcasts&#39;&gt;Pragmatic Podcast&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://altnetpodcast.com/&#39;&gt;ALT.NET Podcast&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://twit.tv/FLOSS&#39;&gt;FLOSS Weekly&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://www.se-radio.net/&#39;&gt;Software Engineering Radio&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/5944817383815774474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/5944817383815774474' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5944817383815774474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/5944817383815774474'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/08/informative-podcasts.html' title='Informative Podcasts'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-4435391160813675684</id><published>2008-06-18T12:30:00.001-05:00</published><updated>2008-06-25T12:30:19.953-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Imaginet"/><title type='text'>Imaginet Webcast - Dependency Injection with StructureMap</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I did a webcast today on StructureMap and Dependency Injection.  Overall it went ok (except that I forgot to turn on the audio part of LiveMeeting for the first few minutes and had to restart).  I&#39;ve clipped that from the video so you won&#39;t have to watch me walk through slides without audio.&lt;br/&gt;&lt;br/&gt;You can grab the content using the following links:&lt;br/&gt;&lt;br/&gt;&lt;em&gt;Edit (June 25, 2008) - I&#39;ve uploaded the presentation finally.  Note that for the first few minutes I didn&#39;t have my audio on.  I restarted once I figured that out.  It&#39;s a bit raw, but after several attempts to re-encode the presentation I decided to give up and just publish it.  &lt;/em&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#39;http://cid-bee4e799a20afc34.skydrive.live.com/self.aspx/Public/Dependency%20Injection%20with%20StructureMap.pptx&#39;&gt;Slide deck&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://cid-bee4e799a20afc34.skydrive.live.com/self.aspx/Public/Dependency%20Injection%20with%20StructureMap.Code.zip&#39;&gt;Sample Code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#39;http://cid-bee4e799a20afc34.skydrive.live.com/self.aspx/Public/Dependancy%20Injection%20with%20StructureMap.Presentation.zip&#39;&gt;Webcast Video&lt;/a&gt; &lt;br/&gt;&lt;/li&gt;&lt;/ul&gt;If you have any questions feel free to post them in a comment to this post.&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/4435391160813675684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/4435391160813675684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4435391160813675684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4435391160813675684'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/06/imaginet-webcast-dependency-injection.html' title='Imaginet Webcast - Dependency Injection with StructureMap'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-118783234955533988</id><published>2008-05-15T09:23:00.001-05:00</published><updated>2008-05-15T09:23:03.497-05:00</updated><title type='text'>IE7Pro - Don&amp;#39;t run IE without it.</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;If you are an avid Internet Explorer user, one add-in that I&#39;d highly recommend is &lt;a href=&#39;http://www.ie7pro.com/&#39;&gt;IE7Pro&lt;/a&gt;!&lt;br/&gt;&lt;br/&gt;This add-in brings a number of great features to the table including:&lt;br/&gt;    - Ad blocking&lt;br/&gt;    - Spell checking&lt;br/&gt;    - Inline search (This is the same search implementation as FireFox has and after using this the popup search will seem so annying!)&lt;br/&gt;    - A whole bunch more!&lt;br/&gt;&lt;br/&gt;Do yourself a favour and check it out.&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/118783234955533988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/118783234955533988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/118783234955533988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/118783234955533988'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/05/ie7pro-don-run-ie-without-it.html' title='IE7Pro - Don&amp;#39;t run IE without it.'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-8674166553818944737</id><published>2008-05-12T21:24:00.001-05:00</published><updated>2008-05-12T21:24:10.551-05:00</updated><title type='text'>Imaginet Webcast Series (part II)</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Joel has just &lt;a href=&#39;http://weblogs.asp.net/jsemeniuk/archive/2008/05/12/free-webcast-on-process-template-customization-and-more.aspx&#39;&gt;posted&lt;/a&gt; all the details about &lt;a href=&#39;http://www.imaginets.com&#39;&gt;Imaginet&#39;s&lt;/a&gt; free webcast series.&lt;br/&gt;&lt;br/&gt;There&#39;s lots of great content in this series so feel free to take in whatever interests you.&lt;br/&gt;&lt;br/&gt;We&#39;ll be recording these webcasts and making them available for you to watch whenever you want.  As we finish each webcast we&#39;ll post the archived URL and &quot;show notes&quot;.  &lt;br/&gt;&lt;br/&gt;Stay tuned for more info.  &lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/8674166553818944737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/8674166553818944737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/8674166553818944737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/8674166553818944737'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/05/imaginet-webcast-series-part-ii.html' title='Imaginet Webcast Series (part II)'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-9133208644700158859</id><published>2008-05-08T08:44:00.001-05:00</published><updated>2008-05-08T08:44:48.567-05:00</updated><title type='text'>XUnit.Net&amp;#39;s [Fact] and [Theory] attributes</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Following a &lt;a href=&#39;http://codebaboon.blogspot.com/2008/05/fact-vs-test.html&#39;&gt;debate&lt;/a&gt; with &lt;a href=&#39;http://codebaboon.blogspot.com/&#39;&gt;Dave&lt;/a&gt; yesterday I got to thinking (it&#39;s a rare event, and I like to revel in it when it happens).  There may be technical reasons why you have to use [Fact] for a &quot;regular&quot; unit test (oh, I know it&#39;s not a unit test, it&#39;s a specification, humour me) and [Theory] for &quot;data driven&quot; tests.  But from a usage point of view, why should I care if it&#39;s data driven or not?   Wouldn&#39;t it be nice if the test runner would be able to identify a parameterless method and say &quot;hey, this must be a regular unit test&quot;.  Also,if the method has parameters it could be smart enough to say &quot;hmm... this must be a data driven test.  Do I have any data available?&quot;.  If the developer hasn&#39;t provided any data, then the test, I mean spec, fails.  &lt;br/&gt;&lt;br/&gt;I think I fall on Dave&#39;s side of the argument that this feels like changing somewhat standardized terminology just for the sake of being different (or maybe it&#39;s trendy to keep up with the Ruby folks?).  &lt;br/&gt;&lt;br/&gt;What do you think, dear reader?&lt;br/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/9133208644700158859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/9133208644700158859' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/9133208644700158859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/9133208644700158859'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/05/xunitnet-fact-and-theory-attributes.html' title='XUnit.Net&amp;#39;s [Fact] and [Theory] attributes'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-4755618071371927247</id><published>2008-05-06T12:42:00.001-05:00</published><updated>2008-05-06T12:42:33.532-05:00</updated><title type='text'>Resetting the Administrator password on Windows Server 2003</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;At my &lt;a href=&#39;http://www.imaginets.com&#39;&gt;work&lt;/a&gt; we use Microsoft Virtual PC quite extensively.  One of the &quot;fun&quot; things about this is that you end up collecting alot of passwords.  Normally I just have a text file in the same directory as my virtual images that reminds me what the Administrator password is. &lt;br/&gt;&lt;br/&gt;Today I booted an image and could not remember the password.  I started Googling and found a few solutions.  I finally found one that was able to blank out the Administrator password.  The project is called &lt;a href=&#39;http://trinityhome.org&#39;&gt;Trinity Rescue Kit&lt;/a&gt;.  It is a bootable Linux ISO image.  Once it boots you simply execute &quot;winpass&quot; and follow the prompts.  It gave me some scary warnings saying that the filesystem was in use (because I wasn&#39;t able to shut down the image cleanly because I couldn&#39;t log in) and because something called SYSKEY was enabled.  I forced a mount of the filesystem and that turned out fine.  I also choose the default option for the SYSKEY question (which left it enabled) and that in the end I can now log into the VPC.  &lt;br/&gt;&lt;br/&gt;Hurray for Trinity Rescue Kit!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/4755618071371927247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/4755618071371927247' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4755618071371927247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/4755618071371927247'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/05/resetting-administrator-password-on.html' title='Resetting the Administrator password on Windows Server 2003'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-2434595241706303000</id><published>2008-05-02T16:26:00.002-05:00</published><updated>2008-05-03T17:09:11.529-05:00</updated><title type='text'>Setting sort order in Windows Live Messenger History</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;I use &lt;a href=&#39;http://messenger.live.com&#39;&gt;Windows Live Messenger&lt;/a&gt; quite a bit (for personal and work use actually).  I find that it&#39;s annoying that when I view the message history for a contact that it&#39;s sorted with the oldest messages at the top.  Most often I&#39;m interested in the newest messages when I go to view message history.  Today I decided to change that.&lt;br/&gt;&lt;br/&gt;First some background.  Windows Live Messenger stores each contact&#39;s message history as an XML file in &quot;My Documents&quot; (or &quot;Documents&quot; if you are on Vista) within a folder named &quot;My Received Files\[msnid]00000\History&quot;  (where [msnid] is your Live Messenger id and the 0&#39;s are some number that changes).  Within this folder there is also a file named MessageLog.xsl.  This file is used when viewing the message history to format the XML files in a nice format (using an XSL transform).&lt;br/&gt;&lt;br/&gt;It turns out that it&#39;s very easy to change the ordering of the message history.  Within MessageLog.xsl there are several parameters (at the top of the file) that control the layout of the history view.  Simply edit the &amp;lt;xsl:variable&amp;gt; named &quot;MostRecentSessionFirst&quot; and set it&#39;s value to 1 your messages will now sort in descending chronological order.  &lt;br/&gt;&lt;br/&gt;&lt;span style=&#39;font-family: Courier New;&#39;&gt;&amp;lt;&lt;span style=&#39;color: rgb(0, 0, 153);&#39;&gt;xsl&lt;/span&gt;:&lt;span style=&#39;color: rgb(102, 51, 51);&#39;&gt;&lt;span style=&#39;font-weight: bold;&#39;&gt;variable&lt;/span&gt; &lt;/span&gt;name=&lt;span style=&#39;color: rgb(204, 51, 204);&#39;&gt;&#39;MostRecentSessionFirst&#39;&lt;/span&gt;&amp;gt;1&amp;lt;/&lt;span style=&#39;color: rgb(0, 0, 153);&#39;&gt;xsl&lt;/span&gt;:&lt;span style=&#39;color: rgb(102, 51, 51); font-weight: bold;&#39;&gt;variable&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;There&#39;s several other &amp;lt;xsl:variable&amp;gt;&#39;s at the top that you can play with.  I&#39;d recommend making a backup before starting to play with this file though.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/2434595241706303000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/2434595241706303000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/2434595241706303000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/2434595241706303000'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/05/setting-sort-order-in-windows-live.html' title='Setting sort order in Windows Live Messenger History'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10438017.post-3389310261773739708</id><published>2008-04-30T10:13:00.001-05:00</published><updated>2008-05-14T15:55:44.633-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Imaginet"/><category scheme="http://www.blogger.com/atom/ns#" term="WebCasts"/><title type='text'>Imaginet Webcast Series</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;Several of my colleagues from &lt;a href=&#39;http://www.imaginets.com&#39;&gt;Imaginet&lt;/a&gt; and I will be presenting a series of webcasts starting on May 14th.  This series will be pretty broad in what is covered, but in most cases will be very technical (ie. low on Powerpoint, high on code).  These webcasts will all start at 11:15 am EST and will be about 1/2 hour each.  &lt;br/&gt;&lt;br/&gt;If you&#39;re looking through this schedule and you have other ideas on what you&#39;d like to see, feel free to leave a comment and we&#39;ll try to cover that topic in the future.&lt;br/&gt;&lt;br/&gt;Here&#39;s the schedule.&lt;br/&gt;&lt;br/&gt;&lt;table cellspacing=&#39;0&#39; cellpadding=&#39;3&#39; border=&#39;1&#39;&gt;&lt;tbody&gt;&lt;tr style=&#39;border-bottom: 1px solid gray;&#39;&gt;&lt;td&gt;&lt;strong&gt;Topic&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Presenter&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customizing Team System Process Templates&lt;/td&gt;&lt;td&gt;&lt;a title=&#39;Ta. Steve Porter&#39; href=&#39;http://homepage.mac.com/stevevrporter/blog/Ta.html&#39;&gt;Steve Porter&lt;/a&gt;&lt;/td&gt;&lt;td&gt;14-May-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Introduction to Software Factories&lt;/td&gt;&lt;td&gt;Robert Regnier&lt;/td&gt;&lt;td&gt;21-May-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Windows Communication Service Gateways&lt;br/&gt; with C # 3.0 and&lt;br/&gt;  Linq-To-SQL&lt;/td&gt;&lt;td&gt;&lt;a title=&#39;Code Baboon&#39; href=&#39;http://codebaboon.blogspot.com/&#39;&gt;Dave Harris&lt;/a&gt;&lt;/td&gt;&lt;td&gt;28-May-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Testing out the MVC: Routing&lt;/td&gt;&lt;td&gt;Ryan Weppler&lt;/td&gt;&lt;td&gt;04-Jun-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customizing Software Factories &lt;/td&gt;&lt;td&gt;Robert Regnier&lt;/td&gt;&lt;td&gt;11-Jun-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dependency Injection with StructureMap&lt;/td&gt;&lt;td&gt;&lt;a title=&#39;Miscellaneous Jibberish&#39; href=&#39;http://miscjibberish.blogspot.com/&#39;&gt;Jeremy Wiebe&lt;/a&gt;&lt;/td&gt;&lt;td&gt;18-Jun-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Nhibernate: An Entry-Level Primer&lt;/td&gt;&lt;td&gt;&lt;a title=&#39;Code Baboon&#39; href=&#39;http://codebaboon.blogspot.com/&#39;&gt;Dave Harris&lt;/a&gt;&lt;/td&gt;&lt;td&gt;25-Jun-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Creating Real world applications with CSLA 3.5&lt;/td&gt;&lt;td&gt;David Maynard&lt;/td&gt;&lt;td&gt;02-Jul-08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MVC vs MVP smackdown&lt;/td&gt;&lt;td&gt;Robert Regnier&lt;/td&gt;&lt;td&gt;09-Jul-08&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://miscjibberish.blogspot.com/feeds/3389310261773739708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/10438017/3389310261773739708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3389310261773739708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10438017/posts/default/3389310261773739708'/><link rel='alternate' type='text/html' href='http://miscjibberish.blogspot.com/2008/04/imaginet-webcast-series.html' title='Imaginet Webcast Series'/><author><name>Jeremy Wiebe</name><uri>http://www.blogger.com/profile/13405039983105435523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLz-hMseRcblDL2oP3qrG3UIo6WVXcjI06DMEtuycDYCQySemd-p5ZcxX7oNTM-HsCp3QO1n-SHWm7v_qUhjOLj0x3GcQXjPCUczHw8mrfQzxSho-jiDn8TObSjpPRlA/s220/Profile+-+2016.jpg'/></author><thr:total>0</thr:total></entry></feed>