<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" 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:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Entries tagged with Fun</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Tags/fun/RSS"></atom:link>
    <itunes:summary></itunes:summary>
    <itunes:author>Microsoft</itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <image>
      <url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
      <title>Channel 9 - Entries tagged with Fun</title>
      <link>http://channel9.msdn.com/Tags/fun</link>
    </image>
    <itunes:image href=""></itunes:image>
    <itunes:category text="Technology"></itunes:category>
    <description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
    <link>http://channel9.msdn.com/Tags/fun</link>
    <language>en</language>
    <pubDate>Wed, 22 May 2013 06:20:11 GMT</pubDate>
    <lastBuildDate>Wed, 22 May 2013 06:20:11 GMT</lastBuildDate>
    <generator>Rev9</generator>
    <c9:totalResults>11</c9:totalResults>
    <c9:pageCount>1</c9:pageCount>
    <c9:pageSize>25</c9:pageSize>
  <item>
      <title>Visual Studio 2010 - explained differently this time //  Visual Studio 2010 mal anders erkl&#228;rt</title>
      <description><![CDATA[ <p><strong>Visual Studio 2010 - explained differently this time</strong></p><p>Finally I was able to convince my dear colleague <strong><a href="http://www.microsoft.com/germany/msdn/pingme/UweBaumann/">Uwe </a></strong>to hand over his VS2010 viral video. Personally I like it a lot and am super-jealous of that table. Wouldn't fit into my office though.&nbsp;Audio in German, but with English subtitles.</p><p>Enjoy and let us know if/how you like it.&nbsp;&nbsp; Cheers,&nbsp; Achim</p><p>&nbsp;</p><p><strong>Visual Studio 2010 mal anders erklärt</strong></p><p>Endlich konnte ich meinen Kollegen <strong><a href="http://www.microsoft.com/germany/msdn/pingme/UweBaumann/">Uwe </a></strong>überzeugen mir sein VS2010 Video zu überlassen. Den Tisch hätte ich auch gerne, allerdings ist mein Büro dafür wohl zu klein.</p><p>Lasst uns wissen ob es Euch gefällt.&nbsp;&nbsp; Gruß, Achim</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:89b364a63d2a4f26a39d9e2f00d5e40f">]]></description>
      <comments>http://channel9.msdn.com/Blogs/Achim/Visual-Studio-2010-explained-differently-this-time--Visual-Studio-2010-mal-anders-erklrt</comments>
      <itunes:summary> Visual Studio 2010 - explained differently this time Finally I was able to convince my dear colleague Uwe to hand over his VS2010 viral video. Personally I like it a lot and am super-jealous of that table. Wouldn&#39;t fit into my office though.&amp;nbsp;Audio in German, but with English subtitles. Enjoy and let us know if/how you like it.&amp;nbsp;&amp;nbsp; Cheers,&amp;nbsp; Achim &amp;nbsp; Visual Studio 2010 mal anders erkl&#228;rt Endlich konnte ich meinen Kollegen Uwe &#252;berzeugen mir sein VS2010 Video zu &#252;berlassen. Den Tisch h&#228;tte ich auch gerne, allerdings ist mein B&#252;ro daf&#252;r wohl zu klein. Lasst uns wissen ob es Euch gef&#228;llt.&amp;nbsp;&amp;nbsp; Gru&#223;, Achim </itunes:summary>
      <itunes:duration>92</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/Achim/Visual-Studio-2010-explained-differently-this-time--Visual-Studio-2010-mal-anders-erklrt</link>
      <pubDate>Mon, 15 Nov 2010 13:10:01 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/Achim/Visual-Studio-2010-explained-differently-this-time--Visual-Studio-2010-mal-anders-erklrt</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_320_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_85_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_2MB_ch9.wmv" expression="full" duration="92" fileSize="15805766" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_ch9.mp3" expression="full" duration="92" fileSize="738146" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_ch9.mp4" expression="full" duration="92" fileSize="9206268" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_ch9.wma" expression="full" duration="92" fileSize="752973" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_ch9.wmv" expression="full" duration="92" fileSize="13557983" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_Zune_ch9.wmv" expression="full" duration="92" fileSize="10854038" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/e40f/89b364a6-3d2a-4f26-a39d-9e2f00d5e40f/vs2010viral_ch9.wmv" length="13557983" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Achim Dettweiler</dc:creator>
      <itunes:author>Achim Dettweiler</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/Achim/Visual-Studio-2010-explained-differently-this-time--Visual-Studio-2010-mal-anders-erklrt/RSS</wfw:commentRss>
      <category>de-de</category>
      <category>Fun</category>
      <category>intellitrace</category>
      <category>Multi-Monitor</category>
      <category>viral</category>
      <category>Visual Studio 2010</category>
      <category>vs2010</category>
      <category>Windows Phone 7</category>
      <category>WP7</category>
    </item>
  <item>
      <title>Mickey Mouse pattern by Ward Bell : At the p&amp;p summit</title>
      <description><![CDATA[You have heard of and probably used&nbsp;patterns in your projects. But have you heard of the &quot;Mickey Mouse&quot; pattern. In this short video,
<a href="http://pnpsummit.com/west2009/west2009presenters.aspx#wardb" title="Ward's bio">
Ward Bell</a>, gives you a quick overview of this unheard of pattern.<br /><br />Ward delivered a great&nbsp;session at the last summit and is coming back to present at this year's
<a href="http://tinyurl.com/pnpsummit">p&amp;p summit</a>.<br /><br />For more information on p&amp;p summit and to register, check out <a href="http://tinyurl.com/pnpsummit">
http://tinyurl.com/pnpsummit</a>. To become a fan of p&amp;p summit in Facebook, click
<a href="http://www.facebook.com/pages/Microsoft-patterns-practices-Summit/#/pages/Microsoft-patterns-practices-Summit/79454152413?ref=ts" title="FB p&amp;p summit page">
here</a>. <br /><br />Happy Watching!  <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:67d4eb43266f4de1910c9df800427141">]]></description>
      <comments>http://channel9.msdn.com/Blogs/akMSFT/Mickey-Mouse-pattern-by-Ward-Bell--At-the-pp-summit</comments>
      <itunes:summary>You have heard of and probably used&amp;nbsp;patterns in your projects. But have you heard of the &amp;quot;Mickey Mouse&amp;quot; pattern. In this short video,

Ward Bell, gives you a quick overview of this unheard of pattern.Ward delivered a great&amp;nbsp;session at the last summit and is coming back to present at this year&#39;s
p&amp;amp;p summit.For more information on p&amp;amp;p summit and to register, check out 
http://tinyurl.com/pnpsummit. To become a fan of p&amp;amp;p summit in Facebook, click

here. Happy Watching! </itunes:summary>
      <itunes:duration>55</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/akMSFT/Mickey-Mouse-pattern-by-Ward-Bell--At-the-pp-summit</link>
      <pubDate>Tue, 07 Jul 2009 18:58:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/akMSFT/Mickey-Mouse-pattern-by-Ward-Bell--At-the-pp-summit</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/477279_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/477279_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_large_ch9.png" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_small_ch9.png" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_2MB_ch9.wmv" expression="full" duration="55" fileSize="21686381" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_ch9.mp3" expression="full" duration="55" fileSize="445514" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_ch9.mp4" expression="full" duration="55" fileSize="5422546" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_ch9.wma" expression="full" duration="55" fileSize="918205" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_ch9.wmv" expression="full" duration="55" fileSize="7861773" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_Zune_ch9.wmv" expression="full" duration="55" fileSize="7829753" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_s_ch9.wmv" expression="full" duration="55" fileSize="217" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/7/2/7/7/4/PnPSummitWardPromo_ch9.wmv" length="7861773" type="video/x-ms-wmv"></enclosure>
      <dc:creator>ajoy krishnamoorthy</dc:creator>
      <itunes:author>ajoy krishnamoorthy</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/akMSFT/Mickey-Mouse-pattern-by-Ward-Bell--At-the-pp-summit/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>P&amp;P</category>
      <category>p&amp;p summit</category>
      <category>Patterns</category>
      <category>Patterns and Practices</category>
      <category>promo</category>
    </item>
  <item>
      <title>Skype Voice Changer</title>
      <description><![CDATA[ <p>The <a href="http://www.codeplex.com/skypefx">Skype Voice Changer</a> is a new <a href="http://blogs.msdn.com/coding4fun">Coding4Fun</a> application written by <a href="http://mark-dot-net.blogspot.com/">Mark Heath</a>. With this software, you can change your how your voice sounds in a Skype conversation. For the silly voice effects, Mark recommends the pitch shifting setting called “SuperPitch” which lets you shift the pitch of your voice either up or down five semitones. Other effects like FlangeBaby or Chorus can be used for more subtle changes.</p><p>Once installed, changing your voice can be done on the fly by clicking on the plus button that appears at the top of your Skype window. Once you’ve done that, a pop-up appears where you can select from the available effects. The “delay” effect is especially annoying as you can see here <a href="http://channel9.msdn.com/posts/Dan/Coding4Fun-Demo-How-to-mask-your-voice-using-the-Skype-Voice-Changer/">in this video demo</a>. The app comes with several effect built in, but you can also add your own. </p><p>For details on how Mark used Skype’s audio APIs to code the app, check out <a href="http://blogs.msdn.com/coding4fun/archive/2009/02/02/9391048.aspx">this blog post</a>.&nbsp; To download either the source code or application or both, just visit <a href="http://www.codeplex.com/skypefx">Codeplex</a>. </p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:397d22a744b7411fab909e0e00ef432e">]]></description>
      <comments>http://channel9.msdn.com/Blogs/coolstuff/Skype-Voice-Changer</comments>
      <itunes:summary> The Skype Voice Changer is a new Coding4Fun application written by Mark Heath. With this software, you can change your how your voice sounds in a Skype conversation. For the silly voice effects, Mark recommends the pitch shifting setting called “SuperPitch” which lets you shift the pitch of your voice either up or down five semitones. Other effects like FlangeBaby or Chorus can be used for more subtle changes. Once installed, changing your voice can be done on the fly by clicking on the plus button that appears at the top of your Skype window. Once you’ve done that, a pop-up appears where you can select from the available effects. The “delay” effect is especially annoying as you can see here in this video demo. The app comes with several effect built in, but you can also add your own.  For details on how Mark used Skype’s audio APIs to code the app, check out this blog post.&amp;nbsp; To download either the source code or application or both, just visit Codeplex.  </itunes:summary>
      <link>http://channel9.msdn.com/Blogs/coolstuff/Skype-Voice-Changer</link>
      <pubDate>Wed, 04 Mar 2009 20:54:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/coolstuff/Skype-Voice-Changer</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/on10_4f85e2aa-59df-481e-8c1e-b83e3b79540a.jpg" height="0" width="0"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/on10_25108_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/on10_25108_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/85/on10_4f8b7819-f1bb-4e9f-8f16-aca27b5aa6a5.jpg" height="64" width="85"></media:thumbnail>      
      <dc:creator>Sarah Perez</dc:creator>
      <itunes:author>Sarah Perez</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/coolstuff/Skype-Voice-Changer/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Fun</category>
      <category>Skype</category>
      <category>funny</category>
      <category>Coding</category>
    </item>
  <item>
      <title>Российские евангелисты изучают Surface в коридорах Редмонда</title>
      <description><![CDATA[Гайдар Магдануров, Ро&#1084;ан Здебский и Михаил Черно&#1084;ордиков изучают цифровой стол Surface, который стоит в коридорах ка&#1084;пуса Microsoft в Ред&#1084;онде
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:d4cef077d4ca42f28b109deb00104eeb">]]></description>
      <comments>http://channel9.msdn.com/Blogs/mikcher/Russian-evangelists-and-Microsoft-Surface</comments>
      <itunes:summary>Гайдар Магдануров, Ро&amp;#1084;ан Здебский и Михаил Черно&amp;#1084;ордиков изучают цифровой стол Surface, который стоит в коридорах ка&amp;#1084;пуса Microsoft в Ред&amp;#1084;онде
</itunes:summary>
      <itunes:duration>490</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/mikcher/Russian-evangelists-and-Microsoft-Surface</link>
      <pubDate>Wed, 07 Jan 2009 11:07:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/mikcher/Russian-evangelists-and-Microsoft-Surface</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/451663_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/451663_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_large_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_small_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_2MB_ch9.wmv" expression="full" duration="490" fileSize="129368382" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_ch9.mp3" expression="full" duration="490" fileSize="3925391" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_ch9.mp4" expression="full" duration="490" fileSize="100393810" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_ch9.wma" expression="full" duration="490" fileSize="7956577" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_ch9.wmv" expression="full" duration="490" fileSize="26168383" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_Zune_ch9.wmv" expression="full" duration="490" fileSize="59384363" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/3/6/6/1/5/4/Surface_s_ch9.wmv" expression="full" duration="490" fileSize="194" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/6/6/1/5/4/Surface_ch9.wmv" length="26168383" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Михаил Черномордиков</dc:creator>
      <itunes:author>Михаил Черномордиков</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/mikcher/Russian-evangelists-and-Microsoft-Surface/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>ru-RU</category>
      <category>Russia</category>
      <category>Surface</category>
    </item>
  <item>
      <title>Make Some Crazy New Year&amp;rsquo;s Resolutions</title>
      <description><![CDATA[ <p>Do you think making New Year’s resolutions is crazy? Well, you have no idea how crazy they can be. A new toy called the <a href="http://resolutionrandomizer.pop.us/ecard.aspx">Resolution Randomizer</a> can help you create some <em>really </em>off-the-wall resolutions with just a click of the mouse. This Silverlight application spins around bits and pieces of mismatched resolutions like some Vegas slot machine matching up promises (“will abstain from,” “will learn more about”, etc.) with activities (“getting in shape,” “stealing ideas”, etc.) and then locations (“at home,” “at work,” etc.). To get your resolution, just click the “Randomize” button for a truly random resolution. Here’s mine: “Quit rolling my eyes all day long.” (Do I do that?) </p><p>After you finish having fun, you can choose to share it with a friend through the provided link. </p><p>Get your own crazy resolutions here: <a href="http://resolutionrandomizer.pop.us/ecard.aspx">http://resolutionrandomizer.pop.us/ecard.aspx</a>. <em><br></em></p><p><em>(Thanks <a href="http://blogs.msdn.com/brada/archive/2008/12/26/resolution-randomizer.aspx">Brad</a> for the tip!)</em></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:9e6770dcadd1441dbb969e0e0027d65d">]]></description>
      <comments>http://channel9.msdn.com/Blogs/coolstuff/Make-Some-Crazy-New-Yearrsquos-Resolutions</comments>
      <itunes:summary> Do you think making New Year’s resolutions is crazy? Well, you have no idea how crazy they can be. A new toy called the Resolution Randomizer can help you create some really off-the-wall resolutions with just a click of the mouse. This Silverlight application spins around bits and pieces of mismatched resolutions like some Vegas slot machine matching up promises (“will abstain from,” “will learn more about”, etc.) with activities (“getting in shape,” “stealing ideas”, etc.) and then locations (“at home,” “at work,” etc.). To get your resolution, just click the “Randomize” button for a truly random resolution. Here’s mine: “Quit rolling my eyes all day long.” (Do I do that?)  After you finish having fun, you can choose to share it with a friend through the provided link.  Get your own crazy resolutions here: http://resolutionrandomizer.pop.us/ecard.aspx.  (Thanks Brad for the tip!) </itunes:summary>
      <link>http://channel9.msdn.com/Blogs/coolstuff/Make-Some-Crazy-New-Yearrsquos-Resolutions</link>
      <pubDate>Sun, 28 Dec 2008 09:15:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/coolstuff/Make-Some-Crazy-New-Yearrsquos-Resolutions</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/on10_bc3e5f4c-7a96-4f15-ab2e-2573b7b959c0.jpg" height="0" width="0"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/85/on10_d902d528-0582-4801-ad7c-a3ba4596c399.jpg" height="64" width="85"></media:thumbnail>      
      <dc:creator>Sarah Perez</dc:creator>
      <itunes:author>Sarah Perez</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/coolstuff/Make-Some-Crazy-New-Yearrsquos-Resolutions/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>Silverlight</category>
      <category>funny</category>
    </item>
  <item>
      <title>Spreading the love at Tech Ed</title>
      <description><![CDATA[So, I just spent 2 weeks down in Florida&nbsp;working with&nbsp;<a href="http://channel9.msdn.com/">Channel 9</a> and&nbsp;<a href="http://edge.technet.com/">Edge</a> to make videos. It was alot of work, but we got a ton of great stuff which you should check out. However...after a full week of hard-core conferencing, the 9 guys (<a href="http://blogs.msdn.com/danielfe/">Dan Fernandez</a> &amp;&nbsp;<a href="http://blogs.msdn.com/briankel/">Brian Keller</a>)&nbsp;and I blew off some steam and decided we're all&nbsp;<a href="http://i153.photobucket.com/albums/s225/ckb00a/threes6a.jpg">one big happy family</a>&nbsp;(sorta). You can be our cousin! <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:50ac9af7de99451593fa9e0f01011208">]]></description>
      <comments>http://channel9.msdn.com/Blogs/LauraFoy/9-loves-10</comments>
      <itunes:summary>So, I just spent 2 weeks down in Florida&amp;nbsp;working with&amp;nbsp;Channel 9 and&amp;nbsp;Edge to make videos. It was alot of work, but we got a ton of great stuff which you should check out. However...after a full week of hard-core conferencing, the 9 guys (Dan Fernandez &amp;amp;&amp;nbsp;Brian Keller)&amp;nbsp;and I blew off some steam and decided we&#39;re all&amp;nbsp;one big happy family&amp;nbsp;(sorta). You can be our cousin!</itunes:summary>
      <itunes:duration>133</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/LauraFoy/9-loves-10</link>
      <pubDate>Thu, 19 Jun 2008 17:44:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/LauraFoy/9-loves-10</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/on10_d1d87a79-728f-4d8f-bb4c-37806f64bb71.jpg" height="0" width="0"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_small_on10.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_2MB_on10.wmv" expression="full" duration="133" fileSize="41406439" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_on10.mp3" expression="full" duration="133" fileSize="1069894" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_on10.mp4" expression="full" duration="133" fileSize="7505892" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_on10.wma" expression="full" duration="133" fileSize="1092623" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_on10.wmv" expression="full" duration="133" fileSize="8400875" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_Zune_on10.wmv" expression="full" duration="133" fileSize="10646423" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/on10/8/9/4/3/9loves10_s_on10.wmv" expression="full" duration="133" fileSize="192" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/on10/8/9/4/3/9loves10_on10.wmv" length="8400875" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Laura Foy</dc:creator>
      <itunes:author>Laura Foy</itunes:author>
      <slash:comments>8</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/LauraFoy/9-loves-10/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>Tech Ed</category>
      <category>Channel 10</category>
    </item>
  <item>
      <title>Geography Tetris</title>
      <description><![CDATA[Here's a much more fun way to learn geography than just staring at a map - a game called Statetris lets you learn geography by playing an online game, similar to Tetris, where states or countries are the blocks which you must move or rotate to fit them
 into the correct locations. The Tetris board will be a shape of a map and the &quot;pieces&quot; drop down from the top. Using the arrow keys, you move the pieces to where they belong on the map. There are three levels to play - easy, medium, and hard. There are games
 for <a href="http://www.mapmsg.com/games/statetris/usa/">USA</a>, <a href="http://www.mapmsg.com/games/statetris/uk/">
UK</a>, <a href="http://www.mapmsg.com/games/statetris/europe/">Europe</a>, <a href="http://www.mapmsg.com/games/statetris/africa">
Africa</a>, and more. <em>(via <a href="http://www.labnol.org/internet/favorites/test-knowledge-of-world-geography-with-tetris-game/3435/">
Digital Inspiration</a>)</em> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:cdcfd7edb78246ec9e799dec00485ea7">]]></description>
      <comments>http://channel9.msdn.com/Blogs/coolstuff/Geography-Tetris</comments>
      <itunes:summary>Here&#39;s a much more fun way to learn geography than just staring at a map - a game called Statetris lets you learn geography by playing an online game, similar to Tetris, where states or countries are the blocks which you must move or rotate to fit them
 into the correct locations. The Tetris board will be a shape of a map and the &amp;quot;pieces&amp;quot; drop down from the top. Using the arrow keys, you move the pieces to where they belong on the map. There are three levels to play - easy, medium, and hard. There are games
 for USA, 
UK, Europe, 
Africa, and more. (via 
Digital Inspiration)</itunes:summary>
      <link>http://channel9.msdn.com/Blogs/coolstuff/Geography-Tetris</link>
      <pubDate>Thu, 05 Jun 2008 13:22:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/coolstuff/Geography-Tetris</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/on10_4976fb3e-4470-41e4-aaeb-0366a0a0e6fa.jpg" height="0" width="0"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/85/on10_47cfda9e-41e0-4b97-be71-4dcb1ab86215.jpg" height="64" width="85"></media:thumbnail>      
      <dc:creator>Sarah Perez</dc:creator>
      <itunes:author>Sarah Perez</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/coolstuff/Geography-Tetris/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>Games</category>
      <category>educational</category>
      <category>tetris</category>
      <category>learning</category>
      <category>geography</category>
    </item>
  <item>
      <title>Phun with Physics</title>
      <description><![CDATA[Computer Science Emil Ernerfeldt came up with <a href="http://www.phun.at/" target="_blank">Phun</a> for his Master of Science Thesis. The game/tool can be used as a educational program for learning about physics concepts like restitution and friction, or it can be used just for fun. After <a href="http://phun.cs.umu.se/wiki/Download" target="_blank">downloading Phun</a> (works on 32-bit and 64-bit systems), you can navigate around the scene and begin drawing shapes like straight lines, circles, boxes, planes, springs, chains, hinges, and other polygons. You can even add features like water, fix joints, rotational joints, hinge motors, and more. Of course the &quot;phun&quot; is in the way all the elements can interact with each other. If you're still confused, <a href="http://www.youtube.com/watch?v=0H5g9VS0ENM" target="_blank">check out this video</a> of Phun in action. Doesn't that look like...Phun? (Not enough phun? Also see the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=56347faf-a639-4f3b-9b87-1487fd4b5a53&amp;displaylang=en">Physics Illustrator for Tablet PC</a>.) <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:47d38a580a9945c99a629e0e009f4675">]]></description>
      <comments>http://channel9.msdn.com/Blogs/coolstuff/Phun-with-Physics</comments>
      <itunes:summary>Computer Science Emil Ernerfeldt came up with Phun for his Master of Science Thesis. The game/tool can be used as a educational program for learning about physics concepts like restitution and friction, or it can be used just for fun. After downloading Phun (works on 32-bit and 64-bit systems), you can navigate around the scene and begin drawing shapes like straight lines, circles, boxes, planes, springs, chains, hinges, and other polygons. You can even add features like water, fix joints, rotational joints, hinge motors, and more. Of course the &amp;quot;phun&amp;quot; is in the way all the elements can interact with each other. If you&#39;re still confused, check out this video of Phun in action. Doesn&#39;t that look like...Phun? (Not enough phun? Also see the Physics Illustrator for Tablet PC.)</itunes:summary>
      <link>http://channel9.msdn.com/Blogs/coolstuff/Phun-with-Physics</link>
      <pubDate>Tue, 29 Apr 2008 16:16:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/coolstuff/Phun-with-Physics</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/on10_2cf56ad2-5e09-4c0f-811b-37c71591acca.jpg" height="0" width="0"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/85/on10_d2e0f977-95d0-472b-a5c2-d2ffd099b083.jpg" height="64" width="85"></media:thumbnail>      
      <dc:creator>Sarah Perez</dc:creator>
      <itunes:author>Sarah Perez</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/coolstuff/Phun-with-Physics/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>Physics</category>
      <category>Software</category>
      <category>Drawing</category>
      <category>educational</category>
    </item>
  <item>
      <title>Let&#39;s go surfin&#39; now...</title>
      <description><![CDATA[Here's a little fun for your Friday- not that Fridays aren't already fun because they are, I mean, they're <a href="http://en.wikipedia.org/wiki/Friday"><em>Fridays</em></a>. Fridays are inherently fun, hence the phrase &quot;<a href="http://en.wikipedia.org/wiki/TGIF">TGIF</a>&quot;. Anyway, moving right along (pun intended)...first there was the <a href="http://en.wikipedia.org/wiki/Moped">Moped</a>, then the <a href="http://en.wikipedia.org/wiki/Segway">Segway</a> and now...the <a href="http://wheelsurf.nl/">WheelSurf</a>. Surfs up. <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:ae57c860e892471f807b9e0f00fef682">]]></description>
      <comments>http://channel9.msdn.com/Blogs/LauraFoy/Lets-go-surfin-now</comments>
      <itunes:summary>Here&#39;s a little fun for your Friday- not that Fridays aren&#39;t already fun because they are, I mean, they&#39;re Fridays. Fridays are inherently fun, hence the phrase &amp;quot;TGIF&amp;quot;. Anyway, moving right along (pun intended)...first there was the Moped, then the Segway and now...the WheelSurf. Surfs up.</itunes:summary>
      <itunes:duration>220</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/LauraFoy/Lets-go-surfin-now</link>
      <pubDate>Fri, 12 Oct 2007 18:42:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/LauraFoy/Lets-go-surfin-now</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/content/on10/entries/preview/wheelcycle_large_on10.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/content/on10/entries/previewsmall/wheelcycle_small_on10.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_2MB_on10.wmv" expression="full" duration="220" fileSize="64198937" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_on10.mp3" expression="full" duration="220" fileSize="1759318" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_on10.mp4" expression="full" duration="220" fileSize="13517630" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_on10.wma" expression="full" duration="220" fileSize="1786451" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_on10.wmv" expression="full" duration="220" fileSize="12966382" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_Zune_on10.wmv" expression="full" duration="220" fileSize="17654842" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://on10.net/videos/WheelCycle_on10.asx" expression="full" duration="220" fileSize="108" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/on10/4/2/1/9/1/WheelCycle_on10.wmv" length="12966382" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Laura Foy</dc:creator>
      <itunes:author>Laura Foy</itunes:author>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/LauraFoy/Lets-go-surfin-now/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>toys</category>
      <category>wheelsurf</category>
      <category>moving</category>
      <category>motor</category>
    </item>
  <item>
      <title>MASHUP DAY! A Meeting of the Minds at Microsoft!</title>
      <description><![CDATA[A few weeks ago here at Microsoft was official MASHUP DAY!&nbsp; A day where all great Microsoft minds met and brainstormed on some innovative ways to search.&nbsp; There was a DJ, booze and of course the ever so popular chocolate fondue fountain.&nbsp; And not to mention lots of great ideas colliding together in the hopes of creating the next big thing.&nbsp; I was invited down by Jon Pincus and was incredibly impressed and inspired by both the ideas and the openness.&nbsp; I put together this fancy little video so you can see that not only does Microsoft put out some of the greatest software in existence, but the people that create it, like to have a beer just like the rest of us.&nbsp;<br><br><p>Check out the team's space at <a title="http://adastra-experience.spaces.live.com/" href="http://adastra-experience.spaces.live.com/"><u>http://adastra-experience.spaces.live.com</u></a><br><br>Jon Pincus professional page at <a title="http://research.microsoft.com/users/jpincus/" href="http://research.microsoft.com/users/jpincus/"><u>http://research.microsoft.com/users/jpincus/</u></a><br><br>The&nbsp;results from this and future mashup days will be coming to <a title="http://gallery.microsoft.com/" href="http://gallery.microsoft.com/"><u>Live Gallery</u></a>, <a title="http://ideas.live.com/" href="http://ideas.live.com/"><u>Live Ideas</u></a>, <a title="http://dev.live.com/" href="http://dev.live.com/"><u>dev.live.com</u></a>, <a title="http://www.codeplex.com/" href="http://www.codeplex.com/"><u>CodePlex</u></a> – and hopefully Slashdot!</p><p></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:ccb059eafcea4a46a56b9e0f000c930f">]]></description>
      <comments>http://channel9.msdn.com/Blogs/Tina/MASHUP-DAY-A-Meeting-of-the-Minds-at-Microsoft</comments>
      <itunes:summary>A few weeks ago here at Microsoft was official MASHUP DAY!&amp;nbsp; A day where all great Microsoft minds met and brainstormed on some innovative ways to search.&amp;nbsp; There was a DJ, booze and of course the ever so popular chocolate fondue fountain.&amp;nbsp; And not to mention lots of great ideas colliding together in the hopes of creating the next big thing.&amp;nbsp; I was invited down by Jon Pincus and was incredibly impressed and inspired by both the ideas and the openness.&amp;nbsp; I put together this fancy little video so you can see that not only does Microsoft put out some of the greatest software in existence, but the people that create it, like to have a beer just like the rest of us.&amp;nbsp;Check out the team&#39;s space at http://adastra-experience.spaces.live.comJon Pincus professional page at http://research.microsoft.com/users/jpincus/The&amp;nbsp;results from this and future mashup days will be coming to Live Gallery, Live Ideas, dev.live.com, CodePlex – and hopefully Slashdot!  </itunes:summary>
      <link>http://channel9.msdn.com/Blogs/Tina/MASHUP-DAY-A-Meeting-of-the-Minds-at-Microsoft</link>
      <pubDate>Fri, 01 Dec 2006 22:07:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/Tina/MASHUP-DAY-A-Meeting-of-the-Minds-at-Microsoft</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/content/on10/entries/preview/mashup_large_on10.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/content/on10/entries/previewsmall/mashup_small_on10.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://download.microsoft.com/download/5/3/0/530cd450-7d2e-4fec-b59f-c92d8b7fd550/Mashup_2MB_on10.wmv" expression="full" fileSize="102200048" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://download.microsoft.com/download/5/3/0/530cd450-7d2e-4fec-b59f-c92d8b7fd550/Mashup_on10.mp4" expression="full" fileSize="25173656" type="video/mp4" medium="video"></media:content>
        <media:content url="http://download.microsoft.com/download/5/3/0/530cd450-7d2e-4fec-b59f-c92d8b7fd550/Mashup_on10.wmv" expression="full" fileSize="26178674" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://download.microsoft.com/download/5/3/0/530cd450-7d2e-4fec-b59f-c92d8b7fd550/Mashup_Zune_on10.wmv" expression="full" fileSize="29256046" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://on10.net/videos/Mashup_on10.asx" expression="full" fileSize="104" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://download.microsoft.com/download/5/3/0/530cd450-7d2e-4fec-b59f-c92d8b7fd550/Mashup_on10.wmv" length="26178674" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Tina</dc:creator>
      <itunes:author>Tina</itunes:author>
      <slash:comments>14</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/Tina/MASHUP-DAY-A-Meeting-of-the-Minds-at-Microsoft/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>mashup</category>
      <category>Microsoft</category>
      <category>Search</category>
      <category>Seattle</category>
    </item>
  <item>
      <title>That&#39;s Totally Disco</title>
      <description><![CDATA[<span id="c4fmetadata">
<table class="" cellspacing="0" cellpadding="1" width="100%" border="0">
<tbody>
<tr class="entry_overview">
<td class="" width="50">&nbsp;</td>
<td class=""><span class="entry_description">Set up your a disco dance floor in your home!</span></td>
</tr>
<tr>
<td class="" colspan="2">
<div class="entry_author">Clint Rutkas</div>
<div class="entry_company"><a href="http://betterthaneveryone.com/">Monkey See, Monkey Build - Usb Controlled Disco Dance Floor</a></div>
<br>
<div class="entry_details"><b>Difficulty: </b><span class="entry_details_input">Advanced</span></div>
<div class="entry_details"><b>Time Required:</b> <span class="entry_details_input">
Greater than 10 hours</span></div>
<div class="entry_details"><b>Cost: </b><span class="entry_details_input">Greater than $200</span></div>
<div class="entry_details"><b>Software: </b><span class="entry_details_input"><a href="http://msdn.microsoft.com/vstudio/express/visualCsharp/default.aspx">C# 2005 Express Edition</a>,
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;displaylang=en">
.NET Framework 2.0</a></span></div>
<div class="entry_details"><b>Hardware: </b><span class="entry_details_input">LEDs, Max7313 LED Intensity Controllers, tools for cutting wood (Dremel 400XPR, a DeWalt DW331 VS orbital Jig saw, and a Milwaukee 1-3/4 HP BodyGrip 5615 Router), drills, soldering
 iron (Weller WESD51 with a .031&quot; Long Conical Tip), wood, wires, iBook, printed circuit boards (PCBs)</span></div>
<div class="entry_details"><b>Download: </b><a class="" href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/source_code_v0.0.0.5.zip">Download</a>
<ul>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</span>
<p>Many would ask, &quot;Why build a disco dance floor?&quot; My friends ask, &quot;Why wasn't it done sooner?&quot; The rest ask, after seeing it, how much I spent. Instead, I would like to ask, &quot;Why didn't you build a computer-controlled disco dance floor running your own custom
 made software by yourself?&quot; The idea isn't new and the printed circuit boards (PCBs) I got are from MIT. I'm not claiming originality points here.
</p>
<p>Simply put, I saw the disco dance floor and realized it had to be built. I took an electronics class in high school and a digital electronics class in college. I thought this would be a walk in the park. I'm a quasi-smart 24-year-old programmer whose friends
 call &quot;MacGyver&quot; from time to time. How bad could it be? My theory was that girls like to dance. By having a dance floor in my apartment, more girls would magically appear there. A heavily flawed theory to stand on — which, let's not kid ourselves, is the best
 kind. </p>
<p>When I got the boards, I was going to use an iBook to power the floor; however, the programmer in me didn't like how it acted or handled. I'm a perfectionist and I knew I could whip something up that I'd like. I have yet to create a perfect application,
 but here is what I've done so far. </p>
<p>After doing some research, I found out that .NET 2.0 had a built-in SerialPort class. I really wanted to play around with the new framework, so I chose to use the .NET 2.0 Framework. When the coding part of the project started, .NET 2.0 was still in Beta
 2, so there were a few weird quirks, with the older revisions running the RTM version of .NET 2.0.
</p>
<p>So here is my 10-month legendary saga of insanity and why my living room now can do cool things like this:
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/circlefloor.gif" width="485" border="0">
</p>
<p>Or have mood lighting built in. </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/blueapt.gif" width="485" border="0">
</p>
<h4>All the King's Men Managed to Put Humpty Dumpty Together Again</h4>
<p>I got the bill of materials from MIT along with the PCBs, and I purchased everything needed from Parallax, Jameco, Maxim-Inc, Digikey, NewEgg, Ledtronics, McMaster-Carr, Newark, Home Depot, Menards, and RadioShack. A more detailed list can be found at
<a href="http://betterthaneveryone.com/?page_id=6">http://betterthaneveryone.com/?page_id=6</a>. Soldering everything together was easy until I added in the Max7313 LED Intensity Controllers. Each board has 16 of these and they are rather a pain. Each pin is
 .01&quot; thick, which is about the size of a piece of sand. I seriously damaged two boards because of this and only managed to get one of them fixed. If memory serves, it took about a month to get all my boards soldered up.
</p>
<p>Due to the size of my living room in my apartment, I could only build a 14-foot by 8-foot floor. Each module can support 64 individual LEDs and with 6-inch physical tiles; I needed to use 7 hardware modules. Each hardware module was set up for 4 rows of
 16 lights. </p>
<h5>Everyone Loves Doing Wiring, Right?</h5>
<p>Wire is my enemy. It takes forever and it's hard to make it look good. My solution: 10,000-feet worth of 22-AWG solid copper wire. As you can see, I picked the wrong solution because I wasn't aware that there was a small connector that would make wiring
 on the board far easier by using ribbon cord. I wouldn't have had to create all my wiring by hand for a solid three months. Issues from my wiring solution have inspired me to eventually replace it all. However, I boast that I have hand-braided two miles worth
 of wiring. </p>
<p>Here is what a final board looks like wired. It isn't pretty, so I recommend looking away.
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/wiredboard.gif" width="485" border="0">
</p>
<h5>I Need Tools, Special Tools, Power Tools ... as Powerful as Humanly Possible</h5>
<p>Power tools in mass quantity are required. For this project, I purchased a Dremel 400XPR, a DeWalt DW331 VS orbital Jig saw, and a Milwaukee 1-3/4 HP BodyGrip 5615 Router for cutting wood. I &quot;borrowed&quot; an old drill from my dad so I didn't need to buy a new
 one. I would have gotten a table saw, but I live in an apartment and really didn't have any place to hook it up.
</p>
<p>For soldering, I used a Weller WESD51 with a .031&quot; Long Conical Tip. I highly recommend it.
</p>
<p>To program the firmware, I used an Amtel AVR STK500 programmer. </p>
<h5>Built Like Lego</h5>
<p>After getting all the tools and material, it was rather easy and fast to cut and construct the floor. Being a perfectionist, I wanted thin lines in the floor. I used Aspen wood, otherwise known as hobby wood, at ¼&quot; x 4 x 3 feet and 2 foot lengths. Because
 I couldn't find anything longer, I had to live with it. Everything is interwoven and creates a rather nice, strong structure. The wiring is run underneath the boards.
</p>
<p>However, in one weekend I managed to lay the entire frame down AND still manage to go out with friends both nights.
</p>
<p><img alt="" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/gridcompleted.gif" border="0">
</p>
<p>Once again, the wiring caused a rather lengthy installation period. Getting the wiring taut and LEDs aligned got really annoying toward the end. Four hundred and forty eight later, I had the application running to verify that all three primary colors worked.
 Installing the floor took a weekend while the wiring took the better part of two weeks — even with the help of my friend
<a href="http://www.mcnelis.biz/wordpress/">Dave McNelis</a>. Without his help I don't believe I could have met my self-imposed deadline, nor would I have knees that function after sitting cross-legged for that long.
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/mewiring.gif" width="485" border="0">
</p>
<h5>Bullet-… I Mean Heel-Proof</h5>
<p>The top of the floor is 3/8&quot; thick polycarbonate. This is one of the materials used in bullet-proof glass. While the thickness I have isn't truly bullet resistant, it does provide enough protection for the task at hand. I purchased it in 4-foot by 4-foot
 sheets. It has held up remarkably well. The only damage was caused moving my couch. The joints are filled with silicon to prevent liquid from seeping in also.
</p>
<h5>Magic Blue Smoke</h5>
<p>I killed two boards while attempting to get my floor ready for the party. One of the boards just wouldn't work anymore and I wasn't too happy about it. I noticed the power cord was getting a tad hot after I plugged it into my spare board. Only then did it
 dawn on me why the wire was hot and why the spare board refused to work. The ground and the cord were touching somewhere and I fried the boards. I opened up the wiring and saw a bright blue spark, which indicated the wires had arcing and something was ruined
 on both PCBs. With some awesome MIT tech support via a flurry of e-mailing, I swapped out the processor (the only one I had left) and managed to get it back up and working. I was lucky.
</p>
<h5>Final Assembly</h5>
<p>It took an additional week of tweaking to get everything lighting up, aligned properly, and safe. After having all the LEDs, polycarbonate, and wiring honed in, I still had to do something about the software. Until this point in time, I hadn't had my software
 run more than two of the hardware modules at the same time. As soon as I plugged in four or more modules, the software would crash within seconds. More about that later on.
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/fixingissues.gif" width="485" border="0">
</p>
<h4>Building the Digital Disco Building Blocks</h4>
<p>Because each hardware module can only control 64 tiles, software is required to merge the modules into a single entity. In this project, I had two core objects, FloorModule and DanceFloor.
</p>
<h5>Floor Module Is to Serial Port as Serial Port Is to COM</h5>
<p>The FloorModule class is what communicates to each physical hardware board. It has the ability to read in a string, char array, or byte array. It also provides threading for a uniformed spread on the floor when it is being operated. What does this actually
 mean? Well, a synchronous call would force COM3, then COM4, then COM5 ... so this would potentially cause a jitter in the image. I wanted it all at once. Since they were threaded, it would help switch up the output to the boards. Does threading actually help
 it? I don't know, but I tend to listen to my inner geek, who says yes. </p>
<pre><code></code></pre>
<pre class="csharpcode">        <span class="preproc">#region</span> WriteBuffer <span class="kwrd">char</span>[] Overloads<br>        <span class="kwrd">public</span> <span class="kwrd">bool</span> WriteBuffer(<span class="kwrd">char</span>[] Buffer)<br>        {<br>            <span class="kwrd">if</span> (!DisableWriting)<br>                <span class="kwrd">return</span> WriteBuffer(Buffer, <span class="kwrd">true</span>);<br>            <span class="kwrd">return</span> <span class="kwrd">true</span>;<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">bool</span> WriteBuffer(<span class="kwrd">char</span>[] Buffer, <span class="kwrd">bool</span> ByThread)<br>        {<br>            <span class="kwrd">if</span> (!DisableWriting)<br>            {<br>                charBuffer = Buffer;<br><br>                <span class="kwrd">if</span> (ByThread)<br>                {<br>                    bufferThreadChar = <span class="kwrd">new</span> Thread(<span class="kwrd">new</span> ThreadStart(writeBufferThreadForCharArray));<br>                    bufferThreadChar.Start();<br>                }<br>                <span class="kwrd">else</span><br>                {<br>                    writeBufferThreadForCharArray();<br>                }<br>            }<br>            <span class="kwrd">return</span> <span class="kwrd">true</span>;<br>        }<br><br>        <span class="kwrd">private</span> <span class="kwrd">void</span> writeBufferThreadForByteArray()<br>        {<br>            mutexLock.WaitOne();<br>            ComPort.Write(byteBuffer, 0, byteBuffer.Length);<br>            comPortDoneWriting();<br>        }<br>        <span class="preproc">#endregion</span></pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>So overall this object isn't terribly complex. It gets the job done. </p>
<h5>A Dance Floor in OOP Form</h5>
<p>This object does all the separating and processing for the floor. It really isn't that impressive now that I think about it. It just parses the data, and then shoves it to each of the floor modules. Here is the more interesting part.</p>
<pre><code></code></pre>
<pre class="csharpcode">        <span class="kwrd">public</span> <span class="kwrd">bool</span> WriteDanceFloorBuffer()<br>        {<br>            waitToWrite(); <span class="rem">// are all modules complete</span><br>            FloorModulesCompleteWriting = 0;<br>            <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; FloorSettings.ModulesPerFloor; i&#43;&#43;)<br>            {<br>                <span class="kwrd">int</span>[] tempBuffer = <span class="kwrd">new</span> <span class="kwrd">int</span>[FloorSettings.Cols * FloorSettings.RowsPerModule * 3];<br>                Array.Copy(FloorBuffer, (FloorSettings.Cols * FloorSettings.RowsPerModule * 3 * i), <br>                       tempBuffer, 0, FloorSettings.Cols * FloorSettings.RowsPerModule * 3);<br>                writeToModule(i, tempBuffer, ddfCommon.ControlCodes.MODULE_WRITE_CODE);<br>            }<br>            <span class="kwrd">return</span> <span class="kwrd">true</span>;<br>        }<br><br>        <span class="kwrd">private</span> <span class="kwrd">bool</span> writeToModule(<span class="kwrd">int</span> moduleIndex, <span class="kwrd">int</span>[] Buffer, <span class="kwrd">int</span> CommandSignal)<br>        {<br>            <span class="kwrd">int</span>[] intRealBuffer = MashData(Buffer, FloorSettings.OutputModuleBytes * 2);<br>            <br>            <span class="kwrd">byte</span>[] byteBuffer = intArrayToByteArray(intRealBuffer);<br>            <span class="kwrd">return</span> FloorModules[moduleIndex].WriteBuffer(byteBuffer);<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">void</span> waitToWrite()<br>        {<br>            <span class="kwrd">while</span>(FloorModulesCompleteWriting &lt; FloorSettings.ModulesPerFloor)<br>            {<br>                System.Threading.Thread.Sleep(0);<br>            }<br>        }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<h4>What Is a Dance Floor Without Some Blinking?</h4>
<p>Animation files are simple ways to shove lots of data onto the floor. All animation classes inherit off the interface IPattern.</p>
<pre><code></code></pre>
<pre class="csharpcode">    <span class="kwrd">interface</span> IPattern<br>    {<br>        <span class="kwrd">int</span>[] ProgressBuffer();<br>    }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>I know, the world's most complex interface. Here is a simple class that produces color noise, whose object's name is called &quot;Noise.&quot;</p>
<pre><code></code></pre>
<pre class="csharpcode">    <span class="kwrd">public</span> <span class="kwrd">class</span> Noise : IPattern<br>    {<br>        <span class="kwrd">private</span> <span class="kwrd">int</span> Cols;<br>        <span class="kwrd">private</span> <span class="kwrd">int</span> Rows;<br>        <span class="kwrd">private</span> <span class="kwrd">int</span>[] Buffer;<br>        <span class="kwrd">private</span> Random RandomNumber;<br><br>        <span class="kwrd">public</span> Noise(<span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Columns)<br>        {<br>            <span class="kwrd">this</span>.Cols = Columns;<br>            <span class="kwrd">this</span>.Rows = Rows;<br>            RandomNumber = <span class="kwrd">new</span> Random();<br><br>            Buffer = <span class="kwrd">new</span> <span class="kwrd">int</span>[<span class="kwrd">this</span>.Rows * <span class="kwrd">this</span>.Cols * 3]; <span class="rem">//RGB the array</span><br>            <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; Buffer.Length; i&#43;&#43;)<br>            {<br>                Buffer[i] = 0;<br>            }<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">int</span>[] ProgressBuffer()<br>        {<br>            <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; Buffer.Length; i&#43;&#43;)<br>                Buffer[i] = RandomNumber.Next(0, 255);<br><br>            <span class="kwrd">return</span> Buffer;<br>        }<br>    }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<h5>I Saw Gir Dancing ... on My Dance Floor</h5>
<p>I wanted Gir, a character I find hilariously amusing from the TV show &quot;Invader Zim,&quot; on my dance floor, and my floor is a &quot;nonstandard&quot; size. I'm also assuming 98 percent of the people who bought the MIT hardware were also going to have nonstandard-sized
 dance floors. I had to come up with a solution that scaled the animations MIT provided, and maybe some cool bells and whistles while I was at it.
</p>
<p>I have two different styles of animation built into the application, one that reads the MIT animations and one that reads everyday image files like JPGs and GIFs. GIFs are actually what I wanted, because they can be animated and because I have an animated
 GIF of Gir dancing. Both animation objects inherit off the Animation object. </p>
<pre><code></code></pre>
<pre class="csharpcode">    <span class="kwrd">public</span> <span class="kwrd">delegate</span> <span class="kwrd">void</span> AnimationFrameLoadedHandler(<span class="kwrd">object</span> sender, AnimationFrameLoadedEventArgs e);<br><br>    <span class="kwrd">public</span> <span class="kwrd">class</span> Animation : IPattern<br>    {<br>        <span class="kwrd">public</span> <span class="kwrd">event</span> AnimationFrameLoadedHandler AnimationFrameLoaded;<br>        <span class="kwrd">protected</span> <span class="kwrd">int</span>[][] AnimationBuffer;<br>        <span class="kwrd">protected</span> <span class="kwrd">int</span> counter; <span class="rem">// used to know if counter needs to be reset :: prevents int.maxvalue from happening.</span><br>        <span class="kwrd">protected</span> <span class="kwrd">bool</span> isLoaded;<br>        <span class="kwrd">protected</span> <span class="kwrd">int</span> TotalFrameCount;<br><br>        <span class="kwrd">public</span> <span class="kwrd">void</span> setAnimationBuffer(<span class="kwrd">int</span>[][] Buffer)<br>        {<br>            AnimationBuffer = Buffer;<br>            isLoaded = <span class="kwrd">true</span>;<br>            TotalFrameCount = AnimationBuffer.Length;<br>        }<br><br>        <span class="kwrd">protected</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> OnFrameLoaded(AnimationFrameLoadedEventArgs e)<br>        {<br>            <span class="kwrd">if</span>(AnimationFrameLoaded != <span class="kwrd">null</span>)<br>            {<br>                AnimationFrameLoaded(<span class="kwrd">this</span>, e);<br>            }<br>        }<br><br>        <span class="kwrd">public</span> Animation(FileInfo file, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Columns) : <span class="kwrd">this</span>(file.FullName, Rows, Columns) { }<br><br>        <span class="kwrd">public</span> Animation(<span class="kwrd">string</span> AnimationFilePath, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Columns) {}<br><br>        <span class="kwrd">public</span> Animation() {}<br><br>        <span class="kwrd">public</span> <span class="kwrd">int</span>[] ProgressBuffer()<br>        {<br>            <span class="kwrd">if</span> (!isLoaded)<br>                <span class="kwrd">return</span> <span class="kwrd">null</span>;<br><br>            <span class="kwrd">if</span> (counter % TotalFrameCount == 0)<br>                counter = 0;<br><br>            <span class="kwrd">return</span> AnimationBuffer[counter&#43;&#43;];<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> LoadFile() {}</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>I used the built in BitMap object along with the Graphic object to do the resizing. An MIT animation is very much the same as an animated GIF. The primary difference is that an MIT animation file must be populated first into a BitMap object pixel by pixel,
 frame by frame, and then resized to the final size of 28 pixels by 16 pixels. Here is the Image class, the one that handles animated GIFs and JPGs.</p>
<pre><code></code></pre>
<pre class="csharpcode">    <span class="kwrd">public</span> <span class="kwrd">class</span> Image : Animation<br>    {<br>        <span class="preproc">#region</span> vars<br>        <span class="kwrd">private</span> <span class="kwrd">int</span> Cols;<br>        <span class="kwrd">private</span> <span class="kwrd">int</span> Rows;<br>        <span class="kwrd">string</span> ImageFilePath;<br>        <span class="preproc">#endregion</span><br><br>        <span class="preproc">#region</span> constructors<br>        <span class="kwrd">public</span> Image(FileInfo file, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Columns) : <span class="kwrd">this</span>(file.FullName, Rows, Columns) { }<br><br>        <span class="kwrd">public</span> Image(<span class="kwrd">string</span> ImageFilePath, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Columns) : <span class="kwrd">base</span>(ImageFilePath, Rows, Columns) <br>        {<br>            <span class="kwrd">this</span>.Cols = Columns;<br>            <span class="kwrd">this</span>.Rows = Rows;<br>            <span class="kwrd">this</span>.ImageFilePath = ImageFilePath;<br><br>            counter = 0;<br>        }<br>        <span class="preproc">#endregion</span><br><br>        <span class="kwrd">public</span> <span class="kwrd">int</span>[][] getAnimationBuffer()<br>        {<br>            <span class="kwrd">return</span> AnimationBuffer;<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> LoadFile()<br>        {<br>            populateBuffer(ImageFilePath);<br>            isLoaded = <span class="kwrd">true</span>;<br>        }<br><br>        <span class="kwrd">private</span> <span class="kwrd">void</span> populateBuffer(<span class="kwrd">string</span> ImageFilePath)<br>        {<br>            FileInfo fi = <span class="kwrd">new</span> FileInfo(ImageFilePath);<br>            <span class="kwrd">bool</span> isAnimatedGif = <span class="kwrd">false</span>;<br>            TotalFrameCount = 1;<br><br>            <span class="preproc">#region</span> populating buffer<br>            <span class="kwrd">using</span> (System.Drawing.Image _img = <span class="kwrd">new</span> Bitmap(ImageFilePath))<br>            {<br>                FrameDimension _dimension = <span class="kwrd">null</span>;<br>                <span class="preproc">#region</span> verifiying <span class="kwrd">if</span> animated gif, <span class="kwrd">if</span> so getting frame count<br>                <span class="kwrd">if</span> (fi.Extension.ToLowerInvariant() == <span class="str">&quot;.gif&quot;</span>)<br>                {<br>                    _dimension = <span class="kwrd">new</span> FrameDimension(_img.FrameDimensionsList[0]);<br>                    TotalFrameCount = _img.GetFrameCount(_dimension);<br>                    isAnimatedGif = (TotalFrameCount &gt; 1);<br>                }<br>                <span class="preproc">#endregion</span><br><br>                <span class="preproc">#region</span> creating buffer<br>                AnimationBuffer = <span class="kwrd">new</span> <span class="kwrd">int</span>[TotalFrameCount][];<br><br>                <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; AnimationBuffer.Length; i&#43;&#43;)<br>                {<br>                    AnimationBuffer[i] = <span class="kwrd">new</span> <span class="kwrd">int</span>[<span class="kwrd">this</span>.Rows * <span class="kwrd">this</span>.Cols * 3]; <span class="rem">// RGB that buffer</span><br>                }<br>                <span class="preproc">#endregion</span><br><br>                <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; TotalFrameCount; i&#43;&#43;)<br>                {<br>                    <span class="kwrd">if</span> (isAnimatedGif)<br>                    {<br>                        _img.SelectActiveFrame(_dimension, i);<br>                    }<br><br>                    <span class="kwrd">using</span> (Bitmap _bitmapReturn = <span class="kwrd">new</span> Bitmap(Rows, Cols))<br>                    {<br>                        <span class="kwrd">using</span>(Graphics g = Graphics.FromImage((System.Drawing.Image)_bitmapReturn))<br>                        {<br>                            g.DrawImage(_img, 0, 0, Rows, Cols);<br>                        }<br>                        _bitmapReturn.RotateFlip(RotateFlipType.Rotate270FlipNone);<br>                        populateBufferRow(_bitmapReturn, i, <span class="kwrd">true</span>);<br>                    }<br>                }<br>            }<br>            <span class="preproc">#endregion</span><br>        }<br><br>        <span class="kwrd">private</span> <span class="kwrd">void</span> populateBufferRow(Bitmap bitmap, <span class="kwrd">int</span> index, <span class="kwrd">bool</span> FireFrameLoadEvent)<br>        {<br>            <span class="kwrd">int</span> offSetBuffer = 0;<br>            <span class="kwrd">for</span> (<span class="kwrd">int</span> y = 0; y &lt; Rows; y&#43;&#43;)<br>            {<br>                <span class="kwrd">for</span> (<span class="kwrd">int</span> x = 0; x &lt; Cols; x&#43;&#43;)<br>                {<br>                    Color _color = bitmap.GetPixel(x, y);<br><br>                    AnimationBuffer[index][offSetBuffer] = _color.R;<br>                    AnimationBuffer[index][offSetBuffer &#43; 1] = _color.G;<br>                    AnimationBuffer[index][offSetBuffer &#43; 2] = _color.B;<br><br>                    offSetBuffer &#43;= 3;<br>                }<br>            }<br>            <span class="kwrd">if</span> (FireFrameLoadEvent)<br>                OnFrameLoaded(<span class="kwrd">new</span> AnimationFrameLoadedEventArgs(index));<br>        }<br>    }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>As you can see, this could be a lengthy, processor-intensive process. On my laptop, it can take a few seconds to fully load some of the larger files, and my laptop is a Pentium4 1.7 GHz Mobile with 1.25 GB of DDR333 RAM. While the processor isn't the fastest,
 this still isn't something to laugh at. So, to counter this there are some interesting hacks built into the Win32 app &amp; — but more on that later.
</p>
<p>Why use the Using block so heavily here? Since GDI&#43; objects tend to grab hold of memory a bit too aggressively, I too needed to be aggressive about their prompt destruction. The Using block allowed the image to be disposed of when I was finished with it
 without my manually having to call dispose. There was a flaw in one of the first releases where I didn't do this and it became a fairly decent sized memory leak.
</p>
<h5>I Can Read Binary!</h5>
<p>.NET 2.0 had a very impressive new function. It has File.ReadAllBytes. It takes a file that is made up of bytes and then reads it in. This was necessary for the MIT-style animations. Here is my helper class:</p>
<pre><code></code></pre>
<pre class="csharpcode">    <span class="kwrd">public</span> <span class="kwrd">class</span> IO<br>    {<br>        <span class="kwrd">private</span> IO() { }<br>        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">string</span> ReadFile(<span class="kwrd">string</span> FilePath)<br>        {<br>            <span class="kwrd">string</span> contents = <span class="kwrd">string</span>.Empty;<br><br>            <span class="kwrd">if</span> (File.Exists(FilePath))<br>                contents = Encoding.Default.GetString(File.ReadAllBytes(FilePath));<br>            <br>            <span class="kwrd">return</span> contents;<br>        }<br><br>        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">byte</span>[] ReadFileToByteArray(<span class="kwrd">string</span> FilePath)<br>        {<br>            <span class="kwrd">if</span> (File.Exists(FilePath))<br>                <span class="kwrd">return</span> File.ReadAllBytes(FilePath);<br>            <br>            <span class="kwrd">return</span> <span class="kwrd">null</span>;<br>        }<br>    }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<h4>Windows Forms Are My Friends</h4>
<p>So now that all the base objects were solid, what next? How about a decent user experience, because everyone loves command line, right? Exactly. So why not a simple Win32 form?
</p>
<p>Once again, the entire idea for the application was speed. This was accomplished by threading as much as possible. The UI wasn't needed so, when the application wanted to start outputting information to the floor, I created a worker thread and left the UI
 thread alone.</p>
<pre><code></code></pre>
<pre class="csharpcode">        <span class="kwrd">private</span> <span class="kwrd">void</span> cmdPattern_Click(<span class="kwrd">object</span> sender, EventArgs e)<br>        {<br>            <span class="kwrd">try</span><br>            {<br>                <span class="kwrd">if</span> (diagnosticToolStripMenuItem.Enabled)<br>                {<br>                    continueWriting = <span class="kwrd">true</span>;<br><br>                    diagnosticToolStripMenuItem.Enabled = openConfigToolStripMenuItem.Enabled = <span class="kwrd">false</span>;<br>                    cmdPattern.Text = ButtonNames.STOP;<br>                    selectedAnimationStyle = Convert.ToString(cmbAnimationStyle.SelectedItem);<br><br>                    <span class="kwrd">if</span> (Convert.ToString(cmbAnimationStyle.SelectedItem) == _animationFile)<br>                        fileInfo = ((FileInfo)cmbAnimationList.SelectedItem);<br>                    <span class="kwrd">else</span> <span class="kwrd">if</span> (Convert.ToString(cmbAnimationStyle.SelectedItem) == _randomAnimationFile)<br>                        timerValue = Convert.ToInt32(numRandomInterval.Value) * 1000;<br><br>                    ThreadStart ts = <span class="kwrd">new</span> ThreadStart(StartWritingToDanceFloor);<br>                    danceFloorWriteThread = <span class="kwrd">new</span> Thread(ts);<br>                    danceFloorWriteThread.Start();<br>                }<br>                <span class="kwrd">else</span><br>                {<br>                    continueWriting = <span class="kwrd">false</span>;<br>                    diagnosticToolStripMenuItem.Enabled = openConfigToolStripMenuItem.Enabled = <span class="kwrd">true</span>;<br>                    cmdPattern.Text = ButtonNames.START;<br>                    <span class="kwrd">if</span> (randomTimer != <span class="kwrd">null</span> &amp;&amp; randomTimer.Enabled)<br>                    {<br>                        randomTimer.Stop();<br>                        randomTimer.Enabled = <span class="kwrd">false</span>;<br>                    }<br>                }<br><br>                cmbAnimationStyle.Enabled = !cmbAnimationStyle.Enabled;<br>            }<br>            <span class="kwrd">catch</span> (Exception ex0)<br>            {<br>                DiagnosticEventArgs e1 = <span class="kwrd">new</span> DiagnosticEventArgs(ex0);<br>                OnExceptionThrownInUI(e1);<br>            }<br>        } </pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<h5>I'll Trade You He-Man for Optimus Prime</h5>
<p>As I stated before, some of the animation files are rather large and require a nontrivial amount of time to process. If one takes five seconds to process, I wouldn't want five seconds of downtime on the floor. While I know some people will say the approach
 below is stupid or incorrect, this is what I came up with and this is the first time I've had to do this style of in-process memory swap.
</p>
<p>The primary issue is switching out the buffer while still using the buffer. To do this, I have a global Boolean called &quot;updatingRandomAnimationFile.&quot; While it is set to true, I allow writes to the floor, or else it skips a cycle. This Boolean is only set
 to true after the temporary animation file is fully done loading and is ready for the array copy. This process still takes some time since it can be a rather large array. One work-around is to have two live animation objects and cycle between them.</p>
<pre><code></code></pre>
<pre class="csharpcode">        <span class="kwrd">private</span> <span class="kwrd">void</span> StartWritingToDanceFloor(<span class="kwrd">string</span> bufferStyle)<br>        {<br>            <span class="kwrd">try</span><br>            {<br>                doneUpdatingUI = <span class="kwrd">true</span>;<br><br>                <span class="kwrd">switch</span> (bufferStyle)<br>                {<br>                    <br>                    <span class="kwrd">case</span> _randomAnimationFile:<br>                        randomTimer = <span class="kwrd">new</span> System.Timers.Timer();<br>                        randomTimer.Interval = timerValue;<br>                        randomTimer.Elapsed &#43;= <span class="kwrd">new</span> System.Timers.ElapsedEventHandler(randomTimer_Elapsed);<br>                        randomTimer.Enabled = <span class="kwrd">true</span>;<br><br>                        randomAnimationFile = loadTempAnimationFileFromFileArray(DiscoDanceFloor.FloorSettings.AnimationDirectory, <br>                                 DiscoDanceFloor.FloorSettings.Rows, DiscoDanceFloor.FloorSettings.Cols);<br>                        updatingRandomAnimationFile = <span class="kwrd">false</span>;<br><br>                        <span class="kwrd">while</span> (continueWriting)<br>                        {<br>                            <span class="kwrd">if</span> (!updatingRandomAnimationFile)<br>                                UpdateUIandWriteToFloor(randomAnimationFile.ProgressBuffer());<br>                        }<br>                        <span class="kwrd">break</span>;<br>                }<br>            }<br>            <span class="kwrd">catch</span> (Exception ex0)<br>            {<br>                DiagnosticEventArgs e1 = <span class="kwrd">new</span> DiagnosticEventArgs(ex0);<br>                OnExceptionThrownInUI(e1);<br>            }<br>        }<br><br>        <span class="kwrd">private</span> FileInfo[] getFilesFromDirectory(<span class="kwrd">string</span> AnimationDirectory, <span class="kwrd">string</span> regexPattern)<br>        {<br>            DirectoryInfo di = <span class="kwrd">new</span> DirectoryInfo(AnimationDirectory);<br>            <span class="kwrd">string</span>[] searchPatternArr = Regex.Split(regexPattern, <span class="str">@&quot;\|&quot;</span>);<br>            ArrayList arrlist = <span class="kwrd">new</span> ArrayList();<br>            <br>            <span class="kwrd">foreach</span>( <span class="kwrd">string</span> _fileExt <span class="kwrd">in</span> searchPatternArr)<br>                arrlist.AddRange(di.GetFiles(_fileExt));<br><br>            <span class="kwrd">return</span> (FileInfo[])arrlist.ToArray(<span class="kwrd">typeof</span>(FileInfo));<br>        }<br><br>        <span class="kwrd">private</span> Animation loadTempAnimationFileFromFileArray(<span class="kwrd">string</span> AnimationDirectory, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Cols)<br>        {<br>            FileInfo[] fiArr = getFilesFromDirectory(AnimationDirectory, _fileExt);<br>            <span class="kwrd">return</span> loadTempAnimationFileFromFileInfo((fiArr[randNum.Next(0, fiArr.Length - 1)]), Rows, Cols);<br>        }<br><br>        <span class="kwrd">private</span> Animation loadTempAnimationFileFromFileInfo(FileInfo fileInfo, <span class="kwrd">int</span> Rows, <span class="kwrd">int</span> Cols)<br>        {<br>            Console.WriteLine(<span class="str">&quot;Animation File: &quot;</span> &#43; fileInfo.Name);<br>            Animation ani = <span class="kwrd">null</span>;<br>            <span class="kwrd">try</span><br>            {<br>                ani = <span class="kwrd">new</span> Animation();<br>                <span class="kwrd">if</span> (fileInfo.Extension == <span class="str">&quot;.ddf&quot;</span>)<br>                {<br>                    ddfAnimation ddfAnim = <span class="kwrd">new</span> ddfAnimation(fileInfo, Rows, Cols);<br>                    ddfAnim.LoadFile();<br>                    ani.setAnimationBuffer(ddfAnim.getAnimationBuffer());<br><br>                }<br>                <span class="kwrd">else</span><br>                {<br>                    pNerd.ddf.Pattern.Image img = <span class="kwrd">new</span> pNerd.ddf.Pattern.Image(fileInfo, <br>                             DiscoDanceFloor.FloorSettings.Rows, DiscoDanceFloor.FloorSettings.Cols);<br>                    img.LoadFile();<br>                    ani.setAnimationBuffer(img.getAnimationBuffer());<br>                }<br>            }<br>            <span class="kwrd">catch</span> (Exception ex0)<br>            {<br>            }<br>            <span class="kwrd">return</span> ani;<br>        }<br><br>        <span class="kwrd">void</span> randomTimer_Elapsed(<span class="kwrd">object</span> sender, System.Timers.ElapsedEventArgs e)<br>        {<br>            randomTimer.Enabled = <span class="kwrd">false</span>;<br>            Animation tempAnimationFile = <span class="kwrd">null</span>;<br><br>            <span class="kwrd">while</span> (tempAnimationFile == <span class="kwrd">null</span>)<br>            {<br>                tempAnimationFile = <br>                       loadTempAnimationFileFromFileArray(DiscoDanceFloor.FloorSettings.AnimationDirectory, <br>                       DiscoDanceFloor.FloorSettings.Rows, DiscoDanceFloor.FloorSettings.Cols);<br>            }<br><br>            updatingRandomAnimationFile = <span class="kwrd">true</span>;<br>            <span class="kwrd">lock</span> (randomAnimationFile)<br>            {<br>                randomAnimationFile = tempAnimationFile;<br>            }<br><br>            updatingRandomAnimationFile = <span class="kwrd">false</span>;<br>            randomTimer.Enabled = <span class="kwrd">true</span>;<br>        }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<h5>SUPER PHOTO HAPPY FUN PICTURE TIME!</h5>
<p>Here are some pictures of the software in virtual floor mode to give you a better understanding of what it actually generates.
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/fire.gif" width="485" border="0">
</p>
<p><b>Fire</b> </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/inner5.gif" width="485" border="0">
</p>
<p><b>Inner5</b> </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/inner4.gif" width="485" border="0">
</p>
<p><b>Inner4</b> </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/ring.gif" width="485" border="0">
</p>
<p><b>Ring</b> </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/gir.gif" width="485" border="0">
</p>
<p><b>Gir</b> </p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/cowbell.gif" width="485" border="0">
</p>
<p><b>Cowbell</b> </p>
<h5>Customize That App</h5>
<p>Last but not least is the FloorConfiguration class. You don't have to be a programmer to build the physical floor, so why should you be forced to recompile the application every time something needs to be tweaked? Not everyone has Visual Studio installed
 nor understands how to run it. For this reason, I created a simple XML structure to populate everything the software needs to run and talk to the floor, including disabling writing to the serial ports.</p>
<pre><code></code></pre>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">ddf</span><span class="kwrd">&gt;</span><br>    <span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">AnimationDirectory</span><span class="kwrd">&gt;</span>C:\ani\<span class="kwrd">&lt;/</span><span class="html">AnimationDirectory</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">DisableComPortWrite</span><span class="kwrd">&gt;</span>true<span class="kwrd">&lt;/</span><span class="html">DisableComPortWrite</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">BaudRate</span><span class="kwrd">&gt;</span>57600<span class="kwrd">&lt;/</span><span class="html">BaudRate</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">TilesPerRow</span><span class="kwrd">&gt;</span>16<span class="kwrd">&lt;/</span><span class="html">TilesPerRow</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">RowsPerModule</span><span class="kwrd">&gt;</span>4<span class="kwrd">&lt;/</span><span class="html">RowsPerModule</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;</span><span class="html">ComPorts</span><span class="kwrd">&gt;</span><br>            <span class="kwrd">&lt;</span><span class="html">ComPort</span><span class="kwrd">&gt;</span>COM4<span class="kwrd">&lt;/</span><span class="html">ComPort</span><span class="kwrd">&gt;</span><br>            <span class="kwrd">&lt;</span><span class="html">ComPort</span><span class="kwrd">&gt;</span>COM10<span class="kwrd">&lt;/</span><span class="html">ComPort</span><span class="kwrd">&gt;</span><br>            <span class="kwrd">&lt;</span><span class="html">ComPort</span><span class="kwrd">&gt;</span>COM11<span class="kwrd">&lt;/</span><span class="html">ComPort</span><span class="kwrd">&gt;</span><br>        <span class="kwrd">&lt;/</span><span class="html">ComPorts</span><span class="kwrd">&gt;</span><br>    <span class="kwrd">&lt;/</span><span class="html">configuration</span><span class="kwrd">&gt;</span><br><span class="kwrd">&lt;/</span><span class="html">ddf</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>It's a simple XML structure. However, not everyone understands that XML is case sensitive, and because I don't want to support issues such as &quot;comport is not the same as ComPort,&quot; I created a custom deserializer. I did want to use XmlSerializer to do this,
 which would have made my life a lot easier, but because I couldn't serialize without case sensitivity, I could not. I did still get to use XmlDocument, some simple XPath, and an XmlNodeList when building this configuration class.</p>
<pre><code></code></pre>
<pre class="csharpcode"><span class="kwrd">public</span> FloorConfiguration(<span class="kwrd">string</span> FilePath)<br>        {<br>            <span class="kwrd">if</span> (File.Exists(FilePath))<br>            {<br>                XmlDocument configFile = <span class="kwrd">new</span> XmlDocument();<br>                configFile.Load(FilePath);<br><br>                XmlNodeList configFileNodeList = configFile.SelectNodes(<span class="str">&quot;//ddf/configuration/*&quot;</span>);<br>                <span class="kwrd">for</span> (<span class="kwrd">int</span> i = 0; i &lt; configFileNodeList.Count; i&#43;&#43;)<br>                {<br>                    <span class="kwrd">switch</span> (configFileNodeList[i].LocalName.ToLower() )<br>                    {<br>                        <span class="kwrd">case</span> <span class="str">&quot;animationdirectory&quot;</span>:<br>                            AnimationDirectory = configFileNodeList[i].InnerText;<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">case</span> <span class="str">&quot;baudrate&quot;</span>:<br>                            BaudRate = Convert.ToInt32(configFileNodeList[i].InnerText);<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">case</span> <span class="str">&quot;tilesperrow&quot;</span>:<br>                            TilesPerRow = Convert.ToInt32(configFileNodeList[i].InnerText);<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">case</span> <span class="str">&quot;rowspermodule&quot;</span>:<br>                            RowsPerModule = Convert.ToInt32(configFileNodeList[i].InnerText);<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">case</span> <span class="str">&quot;disablecomportwrite&quot;</span>:<br>                            <span class="kwrd">bool</span> temp = <span class="kwrd">false</span>;<br>                            <span class="kwrd">bool</span>.TryParse(configFileNodeList[i].InnerText, <span class="kwrd">out</span> temp);<br>                            DisableComPortWrite = temp;<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">case</span> <span class="str">&quot;comports&quot;</span>:<br>                            <span class="kwrd">if</span> (configFileNodeList[i].HasChildNodes)<br>                            {<br>                                XmlNodeList _comPortsXmlNodeList = configFileNodeList[i].ChildNodes;<br>                                ModulesPerFloor = _comPortsXmlNodeList.Count;<br>                                _comPorts = <span class="kwrd">new</span> <span class="kwrd">string</span>[ModulesPerFloor];<br>                                <span class="kwrd">for</span> (<span class="kwrd">int</span> j = 0; j &lt; ModulesPerFloor; j&#43;&#43;)<br>                                {<br>                                    _comPorts[j] = _comPortsXmlNodeList[j].InnerText;<br>                                }<br>                            }<br>                            <span class="kwrd">break</span>;<br>                        <span class="kwrd">default</span>:<br>                            <span class="kwrd">throw</span> <span class="kwrd">new</span> ArgumentOutOfRangeException(<span class="str">&quot;configFileNodeList[i].LocalName&quot;</span>, <br>                                     configFileNodeList[i].LocalName, <span class="str">&quot;Value not supported&quot;</span>);<br>                    }<br>                }<br>            }<br>            <span class="kwrd">else</span><br>                <span class="kwrd">throw</span> <span class="kwrd">new</span> FileNotFoundException(<span class="str">&quot;XML configuration file could not be found&quot;</span>, FilePath);<br>        }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>The class also does a bunch of simple calculations. </p>
<h4>Ready For Prime Time? … Doubtful</h4>
<p>After almost six months of on and off again development on the software, it was finally time to let it run nonstop for over eight hours at a party. Now this normally isn't a problem; however, I only got the floor to a state where I could actually run the
 software outside of a theoretical environment a week before the party, and I still needed to do a ton of additional work on the physical part of the floor. The software worked fine and was stress tested without doing physical hardware writes.
</p>
<p>There were two major bugs that had to be resolved before the floor would work in a party situation for more than five minutes. The first was a serious bug. The firmware for the boards would send out error codes if something bad happens such as losing the
 ability write or read a sensor. The issue was reading the success code would actually fail itself. This causes everything to go poorly and cause the application to crash. My solution was if a board failed, I'd just reboot it. In the 2.0 firmware, this does
 causes a flicker effect on the dance floor. No one noticed this so I think I'm in the clear for now. Plus the floor has such a high frame rate, so I'm assuming most people just thought it was part of the animation. My friends were joking about seizures.</p>
<pre><code></code></pre>
<pre class="csharpcode"></pre>
<pre class="csharpcode">        <span class="kwrd">if</span> (responseFromModule != ddfCommon.ControlCodes.SUCCESS_CODE)<br>        {<br>            <span class="kwrd">char</span>[] reinitBit = <span class="kwrd">new</span> <span class="kwrd">char</span>[1];<br>            reinitBit[0] = Convert.ToChar(ddfCommon.ControlCodes.REINIT_CODE);<br><br>            <span class="kwrd">this</span>.WriteBuffer(reinitBit, <span class="kwrd">false</span>);<br>        }</pre>
<style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style><style type="text/css">
<!--
.csharpcode
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{margin:0em;
	width:100%;
	background-color:#f4f4f4}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>The hard thing about fixing the bug was that I had to be actually hooked into the floor. Coding on the floor is not terribly fun.
</p>
<p><img src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/fixthosedefects.gif" width="485" border="0">
</p>
<p>The second bug occurred when an animation failed to load while in the Random Animation mode. This was rather simple; I just attempted to load Animations until one actually loaded. A simple while loop took care of it.
</p>
<h4>Party!</h4>
<p>After a massive amount of work, it was time to show it off. Due to some of the comments people made on Slashdot when MIT released their video, I didn't post all the pictures or videos. People can make fun of me all they want for building this because I'll
 insult them right back. That said, I got an electric blue suit for the party and attempted to make disco lemonade but ended up making my own weird mixed drink.
</p>
<p><img alt="" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/918683/dance.gif" border="0">
</p>
<p>One interesting lesson I learned from the first party was to target the people that don't know you and challenge them to a dance-off. With the proper amount of trash talking, you'll win every time without even busting a move. This is good for me since I
 can't dance. </p>
<p>The ironic thing was most people thought I was joking about building the floor. I expect Party 2.0 to be far more of a blast with a lot more people.
</p>
<h4>Now What? We Rebuild It Faster and Stronger</h4>
<p>I want to recode the entire application. This application was never supposed to grow into what it did. I believe a few of the smaller issues with the application itself stem from the Beta 2 to RTM of Visual Studio 2005 conversion. They still linger and cause
 me some headaches. I also don't believe this current framework is extendable for the few new features I want to add in. Playlist support will be the biggest thing I want to add, along with some music tie-in visualizations. The current version does have some
 DirectSound in it but not what I really want. The performance gains are also things that are high on the to-do list. It consumes an ungodly amount of the processor. When loading some of the larger animations, you notice a slight slowdown on the floor. This
 should never happen. The floor should always take priority. I'm thinking about maybe getting a Windows Mobile 2005 cell phone that could use some very nice Web services. This will allow me to control the floor from my pocket and prevent my people from messing
 with my laptop since someone actually did close the application during the party. Why someone would close the program called &quot;Disco Dance Floor Application&quot; is beyond me.
</p>
<p>Like I said, it needs some refactoring. Coding this over six months instead of one or two big pushes caused the problem. I blame Christmas and my Xbox 360 for this.
</p>
<h4>The Chuck Norris of Conclusions</h4>
<p>So I managed to build a disco dance floor in 10 months. Now I need to find something cooler to trump myself with. There were lots of talks about integrating games. I haven't done that yet and I do love to play them, so that is an excellent possibility. Another
 project idea that I'm kicking around is a pressurized, automated bartender with some ungodly amount of drink possibilities.
</p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/fun/RSS&WT.dl=0&WT.entryid=Entry:RSSView:f5ebc5964d4649a6b8019e7600d9d937">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Thats-Totally-Disco</comments>
      <itunes:summary>



&amp;nbsp;
Set up your a disco dance floor in your home!



Clint Rutkas
Monkey See, Monkey Build - Usb Controlled Disco Dance Floor

Difficulty: Advanced
Time Required: 
Greater than 10 hours
Cost: Greater than $200
Software: C# 2005 Express Edition,

.NET Framework 2.0
Hardware: LEDs, Max7313 LED Intensity Controllers, tools for cutting wood (Dremel 400XPR, a DeWalt DW331 VS orbital Jig saw, and a Milwaukee 1-3/4 HP BodyGrip 5615 Router), drills, soldering
 iron (Weller WESD51 with a .031&amp;quot; Long Conical Tip), wood, wires, iBook, printed circuit boards (PCBs)
Download: Download








Many would ask, &amp;quot;Why build a disco dance floor?&amp;quot; My friends ask, &amp;quot;Why wasn&#39;t it done sooner?&amp;quot; The rest ask, after seeing it, how much I spent. Instead, I would like to ask, &amp;quot;Why didn&#39;t you build a computer-controlled disco dance floor running your own custom
 made software by yourself?&amp;quot; The idea isn&#39;t new and the printed circuit boards (PCBs) I got are from MIT. I&#39;m not claiming originality points here.
 
Simply put, I saw the disco dance floor and realized it had to be built. I took an electronics class in high school and a digital electronics class in college. I thought this would be a walk in the park. I&#39;m a quasi-smart 24-year-old programmer whose friends
 call &amp;quot;MacGyver&amp;quot; from time to time. How bad could it be? My theory was that girls like to dance. By having a dance floor in my apartment, more girls would magically appear there. A heavily flawed theory to stand on — which, let&#39;s not kid ourselves, is the best
 kind.  
When I got the boards, I was going to use an iBook to power the floor; however, the programmer in me didn&#39;t like how it acted or handled. I&#39;m a perfectionist and I knew I could whip something up that I&#39;d like. I have yet to create a perfect application,
 but here is what I&#39;ve done so far.  
After doing some research, I found out that .NET 2.0 had a built-in SerialPort class. I really wanted to play around with the new fr</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/Thats-Totally-Disco</link>
      <pubDate>Wed, 01 Nov 2006 06:47:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Thats-Totally-Disco</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/918683_100.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/918683_220.jpg" height="165" width="220"></media:thumbnail>      
      <dc:creator>Clint Rutkas</dc:creator>
      <itunes:author>Clint Rutkas</itunes:author>
      <slash:comments>22</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/Thats-Totally-Disco/RSS</wfw:commentRss>
      <category>Fun</category>
      <category>Hardware</category>
      <category>Disco</category>
    </item>    
</channel>
</rss>