<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" version="2.0">
  <channel>
    <title>Monsters Got My .NET</title>
    <description>How I learned to stop worrying and love programming</description>
    <link>http://www.monstersgotmy.net/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.0</generator>
    <blogChannel:blogRoll>http://www.monstersgotmy.net/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.monstersgotmy.net/syndication.axd</blogChannel:blink>
    <dc:creator>Khalid Abuhakmeh</dc:creator>
    <dc:title>Monsters Got My .NET</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/MonstersGotMynet" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Asp.Net Loves Html</title>
      <description>&lt;p&gt;Recently just published &lt;a href="http://aspdotnetloveshtml.com/" title="Asp.Net Loves Html"&gt;Asp.Net loves Html&lt;/a&gt;. A site targeted at web developers urging them to take the leap away from web forms and back to HTML. Check it out and make your voice known at the bottom of the site page. The site was written using Asp.Net MVC, pretty pretty cool.&lt;/p&gt;&lt;p&gt;P.S. If you know the the Konami code, give it a try. &lt;/p&gt;</description>
      <link>http://www.monstersgotmy.net/post/AspNet-Loves-Html.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/AspNet-Loves-Html.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=2ec91d53-13cf-4ca3-9dfe-f5fa1bd58fde</guid>
      <pubDate>Mon, 22 Jun 2009 13:29:00 -0500</pubDate>
      <category>Code</category>
      <category>Code Review</category>
      <category>General</category>
      <category>Rants</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=2ec91d53-13cf-4ca3-9dfe-f5fa1bd58fde</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=2ec91d53-13cf-4ca3-9dfe-f5fa1bd58fde</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/AspNet-Loves-Html.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=2ec91d53-13cf-4ca3-9dfe-f5fa1bd58fde</wfw:commentRss>
    </item>
    <item>
      <title>Visual Studio 2010 is Cool</title>
      <description>&lt;p&gt;I just installed Visual Studio 2010 and I have to say I am impressed so far. The whole user experience is clean and vibrant. It feels like the first time I opened up Visual Studio and wrote my first hello world application. It definetly is exciting. Check out the screenshots below. There are a couple downsides currently: There isn't ASP.NET MVC templates and tools available just yet and Resharper didn't transfer over. Ok, time to great cracking on the new .NET 4.0 framework; can't wait to see what I can do with it.&lt;/p&gt;&lt;div style="text-align: center"&gt;&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f6%2fstartScreen.png" alt="start screen" width="600" height="500" /&gt;&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f6%2fhighlighting.png" alt="highlight my hello world" width="600" height="500" /&gt;&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f6%2fdebugging.png" alt="debugging my hello world" width="600" height="500" /&gt;&lt;/div&gt;&lt;div style="text-align: left"&gt; &lt;/div&gt;&lt;div style="text-align: left"&gt;&lt;span class="Apple-style-span" style="font-weight: bold"&gt;Update 06/05/2009:&lt;/span&gt; I just ran into my first bug that doesn't let me put breakpoints in by clicking next to the line. The workaround is to menu click on the line and add a breakpoint through the context menu. Nothing major, just a little annoying.&lt;/div&gt;</description>
      <link>http://www.monstersgotmy.net/post/Visual-Studio-2010-is-Cool.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Visual-Studio-2010-is-Cool.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=473b8880-c1a8-4298-a71c-a4f4f5558ed0</guid>
      <pubDate>Fri, 05 Jun 2009 19:18:00 -0500</pubDate>
      <category>Products</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=473b8880-c1a8-4298-a71c-a4f4f5558ed0</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=473b8880-c1a8-4298-a71c-a4f4f5558ed0</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Visual-Studio-2010-is-Cool.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=473b8880-c1a8-4298-a71c-a4f4f5558ed0</wfw:commentRss>
    </item>
    <item>
      <title>Named Parameters: Your Next Big Fight</title>
      <description>&lt;p&gt;I recently wrote my first iphone application the other day and found that although it wasn't difficult to write it, I would prefer a language like C#. The one thing I did like was the naming of parameters when making a method call. &lt;/p&gt;&lt;pre class="csharp" name="code"&gt;[object methodWithInput:input];&lt;/pre&gt;&lt;p&gt;A little wierd compared to most languages which adopt dot notation, but hey the languages have to differ somewhere. This feature is being adopted in the newest iteration of C# and I think it's great and will definetely start using it, but here is why you might get some fight from other developers on using them.&lt;/p&gt;&lt;h3&gt;Code Bloat&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;Adding more text on a line will increase the amount a developer has to read. You might get arguments against named parameters, but named parameters make your code more readable. Any method that takes a boolean instantly becomes more readable once the input parameter is named. I pulled the following from ASP.NET MVC.&lt;/p&gt;&lt;pre class="csharp" name="code"&gt;MembershipUser currentUser=_provider.GetUser( userName, true);&lt;/pre&gt;&lt;pre class="csharp" name="code"&gt;MembershipUser currentUser=_provider.GetUser( userName, userIsOnline:true);&lt;/pre&gt;&lt;h3&gt;"You Just Like the Candy"&lt;/h3&gt;&lt;p&gt;I hear this a lot, "You just want to use the new stuff cause it's new." Well that may be the case, but new stuff is never created to make things harder for a developer. Named Parameters are no exception. But the value of this candy complements the addition of optional parameters in C#. If you don't use the named parameters, your optional parameter methods might become &lt;a href="http://blogs.msdn.com/brunoterkaly/archive/2009/03/24/c-4-0-part-2-optional-and-named-parameters.aspx" title="optional and name parameters"&gt;confusing and harder to read.&lt;/a&gt;  &lt;/p&gt;&lt;h3&gt;&lt;span class="Apple-style-span" style="font-size: 11px; font-weight: normal"&gt;"&lt;/span&gt;Do I Have To?"&lt;br /&gt;&lt;/h3&gt;&lt;p&gt; Well no you don't have to use named parameters, just like you don't have to use lambda expression. It's all syntactical sugar that makes your development life easer. If you choose not to use it, then it's your decision.&lt;/p&gt;&lt;p&gt;Take a look at this feature and keep an eye out, you'll see an explosion of use regarding named parameters once .NET 4.0 comes out (but that's just the ramblings on one developer).&lt;/p&gt;&lt;p&gt;&lt;a href="http://geekswithblogs.net/michelotti/archive/2009/01/22/c-4.0-named-parameters-for-better-code-quality.aspx" title="geeks with blogs"&gt;Here is a great blog post&lt;/a&gt; about named parameters take a look. &lt;/p&gt;</description>
      <link>http://www.monstersgotmy.net/post/Named-Parameters-Your-next-big-fight.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Named-Parameters-Your-next-big-fight.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=70eaa823-79a6-4be8-b4e6-ae4f1c69e66b</guid>
      <pubDate>Wed, 20 May 2009 10:52:00 -0500</pubDate>
      <category>Code</category>
      <category>General</category>
      <category>Rants</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=70eaa823-79a6-4be8-b4e6-ae4f1c69e66b</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=70eaa823-79a6-4be8-b4e6-ae4f1c69e66b</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Named-Parameters-Your-next-big-fight.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=70eaa823-79a6-4be8-b4e6-ae4f1c69e66b</wfw:commentRss>
    </item>
    <item>
      <title>Ifrit XNA Game Engine - By Request</title>
      <description>&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f5%2f9-ifrit-a.jpg" alt="Ifrit - Fire Demon" title="Ifrit - Fire Demon" hspace="10" vspace="10" align="right" /&gt;&lt;p&gt;I had someone email me and ask me how the &lt;a href="http://stackoverflow.com/questions/743947/what-should-be-in-a-2d-game-engine" title="Stackoverflow Question"&gt;XNA Game Engine&lt;/a&gt; was going and said they would like to try it out. So here it is. Instead of letting the code die, I thought I would give it a second chance with other developers. I haven't had much time lately and when I heard the &lt;a href="http://www.skasoftware.wordpress.com/"&gt;diswasher&lt;/a&gt; game took 2 years to make, that got me a little bummed about the prospect of slaving away for years making a game by myself.&lt;/p&gt;&lt;p&gt;The features in the game engine include:&lt;/p&gt;&lt;ul&gt;													&lt;li&gt;Game screen managment&lt;/li&gt;									&lt;li&gt;Sprite Animation engine and Spritesheet pipeline&lt;/li&gt;									&lt;li&gt;Particle Engine (Mercury)&lt;/li&gt;									&lt;li&gt;Farseer Physics&lt;/li&gt;									&lt;li&gt;Input with Recognition (combos and moves)&lt;/li&gt;									&lt;li&gt;Kick Ass 2D Camera&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;A lot of the features were adapted from XNA tutorials. So if you are interested then have a look. I called it Ifrit, but feel free to play around with the code and change whatever you like. If you end up making a game or engine derivitive let me know. I'd love to see a finished game.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;To get started look at the example project. There are several Xna game classes in the example project, just change the one that starts up to see the different features. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Thanks and Have Fun,&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Khalid &lt;/div&gt;&lt;p&gt;&lt;a href="http://www.monstersgotmy.net/file.axd?file=2009%2f5%2fIfrit.zip"&gt;Ifrit.zip (1.67 mb)&lt;/a&gt; (needs XNA 3.0 Studio)&lt;/p&gt;</description>
      <link>http://www.monstersgotmy.net/post/Ifrit-XNA-Game-Engine-By-Request.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Ifrit-XNA-Game-Engine-By-Request.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=fd5009cb-39be-4d64-b9e1-85846d59a7ae</guid>
      <pubDate>Fri, 08 May 2009 08:26:00 -0500</pubDate>
      <category>Code</category>
      <category>Code Review</category>
      <category>General</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=fd5009cb-39be-4d64-b9e1-85846d59a7ae</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=fd5009cb-39be-4d64-b9e1-85846d59a7ae</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Ifrit-XNA-Game-Engine-By-Request.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=fd5009cb-39be-4d64-b9e1-85846d59a7ae</wfw:commentRss>
    </item>
    <item>
      <title>XNA - Welcome To Newbie Territory</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f4%2fsilentHill.png" alt="Silent Hill" title="Silent Hill" hspace="10" vspace="10" align="left" /&gt;Business applications are great for generating large amounts of revenue for large corporations, but recently I am starting find them a little boring. I feel like most of the business problems I am faced with are not very challenging or simply rehashed problems that need rewritten. That is why I am venturing into the area which started my passion for development. Games! If you've read the last two post's you've seen me jump from WPF to Silverlight. I sat down to start a game in Silverlight but soon realized that I didn't fully understand the concepts behind game development in .NET. It's been a while since I wrote a game (college to be exact). XNA to the rescue.
&lt;/p&gt;
&lt;p&gt;
I started looking at XNA several months ago and was very impressed, but I wasn't at a point where I had time to invest in learning the framework. After a week of looking at what XNA has to offer I think I am ready to create a game, all be it not very graphically impressive. But if you want to get started with XNA there are several things you should look at in the XNA framework. Here they are.
&lt;/p&gt;
&lt;h3&gt;Game&lt;/h3&gt;
&lt;p&gt;
The Game class is your main entry point to your game. It has the methods needed for your game to function: Initialize, LoadContent, Update, and Draw. 
&lt;/p&gt;
&lt;h3&gt;GameComponent and DrawableGameComponent&lt;/h3&gt;
&lt;p&gt;
Think of these classes as plugins. You inherit from these classes and they give you the same methods as in your game class: Initialize, Update, and Draw(if DrawableGameComponent). You don't have to use these classes, but I recommend using them. Why? Well the Game class has a GameComponentCollection. Adding your component to this collection will automatically trigger calls to the components Update and Draw methods. This makes your Update and Draw in your Game class very clean and clean code is very important when writing games.
&lt;/p&gt;
&lt;h3&gt;
GameServiceContainer 
&lt;/h3&gt;
&lt;p&gt;
This is also a property on the Game class. Think of this as your IoC container for your game. You can drop services and resolve them with from the GameServiceContainer. This is helpful for those cross cutting concerns you want to share amongst your components. A word of warning though, this container will not inject types into your object like you are used to. This container is only used to pull the services. It also doesn't have any generics support, but if you are using .NET 3.5 I've written some extension methods that make using it a little cleaner.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
public static class GameServiceContainerExtensionMethods
{
public static T GetService&lt; T &gt;(this GameServiceContainer container)
{
return (T)container.GetService(typeof (T));
}
public static void RemoveService&lt; T &gt;(this GameServiceContainer container)
{
container.RemoveService(typeof (T));
}
public static void AddService&lt; T &gt;(this GameServiceContainer container, T service)
{
container.AddService(typeof(T), service);
}
}
&lt;/pre&gt;
&lt;h3&gt;
GamePadState,KeyboardState, and MouseState
&lt;/h3&gt;
&lt;p&gt;
These are the classes used to retrieve input from your players. Yes your game might have players and you have to be prepared to accept their input.
&lt;/p&gt;
&lt;h3&gt;SpriteBatch &lt;/h3&gt;
&lt;p&gt;
This class is used to draw your content to the screen (2D anyways).  
&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;
Their is definetly a lot of stuff to look at in the XNA framework but if you understand the classes I mentioned above then you should have a good start to create your game.  
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/XNA-Welcome-To-Newbie-Territory.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/XNA-Welcome-To-Newbie-Territory.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=96b63076-fe07-4330-bf97-94922b1314e1</guid>
      <pubDate>Sun, 05 Apr 2009 21:21:00 -0500</pubDate>
      <category>Code</category>
      <category>General</category>
      <category>Products</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=96b63076-fe07-4330-bf97-94922b1314e1</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=96b63076-fe07-4330-bf97-94922b1314e1</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/XNA-Welcome-To-Newbie-Territory.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=96b63076-fe07-4330-bf97-94922b1314e1</wfw:commentRss>
    </item>
    <item>
      <title>Silverlight = WPF?</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2fnearDark.png" alt="No Light at the end of this tunnel" title="No Light at the end of this tunnel" hspace="10" vspace="10" align="left" /&gt;So if you didn't notice my last three posts focused on WPF and Silverlight. I am really getting into this whole Rich Internet Application (RIA) thing that is happening in the .NET world. It's not to say RIA is better than your standard web applications, but it is something to keep my excitement for learning alive. So when I created my WPF application, it was a very organic learning process. What does that mean? 
&lt;/p&gt;
&lt;p&gt;
When I was creating IWuvYou everything I did fell into place relatively easy: Triggers, M-V-VM, ICommand, and your UI. It was quite easy; Silverlight hasn't been quite the same process. Where is Silverlight losing me and what is my fault and what could be better?
&lt;/p&gt;
&lt;p&gt;
I have to first say the Silverlight is not WPF. Let me repeat that; Silverlight is not WPF! I keep reading a lot of blogs and watching a lot of videos telling me to do certain things to make my WPF application to work in Silverlight and vice versa. I could do that, but what I've seen people do seems to compromise what WPF is trying to do and what Silverlight is trying to do.
&lt;/p&gt;
&lt;p&gt;
My first and biggest disappointment with Silverlight is ICommand is not supported in the controls, you have to write your own harnessing mechanism to rig it up. Now that is fine in your Silverlight application but porting your own ICommand harness to WPF breaks the number one rule of development: "Don't reinvent the wheel."
&lt;/p&gt;
&lt;p&gt;
Secondly, to make your WPF/Silverlight application you end up using a lot of conditional compilation symbols. 
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
#if SILVERLIGHT
// My Silverlight Code
#else
// My WPF Code
#endif
&lt;/pre&gt;
&lt;p&gt;
Now imagine that all over your WPF/Silverlight application. It can get ugly really fast. And this just opens up a can of worms when talking about unit testing. How do you unit test code that depends on compilation? (I'll leave you to answer that one).
&lt;/p&gt;
&lt;p&gt;
I don't want this to turn into a rant against WPF or Silverlight. These are two great technologies but I am starting to lose faith in the idea that you can maintain one code base and have it run on every concievable platform. That idea sounds great at first but when you think about it harder, you'll notice that you lose something on each platform that you decide to comprimise on. An application geared to the web ported to your PC loses the ability to be updated in one central location. The idea of a PC application ported to the web loses all the power that a PC application can afford you: file system access, hardware, and background processes.
&lt;/p&gt;
&lt;p&gt;
So what's the best approach to writing an application that works in both WPF and Silverlight? Well my approach would be to write your core code focusing on the Models and Controllers. For Silverlight, I would approach it with a Model-View-Presenter pattern. For WPF, follow the Model-View-ViewModel approach; it really is suited perfectly for WPF. Simply, write two different UI's for your application and abstract away any dependencies that might cause problems in either a PC or Web environment so they can be switched out easily with something like an IoC Container. 
&lt;/p&gt;
&lt;p&gt;
I am still new to both technology stacks but I'm leaning more to
favor WPF, but I am sure I will contradict myself in later posts. I will end this post by saying that I love WPF and Silverlight, but I think it's like loving Ice Cream and Ketchup; I love each in their own right and not together. I will also say that I may have drank the Kool-Aid too hard on the "Silverlight is WPF" idea that is being sold. 
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/Silverlight-Equal-WPF-QuestionMark.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Silverlight-Equal-WPF-QuestionMark.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=6940bd6e-68ac-4982-91c9-8d7b66ea5b2d</guid>
      <pubDate>Thu, 26 Mar 2009 21:39:00 -0500</pubDate>
      <category>General</category>
      <category>Rants</category>
      <category>Warnings</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=6940bd6e-68ac-4982-91c9-8d7b66ea5b2d</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=6940bd6e-68ac-4982-91c9-8d7b66ea5b2d</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Silverlight-Equal-WPF-QuestionMark.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=6940bd6e-68ac-4982-91c9-8d7b66ea5b2d</wfw:commentRss>
    </item>
    <item>
      <title>Blogengine.NET Extension : Silverlight Extension</title>
      <description>&lt;p&gt;
For anyone who wants to embed a Silverlight XAP application in their Blogengine.NET blog I have posted the extension below. Just drop this in your extensions directory and change the settings to meet your Silverlight needs. The extension will work on Blogengine.NET sites targeting both the 2.0 and 3.5 framework. This works for me right now, but could be modified slightly to accept values when setting up the tag.
&lt;/p&gt;
&lt;p&gt;
To use, place the following in your post : [ silverlight : blah.xap ]  (without the spaces).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note: Remember to allow your Host to serve up XAP files by registering the MIME type. If you don't do this, then you won't see your applications.&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.monstersgotmy.net/file.axd?file=2009%2f3%2fSilverlightApplicationExtension.zip"&gt;SilverlightApplicationExtension.zip (1.51 kb)&lt;/a&gt;
&lt;/p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2fsettings.jpg" alt="" /&gt;
</description>
      <link>http://www.monstersgotmy.net/post/BlogengineNET-Extension-Silverlight-Extension.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/BlogengineNET-Extension-Silverlight-Extension.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=91c00a38-1696-4dbe-9ec1-66879fad759b</guid>
      <pubDate>Wed, 25 Mar 2009 15:37:00 -0500</pubDate>
      <category>Code</category>
      <category>General</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=91c00a38-1696-4dbe-9ec1-66879fad759b</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=91c00a38-1696-4dbe-9ec1-66879fad759b</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/BlogengineNET-Extension-Silverlight-Extension.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=91c00a38-1696-4dbe-9ec1-66879fad759b</wfw:commentRss>
    </item>
    <item>
      <title>Silverlight and the VisualStateManager</title>
      <description>&lt;p&gt;
I'm all about WPF and Silverlight right now, it really is exciting to get to make something that is has visual merit and not just work merit. Yeah sure your webservice can serve up thousands or objects in less than a second, but can your objects dance? NO! I just downloaded Expression Blend 3 and Silverlight 3 Beta and started playing around. I have to say Expression Blend 3 is not much different but what is different makes the blend experience much much nicer; worth the definite upgrade. 
&lt;/p&gt;
&lt;p&gt;
Here it is then my first true Silverlight app, it does nothing other than cycle through states. This is what the code behind looks like for my Silverlight application. 
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
namespace Emoticons
{
public partial class Page : UserControl
{
string[] States = new string[] { "Normal", "Happy", "Sick", "In_Love", "Sad", "Cool" };
int currentStateIndex = -1;
public Page()
{
// Required to initialize variables
InitializeComponent();
}
private void LayoutRoot_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
Button_Click(this, null as RoutedEventArgs);
}
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
currentStateIndex++;
if (currentStateIndex &gt; States.Length - 1)
currentStateIndex = 0;
VisualStateManager.GoToState(this, States[currentStateIndex],true);
Mood.Text = States[currentStateIndex].Replace("_"," ");
}
}
}
&lt;/pre&gt;
&lt;p&gt;
Here is my application, &lt;strike&gt;(sorta I couldn't find a blogengine extension for silverlight that actually worked. I guess I'll have write one :P&lt;/strike&gt;).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update: It is now working, I wrote the extension and now can serve up silverlight apps in Blogengine.net, pretty cool. &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://silverlight.net/getstarted/silverlight3/default.aspx" title="Silverlight 3 beta runtime"&gt;Download the Silverlight 3 runtime&lt;/a&gt; 
&lt;/p&gt;
[silverlight:Emoticons2.xap]&lt;br /&gt;
&lt;br /&gt;
Download the project to see it run. You will need Expression Blend 3 and Silverlight 3 to make it run. Now I am off to New Orleans for a long deserved vacation.
&lt;p&gt;
&lt;a href="http://www.monstersgotmy.net/file.axd?file=2009%2f3%2fEmoticons.zip"&gt;Emoticons.zip (28.09 kb)&lt;/a&gt;
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/Silverlight-and-the-VisualStateManager.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Silverlight-and-the-VisualStateManager.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=6e943c22-4220-49c6-b16b-eeb316d97ec6</guid>
      <pubDate>Sat, 21 Mar 2009 07:54:00 -0500</pubDate>
      <category>Code</category>
      <category>Code Review</category>
      <category>General</category>
      <category>Products</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=6e943c22-4220-49c6-b16b-eeb316d97ec6</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=6e943c22-4220-49c6-b16b-eeb316d97ec6</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Silverlight-and-the-VisualStateManager.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=6e943c22-4220-49c6-b16b-eeb316d97ec6</wfw:commentRss>
    </item>
    <item>
      <title>WPF Application - IWuvYou</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2fonemissedcall.png" alt="One Missed Call" title="One Missed Call" hspace="10" vspace="10" width="122" height="183" align="left" /&gt;My girlfriend was telling me that I don't text her nearly enough through out the day. Being a developer, I immediately realized that the act of texting was a completely repetitive task. What else is development for than to solve repititive tasks and make your life easier. So I decided to write a little application that would text her through out the day with little messages to let her know that I still care. This seemed pretty simple and I wrote an initial winform version in no time, but it lacked the humor and character that an app with this intention needs. I realized that WPF would be perfect for this but I had only dabbled with it before. I set off searching for references and there is definetly enough on the internet and especially a good amount on DotNetKicks. Once I felt confident, I ended up with the following. 
&lt;/p&gt;
&lt;p&gt;
I want to give credit to &lt;a href="http://commons.wikimedia.org/wiki/Crystal_Clear"&gt;Everaldo Choelho for the crystal icons&lt;/a&gt;. And I also want to give credit to Clarice Gomes for the &lt;a href="http://www.vecteezy.com/vf/842-HeartVectors"&gt;HeartVectors&lt;/a&gt; off of &lt;a href="http://www.vecteezy.com/"&gt;Vecteezy&lt;/a&gt;. There was also code used from James-Newton King found on&lt;a href="http://haacked.com/archive/0001/01/01/fun-with-named-formats-string-parsing-and-edge-cases.aspx" title="named formats"&gt; Haacked.com &lt;/a&gt;and &lt;a href="http://www.drwpf.com/blog/" title="Dr. WPF"&gt;Dr. WPF&lt;/a&gt;. The online community is great!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The application was a joke and my girlfriend found it funny :P&lt;/strong&gt; 
&lt;/p&gt;
&lt;h3&gt;The Application&lt;/h3&gt;
&lt;p&gt;
&lt;img style="width: 227px; height: 147px" src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2fnotification.png" alt="IWuvYou" title="IWuvYou" hspace="10" vspace="10" width="227" height="147" align="left" /&gt;These screenshots don't really do the application much justice, I've used the animation aspects of WPF to animate some of the windows and made several of the hearts glow. It's visual candy and WPF is 100% the reason for my rotting teeth. Just kidding, my teeth are fine but you get my point. Download the application and give it a try, if you run into any issues please let me know. I have only tested it with AT&amp;T since that is what I and my girlfriend have.  When you start the application set up your love profile which you can see below. IWuvYou uses email to text message gateways setup by the phone companies, which is not the best solution but works. If you don't have a girlfriend then just set yourself as the love interest (freaky). 
&lt;/p&gt;
&lt;p&gt;
&lt;img style="width: 277px; height: 508px" src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2fiWuvYou.png" alt="iWuvYou" title="iWuvYou" hspace="10" vspace="10" width="277" height="508" /&gt;  &lt;img style="width: 303px; height: 505px" src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2floveProfile.png" alt="" width="303" height="505" /&gt;  
&lt;/p&gt;
&lt;h3&gt;Thoughts About WPF&lt;/h3&gt;
&lt;p&gt;
WPF is completely awesome, I was a little hesitant at first because I am a web development kind of guy: WCF, ASP.NET, JQuery, and etc. I thought to myself, how could WPF really be any different than Winforms? It is completely different, you are entering a world where you are no longer constrained by your ideas of what an interface is. If a designer can mock it up, you can take that mock up and bring it to life without any compromise. You have to approach WPF development differently than WinForm development. If you try to use WinForm ideas in WPF you will not be happy with the outcome. I used the Model-View-ViewModel pattern and it made things very easy. If I had more design cred and capabilities then this app could be even more visually dazzling, with exploding hearts, crazy sound effects, and fluid animations (not that cramming all that in one application makes it a good application). 
&lt;/p&gt;
&lt;p&gt;
Now the negative. WPF is good and frustrating for the same reason. You can make anything look the way you want it to, but if you want a different look then you have to make it look the way you want it to. There aren't a lot of WPF themes out there. But using someone else's theme doesn't make your application unique so I understand why Microsoft excluded that from Expression Blend and WPF. Xaml can also be daunting if you haven't had time to become accustomed to it; relax and breath and it will get better over time. Other than those two things, I haven't found other things that frustrated me enough to give up on WPF. 
&lt;/p&gt;
&lt;p&gt;
The code written for this application works, but that doesn't mean that it doesn't need a lot of refactoring. I attempted to use Unity and IoC but since I didn't fully understand the WPF development domain, the implementation of IoC kind of broke down a little on me. I also was using TDD to create the services and repositories, but once I got to the UI that process broke down. I felt that learning what I was doing this first time was daunting enough. This doesn't mean I have abandoned TDD for WPF because it is definetly applicable, and as this application get more refined tests will be added in. So note, this application works, but it probably has bugs and needs refinement. 
&lt;/p&gt;
&lt;p&gt;
Use WPF and leverage it's power to give your apps that extra pop! 
&lt;/p&gt;
&lt;h3&gt;Download&lt;/h3&gt;
&lt;p&gt;
&lt;a href="http://www.monstersgotmy.net/file.axd?file=2009%2f3%2fIWuvYou.zip"&gt;IWuvYou.zip (893.66 kb)&lt;/a&gt; (no source included) 
&lt;/p&gt;
&lt;h3&gt;Afterthought&lt;/h3&gt;
&lt;p&gt;
I am planning to port this code over to Windows Mobile 6.5 and running it on a cellphone; accessing the SMS stack found on the device instead of the email to SMS gateway. 
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/WPF-Application-IWuvYou.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/WPF-Application-IWuvYou.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=9ded333b-392c-4c15-9487-2cb14ffde512</guid>
      <pubDate>Tue, 17 Mar 2009 20:15:00 -0500</pubDate>
      <category>Code</category>
      <category>General</category>
      <category>Joke</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=9ded333b-392c-4c15-9487-2cb14ffde512</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=9ded333b-392c-4c15-9487-2cb14ffde512</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/WPF-Application-IWuvYou.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=9ded333b-392c-4c15-9487-2cb14ffde512</wfw:commentRss>
    </item>
    <item>
      <title>Epiphany - Interfaces Are Better</title>
      <description>&lt;p&gt;
I was reading the &lt;a href="http://apparchguide.codeplex.com/" title="Architecture Guide"&gt;Microsoft Application Architecture Guide&lt;/a&gt; and I came across this quote on page 58. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;"Prefer composition over inheritance&lt;/strong&gt;. Wherever possible, use composition over inheritance&lt;br /&gt;
when reusing functionality because inheritance increases the dependency between parent&lt;br /&gt;
and child classes, thereby limiting the reuse of child classes." - Microsoft Application Architecture Guide 
&lt;/p&gt;
&lt;p&gt;
It then hit me why I prefer interfaces over deep levels of inheritance. Inheritence is good but when used wrong can put you in strange situations. "What do you mean this Cat object is also a Car?" Composition Oriented Programming are the strengths of patterns like MVP, MVC, and MVVM. It allows you to use atomic chunks of code without building layers of deep inheritence. It's better to be shallow than to be deep, no matter what Dr. Phil tells you. 
&lt;/p&gt;
&lt;p&gt;
"First you get the Interfaces, then you get the Power, then you get the Women." 
&lt;/p&gt;
&lt;p&gt;
I just thought I would share my epiphany with you, and long live the Interface. 
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/Epiphany-Interfaces-Are-Better.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Epiphany-Interfaces-Are-Better.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=e8906845-d496-40cc-b7eb-32801364c8ae</guid>
      <pubDate>Thu, 12 Mar 2009 11:36:00 -0500</pubDate>
      <category>General</category>
      <category>Rants</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=e8906845-d496-40cc-b7eb-32801364c8ae</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=e8906845-d496-40cc-b7eb-32801364c8ae</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Epiphany-Interfaces-Are-Better.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=e8906845-d496-40cc-b7eb-32801364c8ae</wfw:commentRss>
    </item>
    <item>
      <title>Getting Started With SQLite</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f3%2ftrapped.jpg" alt="Feel Trapped By Your Database Choices?" title="Feel Trapped By Your Database Choices?" hspace="10" vspace="10" width="188" height="188" align="left" /&gt;
&lt;/p&gt;
&lt;p&gt;
So you are writing an application that needs a database but don't want to use one of the three major databases: MySQL, Oracle, and SQL Server. There are a lot of reasons why you wouldn't want to use the formentioned databases. The first reason could be you have a hosting plan that gives you an alotted number of databases and they are all used up for your other projects. You might be building a WPF/ WinForm application and don't want a database engine installed on your user's machine. Lastly, an entire database just might be overkill for what you need to save. That is where a good compact database comes in; there are a few good ones out there but this post will help you get started using SQLite. 
&lt;/p&gt;
&lt;p&gt;
If you are interested in other compact databases check out : &lt;a href="http://www.vistadb.net/" target="_blank" title="VistaDB"&gt;VistaDB&lt;/a&gt; and &lt;a href="http://www.db4o.com/" target="_blank" title="DB4Objects"&gt;DB4Objects.&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;The Install &lt;/h3&gt;
&lt;p&gt;
First you will need to download and run the &lt;a href="http://sqlite.phxsoftware.com/" target="_blank" title="SQLite download"&gt;System.Data.SQLite installer&lt;/a&gt;. This is an open source ADO.NET provider for SQLite. The install package has the necessary assemblies and Visual Studio plugins to allow you to add a server connection to a SQLite database. Run the installer and follow the wizard.
&lt;/p&gt;
&lt;h3&gt;Tools&lt;/h3&gt;
&lt;p&gt;
The tool that comes with Visual Studio Integration is nice, but sometimes I don't want to fire up Visual Studio to inspect my SQLite database. I use &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/5817" target="_blank" title="SQLite Manager"&gt;SQLite Manager &lt;/a&gt;as my external managment tool. It is a Firefox plugin that works very nicely and has all the commands necessary to create, update, and manage your SQLite instance.
&lt;/p&gt;
&lt;h3&gt;Code &lt;/h3&gt;
&lt;p&gt;
Time to write some code to access your newly created database. You should have used Visual Studio or SQLite Manager to create a database with a schema. SQLite does not support stored procedures so you are limited to LINQ or writing SQL within code. It kind of smells to have SQL in code, but if you seperate your concerns (three tier architecture) you should be able to contain the smell. 
&lt;/p&gt;
&lt;p&gt;
My repository takes a SQLiteConnection. A SQLiteConnection points directly to your file. To Initialize your connection it looks like this.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
var connectionString = "Data Source=MyFile.sqlite;Version=3;";
var connection = new SQLiteConnection(connectionString);
public SQLiteRepository(SQLiteConnection connection)
{
_connection = connection;
}
&lt;/pre&gt;
&lt;p&gt;
Now how about executing some sql against the database? Well let's see how it's done but you won't be suprised much, it looks like regular ADO.NET. The variable SqlSelectAll is a regular Select query written in SQL syntax.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
public IQueryable&lt; Message &gt; GetAll()
{
var messages = new List();
try
{
_connection.Open();
var command = new SQLiteCommand(SqlSelectAll, _connection);
using (SQLiteDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
var message = new Message();
message.Id = (long) reader["Id"];
message.Subject = (string) reader["Subject"];
message.Text = (string) reader["Text"];
messages.Add(message);
}
}
}
finally
{
_connection.Close();
}
return messages.AsQueryable();
}
&lt;/pre&gt;
&lt;p&gt;
The one gotcha is that you must remember to Open the connection or else your attempt to retrieve data will fail miserably.
&lt;/p&gt;
&lt;p&gt;
How about a parameterized query execution sample? Well I got one for that as well. Again the SqlDelete variable is just a simple delete in SQL syntax.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
public void Remove(Message message)
{
try
{
_connection.Open();
var command = new SQLiteCommand(SqlDelete, _connection);
command.Parameters.Add("@Id", DbType.Int32).Value = message.Id;
command.ExecuteNonQuery();
}
finally
{
_connection.Close();
}
}
&lt;/pre&gt;
&lt;h3&gt;Conclusion &lt;/h3&gt;
&lt;p&gt;
Compact databases are just the right tool in a lot of instances, especially when building windows based applications but that doesn't mean they aren't also great for the web. Look at your data saving needs and you'll probably realize you could probably go with SQLite very easily. 
&lt;/p&gt;
&lt;h3&gt;Update - March 10th 2009&lt;br /&gt;
&lt;/h3&gt;
&lt;p&gt;
If you are developing for a x64 based system don't forget to use the proper assemblies when deploying your projects. The current SQLite libraries are compiled for x86 systems and will not work in a x64 system. Read more about it at the &lt;a href="http://sqlite.phxsoftware.com/forums/t/1577.aspx"&gt;SQLite ADO.NET Forums&lt;/a&gt; . 
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/Getting-Started-With-SQLite.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Getting-Started-With-SQLite.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=317f3eb6-3ed3-4954-9be9-e7341e598e06</guid>
      <pubDate>Mon, 09 Mar 2009 08:52:00 -0500</pubDate>
      <category>Code</category>
      <category>General</category>
      <category>Products</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=317f3eb6-3ed3-4954-9be9-e7341e598e06</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=317f3eb6-3ed3-4954-9be9-e7341e598e06</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Getting-Started-With-SQLite.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=317f3eb6-3ed3-4954-9be9-e7341e598e06</wfw:commentRss>
    </item>
    <item>
      <title>.NET 3.5 Bug or Boneheaded</title>
      <description>&lt;p&gt;
I recently had to transfer a certain set of objects from one list to another list, sounds easy right? I have a little teaser for you. Look at the following code and tell me what you think the output should be. This code does compile and runs so it is not a trick question.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
var persons = new List&lt; Person &gt;()
{
new Person { Id = 1, Job = JobType.Janitor},
new Person { Id = 2, Job = JobType.Janitor},
new Person { Id = 3, Job = JobType.Developer},
new Person { Id = 4, Job = JobType.Developer},
new Person { Id = 5, Job = JobType.Manager},
new Person { Id = 6, Job = JobType.Manager}
};
var janitors = new List&lt; Person &gt;();
persons.ForEach(p =&gt; {
if (p.Job != JobType.Janitor) return;
persons.Remove(p);
janitors.Add(p);
}
);
Console.WriteLine(janitors.Count);
Console.ReadLine();
&lt;/pre&gt;
&lt;p&gt;
See any problems? Well I didn't at first, it looks like something that would work; instead it gives you a false sense of security. If you don't see it yet then let me write it another way.
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
foreach (var p in persons)
{
if (p.Job != JobType.Janitor) continue;
persons.Remove(p);
janitors.Add(p);
}
&lt;/pre&gt;
&lt;p&gt;
See it now, I am modifying the structure which I am enumerating. Not a good thing to do. The good old foreach structure throws a nice InvalidOperationException as you can see below. Right below that is the use of the ForEach extension method with a lambda expression. Notice I get a result back and no exception. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2finvalidoperationexception.png" alt="" /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2fnoInvalidOperationException.png" alt="" /&gt;
&lt;/p&gt;
&lt;p&gt;
What's happening? Well it's what you probably think is happening. In this example I remove the first instance of the Janitor, so all objects shift down one. Next time through we skip what used to be second in line and go to the third. That is why I only get one item in my list; I should have two Janitors in my list which you can clearly see in the code above. The question is, does this constitute a bug in the extension method? My assumption was that the functionality of the ForEach method was identical to the foreach structure but it clearly isn't. What do you think?
&lt;/p&gt;
&lt;p&gt;
Note: Don't modify a data structure that you are enumerating, I had a complete brain fart.  If you need a solution use the following structure it is better and garaunteed to work better. (It's All Andrew)
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
for (int i = persons.Count - 1; i &gt;= 0; i--)
{
var p = persons[i];
if (p.Job != JobType.Janitor) continue;
persons.Remove(p);
janitors.Insert(0,p);
}
&lt;/pre&gt;
&lt;p&gt;
Learn from my mistakes! 
&lt;img src="/editors/tiny_mce/plugins/emotions/images/smiley-yell.gif" border="0" alt="Yell" title="Yell" /&gt;
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/NET-35-Bug-or-Boneheaded.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/NET-35-Bug-or-Boneheaded.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=fe29af6b-90db-4e67-9331-c07ec3b9f04b</guid>
      <pubDate>Wed, 18 Feb 2009 21:20:00 -0500</pubDate>
      <category>Code</category>
      <category>Code Review</category>
      <category>Warnings</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=fe29af6b-90db-4e67-9331-c07ec3b9f04b</pingback:target>
      <slash:comments>8</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=fe29af6b-90db-4e67-9331-c07ec3b9f04b</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/NET-35-Bug-or-Boneheaded.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=fe29af6b-90db-4e67-9331-c07ec3b9f04b</wfw:commentRss>
    </item>
    <item>
      <title>Run Async Tasks With Fluent Interface</title>
      <description>Today I read an article titled "&lt;a href="http://marcgravell.blogspot.com/2009/02/async-without-pain.html" title="Async Without the Pain"&gt;async without the pain&lt;/a&gt;" and I liked what I saw. It was simple and written in a clear and concise way. Down in the comments I saw the author mention that he could do it using a fluent interface but chose not to. So because he chose not to, I decided to do it for him (I thought it would be fun). Here it is.
&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2fcode.JPG" alt="" width="660" height="641" /&gt;
&lt;/p&gt;
&lt;p&gt;
Download Source Here
&lt;a href="http://www.monstersgotmy.net/file.axd?file=2009%2f2%2fRunAsync.cs"&gt;RunAsync.cs (1.74 kb)&lt;/a&gt;
&lt;/p&gt;
There you have it, it's not very complex and calling it looks something like this. I thought it would be fun to write a fluent interface, and the initial code was very good to begin with. Hope this helps. 
&lt;pre class="csharp" name="code"&gt;
new RunAsync&lt;WebResponse&gt;().BeginIs(req.BeginGetResponse)
.EndIs( req.EndGetResponse)
.CallbackIs( ProcessResponse)
.Run();
&lt;/pre&gt;
Side Note: Anybody using SyntaxHighlighter know of a way to stop it from messing up generics, Every time I try to use generics it always ends up thinking it's a tag. Not cool SyntaxHighlighter, not cool. That's why I had to use a picture &lt;img src="/editors/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif" border="0" alt="Tongue out" title="Tongue out" /&gt;
</description>
      <link>http://www.monstersgotmy.net/post/Run-Async-Tasks-With-Fluent-Interface.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Run-Async-Tasks-With-Fluent-Interface.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=a35bf295-3bf8-4c5c-9945-47d9315a92c3</guid>
      <pubDate>Fri, 13 Feb 2009 10:35:00 -0500</pubDate>
      <category>Code</category>
      <category>Code Review</category>
      <category>General</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=a35bf295-3bf8-4c5c-9945-47d9315a92c3</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=a35bf295-3bf8-4c5c-9945-47d9315a92c3</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Run-Async-Tasks-With-Fluent-Interface.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=a35bf295-3bf8-4c5c-9945-47d9315a92c3</wfw:commentRss>
    </item>
    <item>
      <title>What's Worse Than Zombies? Dead Pixels!!!</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2fzombie.jpg" alt="Zombie!" title="Zombie!" hspace="10" vspace="10" align="left" /&gt;&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2flg70.jpg" alt="42LG70" title="42LG70" hspace="10" vspace="10" width="170" height="170" align="right" /&gt;Last week I finally decided to take the leap to HD television. I know, I'm a little late to the party, but better late than never. I headed over to Best Buy and decided to get the 42 inch LG70. A very nice TV: 4 HDMI inputs, 120Hz refresh rate, 42 inches of HD heaven. Since this is the season of the Super Bowl, they said they could deliver it a week from now (which was yesterday in real time). So yesterday the delivery people showed up, very curtious and very professional. Jason, the delivery guy, told me to let it warm up before turning it on. I thanked him and then I was left with a TV I couldn't watch just yet. I decided I needed an HDMI cable for my Xbo360.
&lt;/p&gt;
&lt;p&gt;
I went out and searched at KMart, Walmart, and Circuit City. No luck, all they had was overly expensive HDMI cables. Who would pay $40 for a cable? I didn't really need it anyways I already had component on my Xbox360. At the point I got back to my home, It had been 3 hours since my TV was delivered. So I plugged it in and turned it on. What I saw next was horrifying. A 3/4 inch thick column of dead pixels right down the center. What the F@$K! Needless to say Best Buy is replacing it, but not for another week. Now I am left with a less than HDTV sitting in my living room. As much as I try to look past the dead pixels I can't. It ruins any experience, it's right down the center. The bright side is that I can still play Left 4 Dead in Co-op just fine because the row of pixels is right on the split screen line. Despite the line down the center, all the Xbox360 games look amazing in HD. 
&lt;/p&gt;
&lt;p&gt;
Is there a point to this post, no not really, I just wanted to rant because I have a $1400 visual eyesore. 
&lt;/p&gt;
&lt;div style="text-align: center"&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f2%2fxboxLiveOnMyTV.jpg" alt="My TV with the Dead Pixels! WHY!" title="My TV with the Dead Pixels! WHY!" /&gt;
&lt;/div&gt;
  
</description>
      <link>http://www.monstersgotmy.net/post/Whats-Worse-Than-Zombies-Dead-Pixels!!!.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/Whats-Worse-Than-Zombies-Dead-Pixels!!!.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=ca7994b7-f71e-4bc0-9774-0f8985508e36</guid>
      <pubDate>Sun, 01 Feb 2009 08:39:00 -0500</pubDate>
      <category>General</category>
      <category>Products</category>
      <category>Rants</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=ca7994b7-f71e-4bc0-9774-0f8985508e36</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=ca7994b7-f71e-4bc0-9774-0f8985508e36</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/Whats-Worse-Than-Zombies-Dead-Pixels!!!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=ca7994b7-f71e-4bc0-9774-0f8985508e36</wfw:commentRss>
    </item>
    <item>
      <title>WCF - Hellish Configuration</title>
      <description>&lt;p&gt;
&lt;img src="http://www.monstersgotmy.net/image.axd?picture=2009%2f1%2f58061vb.png" alt="Hellraiser Puzzlebox" title="Hellraiser Puzzlebox" hspace="10" vspace="10" width="181" height="181" align="left" /&gt;I love WCF, I think it is the most useful thing that came with the .NET 3.0 framework. On the other hand, I do not love the the nightmarish configuration process. Configuring a WCF service might be harder than solving that puzzlebox from the Hellraiser movies and probably just as painful. 
&lt;/p&gt;
&lt;p&gt;
The WCF configuration tool only makes it slightly easier to configure. It is a gui representation of the XML that is the WCF configuration. Greeeeaat, a gui tool for something I don't understand... that will make it easier (sarcasm). There really isn't as much guidance as I'd like in the tool itself. 
&lt;/p&gt;
&lt;p&gt;
The configuration process is a hard one and I can feel my head throbbing from all the information being absorbed about certificates, identities, and transport vs. message security. The configuration process of a WCF service seems to be the biggest complaint of other developers, I know it's slowed down a couple of projects I was involved in. If you are in the same boat of trying to figure out the best way to secure your WCF service then I have a site for you.
&lt;/p&gt;
&lt;p&gt;
Those Patterns and Practices guys have a very cool site on CodePlex. The guide was released in &lt;span&gt;08/01/08, but still good.&lt;br /&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codeplex.com/WCFSecurity" title="http://www.codeplex.com/WCFSecurity"&gt;http://www.codeplex.com/WCFSecurity&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It has amazing walkthroughs on how to setup authentication, authorization, and security for your WCF services. Videos are included on the site as well. So until WCF configuration becomes easier in .NET 4.0 you can muddle your way through with a little help from the P&amp;P guys.
&lt;/p&gt;
&lt;p&gt;
Hope this helps, and be careful not to open up any gateways to hell while trying to configure your service. :P 
&lt;/p&gt;
</description>
      <link>http://www.monstersgotmy.net/post/WCF-Hellish-Configuration.aspx</link>
      <author>contact.nospam@nospam.monstersgotmy.net (birdchest)</author>
      <comments>http://www.monstersgotmy.net/post/WCF-Hellish-Configuration.aspx#comment</comments>
      <guid>http://www.monstersgotmy.net/post.aspx?id=af1e916c-a03a-4051-8bda-5fcca3806047</guid>
      <pubDate>Tue, 27 Jan 2009 14:12:00 -0500</pubDate>
      <category>General</category>
      <category>Rants</category>
      <dc:publisher>birdchest</dc:publisher>
      <pingback:server>http://www.monstersgotmy.net/pingback.axd</pingback:server>
      <pingback:target>http://www.monstersgotmy.net/post.aspx?id=af1e916c-a03a-4051-8bda-5fcca3806047</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.monstersgotmy.net/trackback.axd?id=af1e916c-a03a-4051-8bda-5fcca3806047</trackback:ping>
      <wfw:comment>http://www.monstersgotmy.net/post/WCF-Hellish-Configuration.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.monstersgotmy.net/syndication.axd?post=af1e916c-a03a-4051-8bda-5fcca3806047</wfw:commentRss>
    </item>
  </channel>
</rss>
