Mike Hodnick's Blog http://kindohm.com/ Mike Hodnick's Blog audiolib.js v0.6.1 http://kindohm.com/2012/03/01/audiolib.js.0.6.1.html <p><img src="http://farm4.staticflickr.com/3214/3144857547_3cc598aa81.jpg" style="float: right;margin-left:5px;margin-bottom: 5px;width:350px;"> The powerful JavaScript audio API <a href="https://github.com/jussi-kalliokoski/audiolib.js">audiolib.js</a> was recently released as version v0.6.1. You can download the fully built library at <a href="https://github.com/jussi-kalliokoski/audiolib.js/downloads">github.com/jussi-kalliokoski/audiolib.js/downloads</a>.</p> <p>Many congrats go to <a href="https://github.com/jussi-kalliokoski">Jussi Kalliokoski</a>, who has done the bulk of the work on this project.</p> <p>I'm especially excited about this release because I actually contributed a small amount to it. I haven't been active in <em>useful</em> open source projects in the past, so actually seeing a release that includes code I worked on is very satisfying.</p> <p>If you are a synthesizer geek and a programmer, I highly recommend checking out audiolib.js. It's a big sandbox of fun!</p> <p>Oscilloscope image: <a href="http://www.flickr.com/photos/ke4/3144857547/">http://www.flickr.com/photos/ke4/3144857547/</a></p> The Death of Microsoft's MIX Conference http://kindohm.com/2012/01/24/DeathOfMIX.html <p>ZDNet's Mary-Jo Foley posted today that Microsoft's annual MIX conference is now dead: <a href="http://www.zdnet.com/blog/microsoft/microsoft-to-replace-mix-with-a-new-developer-conference/11721">Microsoft to replace Mix with a new developer conference</a>. Microsoft also announced it today on their official blog: <a href="http://blogs.technet.com/b/microsoft_blog/archive/2012/01/24/thinking-about-developer-events.aspx">Thinking About Developer Events</a>.</p> <p>I'm disappointed but not surprised that MIX is now gone. I think MIX has suffered from an identity crisis for the last few years. It originated as a conference heavy in web design and web development. It was a great conference for someone like me who likes to wear the programmer, UI/UX developer, and designer hats all at once. It was also web-centric.</p> <p>The last two times I went to the conference (2010 and 2011) I felt that the content really started to get away from design, user experience, and the web. The sessions were starting to get much more technical. Sure it was still web-centric, but I thought that the conference was starting to feel a lot like Dev Connections (except with major technology announcements). There was more emphasis on coding and programmer tooling.</p> <p>I think MIX felt a need to start appealing more to developers. I think they were right in doing so, but as a result MIX has lost its identity. It's become just another developer conference. How does it differ from other Microsoft dev conferences?</p> <p>Microsoft has also recognized that it can't distinguish MIX from other conferences:</p> <div style="background: #eeeeee;padding: 20px;"><em><p>"the notion that the 'web community' is somehow separate and distinct from the community of developers we care about no longer makes any sense."</p> <p>"Developers were confused, and asking us about which event to go to."</p></em> <p>Source: <a href="http://blogs.technet.com/b/microsoft_blog/archive/2012/01/24/thinking-about-developer-events.aspx"> http://blogs.technet.com/b/microsoft_blog/archive/2012/01/24/thinking-about-developer-events.aspx</a></p></div> <p>I think it makes sense for Microsoft to ditch a separate conference about the design and development of the web. It makes sense that web development would be a part of any developer conference. However, if Mary-Jo's prediction that Microsoft's developer events will be more focused on Windows 8 is true, then I think Microsoft might be taking a big risk: </p> <div style="background: #eeeeee;padding: 20px;"><em><p>"This year, instead, the company is planning a developer conference likely to focus on Windows 8."</p></em> <p>Source: <a href="http://www.zdnet.com/blog/microsoft/microsoft-to-replace-mix-with-a-new-developer-conference/11721"> http://www.zdnet.com/blog/microsoft/microsoft-to-replace-mix-with-a-new-developer-conference/11721</a></p></div> <p>Windows 8 will be a very important technology I will need to work with in my career, but I would hate to see web development take a back seat at Microsoft events. I think Microsoft needs to bet on the web just as much as it is betting on Windows 8. Web development will be just as big as native development on Windows 8.</p> <p>I've already started seeking out alternative conferences and venues where I can get my web fix (the <a href="http://www.meetup.com/JavaScriptMN/">JavaScriptMN</a> meetup group, as an example). I will likely still attend a Microsoft conference or two in the next year, but I'll be scrutinizing the value I get out of them more than in the past.</p> Compiling Minified Multi-File Javascript http://kindohm.com/2012/01/05/BuildingJavascript.html <style> pre{ overflow-x: hidden; overflow-y: hidden; } </style> <p>I've been doing a <em>lot</em> of Javascript development lately. For most of 2011 I focused almost exclusively on Kinect device development in WPF, and I really missed <strong>the web</strong> after all that time on the desktop. Now that I'm getting back in to web development, I've been really curious about Javascript as a language.</p> <p>While doing all this js development I quickly ran in to the issue of dealing with multiple js source files and combining them and minify-ing them into a single file. Most of what I've leanred about this process came from the <a href="https://github.com/jussi-kalliokoski/audiolib.js">audiolib.js project</a>. Jussi Kalliokoski has put together some great structure on that project. However, I've found very few posts on this topic so I thought I'd write about it.</p> <p>As we all know, a single minified .js file is optimal for the web. I've been working with about five bulky .js files and needed to shrink them down. Combining multiple source js files into a single file is trivial with <code>cat</code>:</p> <pre><code>cat src/*.js &gt; final.js</code></pre> <p>For my first dive into js minification, I've been using <a href="https://github.com/mishoo/UglifyJS">UglifyJS</a>. Most folks out there seem to be using the YUI or Closure compressors, but I thought I'd give UglifyJS a shot. UglifyJS is actually <em>built</em> in Javascript and runs on node.js. <a href="http://badassjs.com/post/971960912/uglifyjs-a-fast-new-javascript-compressor-for-node-js">This post on badassjs.com</a> suggests that UglifyJS is the fastest and <strong>best</strong> js minifier out there, but I'll leave the performance and language wonks out there to be the judge of that.</p> <p>Install UglifyJS:</p> <pre><code>npm install uglify-js</code></pre> <p>Running UgilifyJS is cake:</p> <pre><code>uglifyjs final.js > final.min.js</code></pre> <p>And poof, we've now combined and minified multiple js files into a single file!</p> <h3>Module Wrappers</h3> <p>Wait, there's a little more to the story. In my js development I've been working on a re-usable, extendable <a href="http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth">Javascript module</a>. All of the objects in my js source files needed to be wrapped inside of a module. With a single file this is obviously easy. But how do you do this with multiple js source files?</p> <pre><code>var LLAMAMODULE = (function() { var myLlama = {}; // content of multiple source files go here // uhhhh, how do I do this? return myLlama; }());</code></pre> <p>The answer is to create starting and ending wrapper .js files and include them in the right order when using <code>cat</code>:</p> <pre><code>// wrapper-start.js var LLAMAMODULE = (function(){ var myLlama = {}; </code></pre> <pre><code>// wrapper-end.js return myLlama; }());</code></pre> <p>When you use <code>cat</code>, just make sure to place the wrappers appropriately:</p> <pre><code>cat src/wrapper-start.js src/*.js src/wrapper-end.js &gt; final.js</code></pre> <p>BAM, now you've got a single file with all your awesome stuff wrapped in to a module.</p> <h3>Putting it together with Make and a test page</h3> <p>Now how do you test your js code in a browser? I created a makefile so that I can compile my Javascript on demand:</p> <pre><code>all: lib/final.min.js lib/final.js: src/wrap-start.js src/*.js src/wrap-end.js mkdir lib/ -p cat $^ &gt; $@ %.min.js: %.js uglifyjs $^ &gt; $@</code></pre> <p>My js code now resides inside <code>lib/</code>, and I can reference it from an HTML page (for testing, or for your real pages):</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="../lib/final.js"&gt;&lt;/script&gt; &lt;/head&gt; ... &lt;/html&gt;</code></pre> <p>It should be obvious, but don't reference the minified js when doing tests or debugging. You'll be spending a lot of time banging your head against the wall trying to find those rows and columns and reconciling minified var names!</p> <p>In summary:</p> <ul> <li>Use <code>cat</code> to combine multiple js files together</li> <li>Use wrapper .js files for modules</li> <li>Use UglifyJS (or your favorite minifier) to minify your js</li> <li>Use a makefile (or another flavor of scripting) for concatenation and minification</li> <li>Don't reference the minified js when testing or debugging</li> </ul> <p>Happy minify-ing!</p> The End of Browser Plugins, First Hand http://kindohm.com/2011/12/22/NoPluginsRequired.html <script src="/hodsmedia/audiolib.min.js" type="text/javascript"></script> <script type="text/javascript"> var dev, osc, lfo, playing; $(document).ready(function () { $('#playButton').click(function () { playing ? stop() : play(); }); dev = audioLib.AudioDevice(audioCallback, 2); osc = audioLib.Oscillator(dev.sampleRate, 440); osc.waveShape = 'triangle'; lfo = audioLib.Oscillator(dev.sampleRate, 1.0); osc.addAutomation('frequency', lfo, .9, 'additiveModulation'); }); function play() { playing = true; $('#playButton').html('Stop'); } function stop() { playing = false; $('#playButton').html('Play'); } function audioCallback(buffer, channelCount) { if (playing) { lfo.generateBuffer(buffer.length / channelCount); osc.append(buffer, channelCount); } } </script> <p>Until right about now, I've thought that plugins like Flash and Silverlight would have a place in this world. Click the button below. It will play a sound generated from a Javascript-based digital audio synthesis library. No plugin required.</p> <p><button id="playButton">Play</button> <em>Put your headphones on first!</em></p> <p>The audio synthesis is performed with <a href="http://audiolibjs.org">audiolib.js</a>. audiolib.js can also do some crazy stuff with PCM/mp3 encoding, audio recording, and it even has a node.js install. Did I mention that no browser plugin is required?</p> <p>Here's the code, based off of one of their tutorials:</p> <pre><code>var dev, osc, lfo, playing; $(document).ready(function () { $('#playButton').click(function () { playing ? stop() : play(); }); dev = audioLib.AudioDevice(audioCallback, 2); osc = audioLib.Oscillator(dev.sampleRate, 440); osc.waveShape = 'triangle'; lfo = audioLib.Oscillator(dev.sampleRate, 1.0); osc.addAutomation('frequency', lfo, .9, 'additiveModulation'); }); function play() { playing = true; $('#playButton').html('Stop'); } function stop() { playing = false; $('#playButton').html('Play'); } function audioCallback(buffer, channelCount) { if (playing) { lfo.generateBuffer(buffer.length / channelCount); osc.append(buffer, channelCount); } } </code></pre> A New Career Chapter http://kindohm.com/2011/12/05/NewChapter.html <p><img src="/hodsmedia/crossroads.jpg" alt="crossroads" style="float: right; margin-left: 10px; margin-bottom: 10px;"/> Almost exactly seven years ago, I joined Inetium (now known as Avtex) as a .NET consultant. In that seven years I've been able to work on some outstanding projects and also work with technologies that emerged over that time. I've done work on Kinect motion-based apps, Silverlight out-of-browser tablet apps, Windows Phone 7 apps, ASP.NET MVC web sites hosted in Windows Azure, and a large variety of (gasp!) SharePoint projects.</p> <p>Most importantly, I've met so many great people in that seven years who I have been able to work with as co-workers. Never have I enjoyed working side by side with other people as I have at Inetium and Avtex. </p> <p>My time at Avtex has come to an end. My last day at Avtex was 12/2/2011. I am very happy to now begin a new career as an independent consultant!</p> <p>My ambition to work independently began years ago. The consulting and programming stars have all aligned and I decided that right now was the right time to take the leap and go into business for myself.</p> <p>I can't thank enough my peers and friends who helped me research and make this decision to go independent. The process of making the decision took much more thought than I expected. I've learned so much from other consultants about finances, networking, and running a business over the past few months. For those of you who helped, thank you so much!</p> <p>I look forward to what 2012 will bring. I'm sure there will be some bumps along the way as I learn the ropes of being independent, but at the same time I hope it will be satisfying and rewarding.</p> <p>Enjoy the rest of 2011, and I'll see you for more exciting times in 2012!</p> Viewbox for Full Screen Proportional WPF Apps http://kindohm.com/2011/11/08/FullScreenProportionalWPF.html <p>Over the last year while developing a large handfull of Kinect-based WPF apps, I've had to deal with the issue of making sure the app content consumes the same real estate on the target display as it does on my dev machine during development. One bonus challenge is that my apps have had to run on multiple target machines with <em>different resolutions</em>. I'm going to show how I've used the WPF Viewbox to get my apps to look the same on my dev machine as they do on the final display.</p> <p>Let me start with an example to drive home the real problem. My dev machine runs at a resolution of 1920 x 1200 pixels (16:10 ratio). For those of you with poor eyesight this results in excrutiatingly small text, but that is a different story. Let's say I'm working on an application that will run at a 10:16 portrait orientation, but I don't necessarily know what the actual pixel resolution will be of the target machine (or machines). Let's take that a step further - I want my app to look good in a portrait orientation on <em>any</em> 10:16 display - whether that's 1200x1920, 900x1440, or even 375x600.</p> <p>I already have two issues here:</p> <ol> <li>My dev machine doesn't run in portrait orientation</li> <li>I need to support an unknown number of target 10:16 resolutions</li> </ol> <p>Let's see what this looks like on the dev machine and on a target machine. First, here's the app under development on my dev machine:</p> <pre style="overflow: auto; max-height: 500px;"><code>&lt;Window x:Class="Stretchy.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" WindowState="Maximized" WindowStyle="None"&gt; &lt;Grid&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition/&gt; &lt;RowDefinition/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition/&gt; &lt;ColumnDefinition/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Border Grid.Row="0" Grid.Column="0" Background="#66FF0000"&gt; &lt;TextBlock Text="Upper Left" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/&gt; &lt;/Border&gt; &lt;Border Grid.Row="0" Grid.Column="1" Background="#6600FF00"&gt; &lt;TextBlock Text="Upper Right" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/&gt; &lt;/Border&gt; &lt;Border Grid.Row="1" Grid.Column="0" Background="#660000FF"&gt; &lt;TextBlock Text="Lower Left" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/&gt; &lt;/Border&gt; &lt;Border Grid.Row="1" Grid.Column="1" Background="#66FFFF00"&gt; &lt;TextBlock Text="Lower Right" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;/Window&gt;</code></pre> <p> <img src="/hodsmedia/wpf-stretch-01.png" alt="VS wpf app"/> </p> <p>Now let's see what this looks like at runtime on a portrait display at 1200 x 1920 pixels:</p> <p> <img src="/hodsmedia/wpf-stretch-01-real.png" alt="VS wpf app"/> </p> <p>The difference of how the window looks like in Visual Studio compared to how it actually renders in Windows at runtime is very different. Obviously the orientation and window size is different, but more importantly things like the font size and the proportions and sizes of the colored backgrounds are different. </p> <p>I could certainly change the window size in Visual Studio to match my 1200 x 1900 10:16 portrait orientation, but then my content size hasn't been changed to match this overall size change (the text is tiny): </p> <pre><code>&lt;Window x:Class="Stretchy.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="1920" Width="1200" WindowState="Maximized" WindowStyle="None"&gt; &lt;!-- ... --&gt; &lt;/Window&gt;</code></pre> <p> <img src="/hodsmedia/wpf-stretch-02.png" alt="VS wpf app"/> </p> <p>I could continue to tweak the content sizes (text, images, grids, borders, panels, text boxes, rows, columns... the list goes on!!) to match my new app window size, but this won't work for us. Remember that I want to support <em>any</em> 10:16 ratio resolution? I could potentially create a new set of styles to match each resolution and load the correct styles at runtime, but that's just crazy talk if you ask me. This solution just doesn't scale.</p> <p>The solution is to use a Viewbox and to size its child element with the same ratio of your target display. At runtime your Viewbox will make sure your content <em>appears</em> at the same proportion at design time as it does at runtime <em>on any size display.</em></p> <p>Let's take a look at the new XAML code with the Viewbox:</p> <pre><code>&lt;Window x:Class="Stretchy.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" WindowState="Maximized" WindowStyle="None"&gt; &lt;Viewbox&gt; &lt;Grid Width="375" Height="600"&gt; ... &lt;/Grid&gt; &lt;/Viewbox&gt; &lt;/Window&gt;</code></pre> <p> <img src="/hodsmedia/wpf-stretch-03.png" alt="VS wpf app"/> </p> <p>Notice that in Visual Studio I've sized the Grid inside the Viewbox to be only 375 x 600. It's still a 10:16 ratio, just really small. I'm making it small here to make a point that you can design and develop your app at <em>one</em> size and have it render the "same" but at a completely <em>different</em> size at runtime.</p> <p>Also notice above the size of the text. It's big enough to read.</p> <p>Now let's see what this app with the Viewbox looks like on a 1200 x 1900 display:</p> <p> <img src="/hodsmedia/wpf-stretch-03-real.png" alt="VS wpf app"/> </p> <p>Viola![1] The app now appears <em>the same</em> at runtime as it does at design time! Your life as a developer has been made easy! You can now place text, images, panels, or any content you want in your app and it will retain its proportional look when viewed at run time.</p> <p>Just to prove that this works at any screen resolution. Here is a screen shot of the same app running at 900 x 1440 (10:16) with no code change. I realize that I can't prove that I'm <em>really</em> changing my screen resolution to obtain this screen shot, but just trust me:</p> <p> <img src="/hodsmedia/wpf-stretch-03-real2.png" alt="VS wpf app"/> </p> <p>The app has retained its overall proportions even though the screen size has changed and no code changes were required. The Viewbox is the silver bullet here as it stretches its content to fit whatever the size of its parent is. It's parent in this case is the main window, which is maximized with no border.</p> <div>Traditionally I've seen the Viewbox used a lot for graphics, but it comes in handy for other WPF content too. Happy coding! <br/><br/></div> <p>[1] The correct word is "voil&#224;", but in a tribute to my friend Sarah, who phonetically says "viola" when she means "voilą", I used the name of the instrument here.</p> MN Wild in Regulation http://kindohm.com/2011/10/14/MNWildNoWinInRegulation.html <p><img src="/hodsmedia/mnwildyuno.png" alt="MN Wild"/></p> The Engage Event - Kinect and more http://kindohm.com/2011/09/06/EngageEvent.html <p>On September 14th at 4:00 PM, Avtex will be co-hosting an event called <a href="http://engageevent.net/">Engage</a>. It will be held at the Microsoft Technology Center in Minneapolis and will feature a variety of unique applications that my team and I at Avtex have developed - six of which leverage the Kinect sensor.</p> <div style="padding-left: 20px;padding-right: 20px; font-style: italic; border: dashed 1px #cccccc;"> <p>The Engage event is a unique experiential event designed to educate marketing, customer experience and technology professionals about new and unique customer engagement methods leveraging emerging technologies.</p> <p>The event will focus on creating unique in-person experiences by combining engaging physical displays from nParallel with technology solutions from Avtex.</p> <p>Join us for wine and appetizers and to see how the physical and digital worlds come together to help you better connect with your customers.</p> </div> <p>If you're interested in seeing what we've built, you can <strong>register today</strong> at <a href="http://engageevent.net/">www.engageevent.net</a>.</p> <p></p> Programming a Kinect Bounding Box http://kindohm.com/2011/08/02/KinectBoundingBox.html <p>Source code: <a href="https://github.com/kindohm/kinect-bounding-box">https://github.com/kindohm/kinect-bounding-box</a></p> <p>In my last post and screen cast I <a href="http://kindohm.com/2011/07/20/KinectMvvm.html"> showed how to implement the Kinect runtime as part of a Model-View-ViewModel (MVVM) pattern</a>. In this post and accompanying screen cast I will build on that application by adding a "bounding box" feature that limits control of the application depending on where the user is standing.</p> <iframe width="560" height="349" src="http://www.youtube.com/embed/oRmZ9SOASN0" frameborder="0" allowfullscreen></iframe> <p>Imagine a scenario where your Kinect-based application is running in an area where there is a lot of "noisy" user traffic in the background. It could be in a lobby, a trade show booth, a career fair, or a point of sale counter to name just a few scenarios. You obviously don't want users in the background to control your application. You only want users who <em>want</em> to control your application to actually control it.</p> <p style="text-align:center;"><img src="/hodsmedia/boundingboxexample.png" alt="example"/></p> <p>There is more than one way to solve this problem. Perhaps the easiest way is to limit where a user is allowed to stand in order to control and interact with the application. I call this method <strong>The Bounding Box</strong> method. This method works great if you have <em>multiple instances</em> of the application running side by side and if you don't want one instance to allow control by the user of the second instance.</p> <p>Building on the ViewModel used in my previous example, all of the logic you need to determine if a user is within the bounding box can be executed with a few new properties and one method:</p> <pre><code>double minDistanceFromCamera; public double MinDistanceFromCamera { get { return this.minDistanceFromCamera; } set { this.minDistanceFromCamera = value; this.OnPropertyChanged("MinDistanceFromCamera"); } } double boundsWidth; public double BoundsWidth { get { return this.boundsWidth; } set { this.boundsWidth = value; this.OnPropertyChanged("BoundsWidth"); } } double boundsDepth; public double BoundsDepth { get { return this.boundsDepth; } set { this.boundsDepth = value; this.OnPropertyChanged("BoundsDepth"); } } bool userIsInRange; public bool UserIsInRange { get { return this.userIsInRange; } set { this.userIsInRange = value; this.OnPropertyChanged("UserIsInRange"); } } bool GetUserIsInRange( Microsoft.Research.Kinect.Nui.Vector torsoPosition) { return torsoPosition.Z &gt; this.MinDistanceFromCamera &amp; torsoPosition.Z &lt; (this.MinDistanceFromCamera + this.BoundsDepth) &amp; torsoPosition.X &gt; -this.BoundsWidth / 2 &amp; torsoPosition.X &lt; this.BoundsWidth / 2; } </code></pre> <p>That <code>GetUserIsInRange</code> method is the key to this entire feature. It returns whether or not the user's position (assumed to be the user's torso or "spine" join) is within the bounding box. The bounding box is based on the X and Z coordinates in front of the Kinect sensor.</p> <p>With these rules, you can control what the user can do in the application. For example, in my basic MVVM app I can control when the user has or does not have control of the ellipse on the screen:</p> <pre><code>void kinectService_SkeletonUpdated( object sender, SkeletonEventArgs e) { this.UserIsInRange = this.GetUserIsInRange(e.TorsoPosition); // only perform this ViewModel logic if // user is in range if (this.UserIsInRange) { var midpointX = App.Current.MainWindow.Width / 2; var midpointY = App.Current.MainWindow.Height / 2; this.HandOffsetX = midpointX + (e.RightHandPosition.X * 500); this.HandOffsetY = midpointY - (e.RightHandPosition.Y * 500); } } </code></pre> <p>Using this logic, you can make a useful UI configuration feature where the bounding box dimensions can be configured in real time as you receive visual feedback about where you are with respect to the bounding limits:</p> <p style="text-align:center;"><img src="/hodsmedia/KinectBoundingBox.png" alt="Kinect Bounding Box" /></p> <p>In the screen shot above, the black rectangle represents a bird's eye view of the bounding box. The green circle is the user's position and it moves as the user moves in front of the Kinect camera. If the user steps outside the bounds, the green circle turns red. This type of a feature is highly valuable in a Kinect application when you need to configure limits on where a user is allowed to have control.</p> <p>The source code and screen cast show how to implement the bounding logic in an MVVM pattern as well as how to implement the visual bounding box UI configuration screen.</p> <p>Happy Kinect coding!</p> Kinect Sensor in an MVVM App http://kindohm.com/2011/07/20/KinectMvvm.html <style> pre code{ font-size: 15px; } </style> <p>Source code: <a href="https://github.com/kindohm/kinect-mvvm">https://github.com/kindohm/kinect-mvvm</a></p> <p>Now that the official Kinect SDK is out I've been looking for good patterns when incorporating it into Windows 7 applications. The Model-View-ViewModel (e.g. MVVM) pattern is my pattern of choice for WPF applications and I wanted to demonstrate how I incorporate the Kinect runtime within the MVVM pattern.</p> <p>I've created a screencast walk-through of how you can incorporate the Kinect runtime into MVVM (or read on below for a brief description of the approach).</p> <iframe width="560" height="349" src="http://www.youtube.com/embed/Rs7sQqljr3Q" frameborder="0" allowfullscreen></iframe> <p>The main concept of incorporating the Kinect runtime into MVVM is to abstract all of its behaviors out into its own service interface:</p> <pre><code>public interface IKinectService { }</code></pre> <p>In my approach, a simple event is defined in the interface that is used to signal when some Kinect runtime data has become available, such as new skeleton information:</p> <pre><code>public interface IKinectService { event EventHandler&lt;SkeletonEventArgs&gt; SkeletonUpdated; }</code></pre> <p>Basically, the Kinect service just fires events whenever it wants (probably hundreds of times per second).</p> <p>At this point in the Kinect SDK's lifetime, failing to "uninitialize" it causes problems and can sometimes require a reboot. Thus, putting some methods on the interface to allow us to deal with starting up and shutting down the runtime would be helpful:</p> <pre><code>public interface IKinectService { event EventHandler&lt;SkeletonEventArgs&gt; SkeletonUpdated; void Initialize(); void Uninitialize(); }</code></pre> <p>From there we can implement a basic KinectService:</p> <pre><code>public class ConcreteKinectService : IKinectService { Runtime runtime; public void Initialize() { runtime = new Runtime(); runtime.SkeletonFrameReady += new EventHandler&lt;SkeletonFrameReadyEventArgs&gt;(runtime_SkeletonFrameReady); runtime.Initialize(RuntimeOptions.UseSkeletalTracking); } void runtime_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e) { var skeleton = e.SkeletonFrame.Skeletons .Where( s =&gt; s.TrackingState == SkeletonTrackingState.Tracked) .FirstOrDefault(); if (skeleton == null) return; var position = skeleton.Joints[JointID.HandRight].Position; if (this.SkeletonUpdated != null) { this.SkeletonUpdated(this, new SkeletonEventArgs() { RightHandPosition = position }); } } public void Cleanup() { if (runtime != null) { runtime.Uninitialize(); } } public event EventHandler&lt;SkeletonEventArgs&gt; SkeletonUpdated; }</code></pre> <p>This IKinectService can now be injected into a ViewModel whenever it is created. Using the "Locator" pattern from the MVVM Light toolkit, this is done when the locator constructs its ViewModels:</p> <pre><code>public class ViewModelLoader { static ViewModel viewModelStatic; static IKinectService kinectService; public ViewModelLoader() { kinectService = new ConcreteKinectService(); var isInDesignMode = ...; // detect if running in VS designer if (!isInDesignMode) kinectService.Initialize(); } public static ViewModel ViewModelStatic { get { if (viewModelStatic == null) { viewModelStatic = new ViewModel(kinectService); } return viewModelStatic; } } public ViewModel ViewModel { get { return ViewModelStatic; } } public static void Cleanup() { if (viewModelStatic != null) { viewModelStatic.Cleanup(); } kinectService.Cleanup(); } }</code></pre> <p>A static copy of the ViewModel is used so that it can be "cleaned up" easily from any point in the application. This cleanup eventually unhooks events and uninitializes the Kinect runtime further down the call stack.</p> <p>There are a variety of benefits to this approach:</p> <ol> <li>The Kinect runtime logic is de-coupled from the ViewModel and View/UI</li> <li>Multiple types of Kinect services could be implemented. Internally, a concrete IKinectService could use either event-based or polling-based skeleton tracking. With an IKinectService you could swap out one for the other and the application won't care.</li> <li>The Kinect service can be mocked during unit testing.</li> </ol> <p>Hopefully this approach can help make your MVVM-based Kinect apps more fun to code! Enjoy!</p> WPF 3D Manipulation with Kinect http://kindohm.com/2011/07/05/WPF3DManipulationWithKinect.html <p>Download source code: <a href="http://kindohm.com/files/Kinect3dManipulation.zip">Kinect3dManipulation.zip</a></p> <p>I've created an implementation of a Kinect NUI Trackball which can be used for manipulating a camera around WPF 3D scenes. This "HandsTrackball" is adapted from the Trackball class included in the source code for <a href="http://3dtools.codeplex.com">WPF 3DTools</a>. The original Trackball class allows you to use the mouse to rotate around a WPF 3D scene.</p> <p>My HandsTrackball basically maps hand movements to what the original Trackball uses as mouse points. Some new ground rules as well as as some Kinect depth-to-screen point calculations are applied in order to make this all work.</p> <p>This video explains how the HandsTrackball is used:</p> <iframe width="560" height="349" src="http://www.youtube.com/embed/fwegNqzmG0A" frameborder="0" allowfullscreen></iframe> <p>The user's left or right hand can be used to rotate around the model. When the user moves their hand, a transform is applied to the camera viewing the 3D scene (the camera moves and the objects in the scene do not move). The camera only moves if the user's hands are at least a minimum distance away from the user's torso. The user can only move the camera when their hand is deliberately extended out from their body. This is a key constraint in order to make the HandsTrackball usable. It allows the user to put their hand(s) down to stop changing the camera angle and prevents accidental movement.</p> <p>The code used to determine whether the app can move or zoom is trivial:</p> <pre><code>this.rightHandCanMove = Math.Abs(this.torso.Z - this.rightHand.Z) >= MinTorsoDistance & Math.Abs(this.torso.Z - this.leftHand.Z) < MinTorsoDistance; this.leftHandCanMove = Math.Abs(this.torso.Z - this.leftHand.Z) >= MinTorsoDistance & Math.Abs(this.torso.Z - this.rightHand.Z) < MinTorsoDistance; this.canZoom = Math.Abs(this.torso.Z - this.rightHand.Z) >= MinTorsoDistance & Math.Abs(this.torso.Z - this.leftHand.Z) >= MinTorsoDistance;</code></pre> <p>To zoom, both hands are extended. When both hands reach the minimum distance away from the torso, the user performs a "pinch" gesture with their hands and arms to zoom in and out. The right hand's X position is used to control the zoom amount as it moves back and forth.</p> <p>Much of this code, such as mapping skeleton coordinates to screen coordinates, is borrowed from existing Kinect sample code which you can download from the <a href="http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/">Kinect for Windows SDK beta site</a>.</p> <p>The most interesting aspect of my NUI trackball approach was to use a combination of both event handling and polling to obtain and process the skeleton and depth data. I chose to use event handling for lightweight operations, such as refreshing Kinect data that must be always kept current. I used polling at timed intervals for operations that required more CPU, such as vector math and skeleton-to-screen mapping. In the source code, the Kinect class handles the event-based operations. HandsTrackball uses a DispatcherTimer to handle the polling at given intervals.</p> Kinect SDK Released http://kindohm.com/2011/06/16/kinectsdk.html <p>Goodbye PrimeSense, OpenNI, and NITE. It was nice knowing you. We had a lot of fun together *sniff*</p> <p style="font-size: 150%;">Hello Microsoft Kinect SDK!!!!</p> <p><a href="http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/download.aspx">Download the official Kinect SDK</a></p> <p>Looks like I'm going to have a busy next few weeks!</p> Build Windows - with or without Silverlight? http://kindohm.com/2011/06/07/build-windows.html <p><img src="/hodsmedia/build_logo.png" alt="Build Windows" style="float: right; margin: 10px;" /> Microsoft isn't making their developer message any clearer with their newly announced Build Windows conference taking place on September 13, 2011. </p> <p>Last week, Steven Sinofsky of Microsoft <a href="http://www.engadget.com/2011/06/01/microsoft-unveils-windows-8-tablet-prototypes/">previewed Windows 8</a>. The main developer message out of the preview is that developers would write Windows 8 apps with HTML and JavaScript (HTML&J). This message was either a mistake, bad PR and marketing planning, or a sign of the death of Silverlight. Either Silverlight was accidentally forgotten in the message or deliberately left out. I really have a hard time believing that HTML&J will be the main technologies used to deliver software on Windows 8. They aren't "native" technologies, and the richest apps are developed using native tech like the .NET CLR. Regardless of what the truth will be about Windows 8 app development, Silverlight developers (not including me) across the world are re-considering their careers right now. Over the past year (the MIX11 conference most recently) there have been a lot of doubts and shadows cast over Silverlight and its future.</p> <p>The Build Windows conference makes Silverlight's future even murkier:</p> <div style="margin-right: 30px; margin-left: 30px;"> <p><em>Hear how the UI was designed to work seamlessly with a diversity of devices and form factors. Go behind the scenes and learn all about the new app model that allows you to create powerful new apps. All while retaining the ability to use your existing apps. Web-connected and web-powered apps built using HTML5 and JavaScript have access to the power of the PC. Touch-optimized browsing, with the full power of hardware-accelerated Internet Explorer 10 transforms your experiences with the web. BUILD is the first place to dive deep into the future of Windows.</em></p> <p><em><a href="http://www.buildwindows.com/">http://www.buildwindows.com</a></em></p> </div> <p>Yes, I get that there is something about HTML&J "having access to the power of the PC", but I'm not sold on that. At MIX11, all we really saw of that was integration with the Windows 7 taskbar. A lot can happen in six months though. Maybe HTML&J will really be that cool on Windows 8. I remain a skeptic. In any case, with the announcement of Build Windows, Silverlight looks like it is a crying, lost child in the store because it can't find daddy Microsoft. The question is whether daddy has started the car and driven off yet or if he'll come running back in to the store.</p> <p>...I think daddy is walking very slowly back in to the store.</p> <p><span style="color: red; font-weight: bold;">UPDATE:</span> I just came across this post on "Jupiter", Microsoft's next XAML-based UI platform for Windows 8: <a href="http://www.zdnet.com/blog/microsoft/more-on-microsoft-jupiter-and-what-it-means-for-windows-8/8373">More on Microsoft 'Jupiter' and what it means for Windows 8</a>. Yes, it appears that daddy is coming back in to the store... slowly. It looks like Microsoft's neglect of Silverlight has been more about bad PR and marketing timing than anything else. Maybe they have a good reason to keep the tech a secret right now, but they're doing it at the expense of their developer base's confidence in their own tools while hyping HTML&J.</p> Halo 4 and Halo CE Remake http://kindohm.com/2011/06/06/Halo4.html <p>I was certain that there would not be any more Halo video games after Halo: Reach. I was wrong. At the E3 convention today it was announced that Halo 4 is planned for release at the end of 2012.</p> <p style="text-align: center;"><img src="/hodsmedia/halo4.png" alt="Halo 4"/></p> <p>The scree grab above was taken from this video: <a href="http://gamevideos.1up.com/video/id/33823" target="_blank">Halo 4 Trailer Official E3 2011</a></p> <p>The one caveat is that Bungie is not developing Halo 4. 343 Industries will be the developer behind the Halo 4 title. My gut tells me that the game will look and feel subtly different since it won't be coming from Bungie... for better or for worse.</p>l <p>The game appears to pick up where Halo 3 left off: the Master Chief (in cryosleep) is in a half-destroyed space craft with Cortana, his companion AI, as they are approaching an unfamiliar world, species, or technology.</p> <p>But that's not all that is news in the Halo universe...</p> <h3>Halo: Combat Evolved Anniversary Edition</h3> <p>A complete re-make of the original Halo: Combat Evolved title will be released Fall 2011! The original Halo game is ten years old, and this anniversary edition will hopefully be polished with new graphics and improved gameplay. The anniversary edition will also ship with remakes of seven of the original Halo: CE multiplayer maps, as well as online co-op campaign.</p> <p>It's not clear to me who is developing the Halo: CE remake.</p> <p>The Halo: CE remake might not be much more than a money-making opportunity to take advantage of us nostalgic Halo fanboys, but so be it. I'm totally going to buy it.</p> <p>I'm most excited about Halo 4 - there are so many unanswered questions from Halo 3 that might get answered. For that matter, there will be many more questions raised after playing Halo 4!</p> <p>---</p> <p>Also at E3 - an XBox 360 and Kinect version of Minecraft. Really? That sounds exhausting just thinking about it!</p> NHL Atlanta Thrashers Move To Winnipeg http://kindohm.com/2011/05/31/AtlantaToWinnepeg.html <p>It looks like the deal is final. The NHL's Atlanta Thrashers will move to Winnipeg: <a href="http://www.startribune.com/sports/blogs/122860588.html">http://www.startribune.com/sports/blogs/122860588.html</a></p> <p style="text-align: center;"><img src="/hodsmedia/jets.jpg" alt="Jets" /></p> <p>I was disappointed when the Jets left Winnipeg back in 1996 and now I'm glad a team will be coming back. I assume the Thrashers will be re-named back to the Jets after they move. I imagine the Jets would be in the Western conference with the Wild after a league re-alignment takes place in a few years, which would be cool. The league re-alignment in general is a big deal and the addition of a Winnipeg team will really change things up. Looks like the Wild may end up moving from the Northwest to the Central division and play with teams like Chicago, Detroit, Columbus, and St. Louis.</p> Twin Cities Code Camp Theme Song and Video http://kindohm.com/2011/04/28/TCCCThemeSong.html <p>I'm proud to announce the official <a href="http://www.twincitiescodecamp">Twin Cities Code Camp</a> theme song!</p> <p>Download: <a href="http://kindohm.com/files/TCCCThemeSong.mp3">TCCCThemeSong.mp3</a> [3.7 MB]</p> <p>Lyrics:</p> <p><em>If you're really into software development<br/> Twin Cities Code Camp!<br/> and you're near the Minneapolis/St. Paul area<br/> Twin Cities Code Camp!<br/> <br/> You live and breathe code every day or you'll die<br/> You write unit tests just to save your life<br/> Windows or Mac you just don't care<br/> <br/> You want code? YEAH!<br/> You want code? YEAH!<br/> You want code? YEAH!<br/> You want code? YEAH!<br/> <br/> Wanna learn somethin' new, don't wanna get complacent<br/> Twin Cities Code Camp!<br/> Your apps are nothing short of magnificent<br/> Twin Cities Code Camp!<br/> <br/> You live and breathe code every day or you'll die<br/> You write unit tests just to save your life<br/> Windows or Mac you just don't care<br/> <br/> You want code? YEAH!<br/> You want code? YEAH!<br/> You want code? YEAH!<br/> You want code? YEAH!<br/> <br/> Twin Cities Code Camp!<br/> </em></p> <p>The song was written by yours truly. I recorded drums, bass, guitars, and vocals, and <a href="http://www.jasonbock.net">Jason Bock</a> shredded out the lead guitars. Last but not least the Twin Cities Code Camp Chorus (a.k.a. the attendees from the event on 4/9/2011) provided some epic group shouting! Thanks to everybody who participated!</p> <p>But wait, there's more! We also have a music video... in high definition even!</p> <iframe width="560" height="349" src="http://www.youtube.com/embed/L1Q1gw8fhUE" frameborder="0" allowfullscreen></iframe> <p>Wow! Epic! Not even a pack of llamas can beat that!</p> <p>In addition to the music video, a whole set of interviews are also available from April 9th and 10th, 2001 on our <a href="http://www.youtube.com/user/TwinCitiesCodeCamp">Twin Cities Code Camp YouTube Channel</a>.</p> <p>Thanks to everyone who attended that weekend! See you this fall at TCCC #11!</p> Know How to Write Code! http://kindohm.com/2011/04/26/AvtexDeveloperPositions.html <p>At <a href="http://www.avtex.com">Avtex</a> we have a variety of .NET consultant/developer positions open. I want to take a moment and describe the skills we need for developers at Avtex:</p> <ol><li><strong>Know how to write code</strong></li></ol> <p>Ok, so that's only one, but please, please, please do not apply for a programming job if you do not know how to write code!</p> <p>What exactly does it mean to "know how to write code"? It's more than just knowing how to sling the syntax of your favorite language. Knowing how to write code means being a programmer, and I think Andrew Hunt and David Thomas in <a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X">The Pragmatic Programmer</a> have come up with some of the best qualities that every programmer should have:</p> <div style="margin-left: 20px; margin-right: 20px;"> <ul> <li><em>A fast and early adopter - Pragmatic programmers love drinking the newest flavors of the technology coolaid. Playing with a new technology is like getting to play with a new toy. It's fun and represents something new and unknown to be figured out.</em></li> <li><em>Curious and Inquisitive - Pragmatic programmers are always asking questions. Curious about how and why things work, and what the best way is to solve a problem. The knowledge picked up from these questions almost always becomes more useful in understanding future questions.</em></li> <li><em>Grounded and Realistic - Pragmatic programmers have a very realistic view on things. They won't forget that the webapp you're building is only a tool for the means, not the end to the means.</em></li> <li><em>Jack of all Trades - Being able to wear multiple hats makes pragmatic programmers more adaptable but also more valuable. Pragmatic Programmers have the ability to switch from one task to another pretty often, while still being able to claim a master or some.</em></li> <li><em>Care about their craft - As a pragmatic programmer you have to care about what you are doing if you are to really have an appreciation for what you do. A pragmatic programmer has fun crafting their code and finding elegant, yet practical answers to their problems.</em></li> <li><em>Always be thinking - A pragmatic programmer tries not to do things out of habit. Always asking "why?", and "how?" helps to always be thinking about your work and why you are doing it the way you are.</em></li> </ul> </div> <p>It doesn't matter if your strength is in a particular product such as SharePoint or if you prefer to roll your own apps from scratch. You need to know how to write code and you must exhibit these qualities.</p> <p>In contrast to Hunt's and Thomas's qualities of a programmer, the following qualities of "programmers" are turn-offs:</p> <ul> <li>You haven't learned any new tool in the past year.</li> <li>You haven't learned any new major technology in the past year.</li> <li>You haven't picked up anything new that has come out within the past year.</li> <li>You can't explain what hands-on programming you did on your last few projects.</li> <li>You can't explain how a system, program, or feature that you worked on works.</li> <li>You can't explain the reasons for a technology choice on a past project.</li> <li>You've only coded with a particular technology or used a certain pattern because that's all that was required of you.</li> </ul> <p>Don't know .NET or C#? That's ok. Not very familiar with popular software patterns such as IoC or DI? No problem. Never used jQuery in all of your web development experience? That's ok too.</p> <p>If you are a good programmer then you will have the ability to be curious and think critically, <strong>just as you have always done throughout your career</strong> (as short or long as it may be), and learn whatever you need to for the job. Bonus points if you are curious about figuring out what <em>the job needs</em>.</p> <p>If you exhibit these qualities then you have an edge over other candidates in getting hired - anywhere. At Avtex we <em>care about our craft</em> and strive to deliver solutions of very high quality. We would love for you to be a part of our team if you <em>know how to write code</em>.</p> MIX11 Review http://kindohm.com/2011/04/15/MIX11Review.html <p><img src="https://msteched.blob.core.windows.net/media/Default/BlogPost/news/MIX11_BB_SeeYouAt_2.gif" style="float: right; margin: 5px;" alt="MIX"/> I'm back from Microsoft's <a href="http://live.visitmix.com/">MIX11 Conference</a> which was held in Vegas this past week. The best part of these conferences is the networking; I met a lot of new friends and new colleagues and hung out with some of the coolest people from the Minneapolis area. I left the conference motivated to get better at my job and help my company get better. I'm very excited about what Microsoft developers are doing these days. </p> <p>However when it came to the main technology messages from Microsoft out of the conference, I was not "wowed". I thought that the messages that received the most emphasis at the conference actually had more hype than real value. As for the content I actually did enjoy at the conference - it was content that really wasn't geared towards "user experience", which is what the MIX conference is all about.</p> <h3>The Things I Liked</h3> <p>Before my buzz kill reigns down, first I'm going to talk about what I enjoyed most at the conference: Windows Phone 7, Nuget, and <a href="http://channel9.msdn.com/Events/MIX/MIX11/FRM02">The Web Stack of Love</a>. </p> <p>Microsoft showed what is coming down the pipe for Windows Phone 7 later this fall. WP7 is turning out to be a great device with great tooling support. There were two new features presented at MIX that I really liked: background processing and deep link tile support. Other features such as being able to combine XNA and Silverlight in the same app were also pretty nice. After seeing the WP7 content at the second keynote and at some of the sessions I was fired up to write WP7 apps again. That's what I felt like last year at MIX10, but back then all we had was an emulator with no app store.</p> <p>With MIX being a conference that is centered on user experience design and development, I was a little puzzled about the promotion that <a href="http://www.nuget.org">Nuget</a> received at the conference. Nuget is a developer tool that makes developers more productive in Visual Studio and doesn't have anything to do with UX design and development. That being said, I think Nuget is one of the greatest things Microsoft has done for its developer community because it embraces open source software and delivers access to open source tools directly to the .NET developer's environment. Because of that, Microsoft and developers are better off that MIX showed off Nuget at the conference. Nuget may not have been the best match for content during the week but it was a great time to show it.</p> <p>The last of what I enjoyed the most was what Scott Hanselman calls the Web Stack of Love: ASP .NET MVC 3, Entity Framework Code First, SQL Compact 4, jQuery, Modernizr, and other tools. These tools are the building blocks of web apps and web experiences on the Microsoft platform. If you're building a web site or app, or building a set of services that an app or mobile device needs to talk to, building it on this stack will make it fun. What I like best about these tools though is that Microsoft is now beginning to approach par with what the Mac and Linux kids are doing with web frameworks these days. Entity Framework's "Code First" feature is what I like the best. Combine this stack with Nuget and you have a Microsoft web development experience that you've never had before. </p> <h3>The Things I Disliked</h3> <p>There was a variety of things that I actually disliked during the conference. They included the promotion of Internet Explorer 9, apologies for WP7 updates, lack of a Kinect SDK, conversations about HTML5 and the HTML5 buzz word, and the debate about HTML5 and Silverlight. <p>The promotion of Internet Explorer 9 at MIX11 felt forced and contrived. Microsoft went out of their way to state how IE9 outperforms the competition and how the IE9 team has made more on-the-ground progress with respect to adopting HTML5 features. They also touted IE9's ability to deliver better performance on Windows 7. As a web developer, how does any of this help me? If I'm developing an app for the web, I typically don't have any control over which operating system or internet browser a user is using. Thus this extreme marketing fluff we received at MIX11 for IE9 seems out of place. It would have been better suited for television or a non-developer audience. Perhaps the worst part about this though is that this message was the focal point of the keynote on the first day. </p> <p>On the day 2 keynote, Microsoft invested a large chunk of time on stage apologizing for snags in the first WP7 device update. I understand that Microsoft needs to explain what happened, but it was a waste of time watching them explain it on stage. A press release would have been a better delivery method. I would have rather seen 20 more minutes on new WP7 features or tooling.</p> <p>I was predicting and hoping for a beta release of the official Microsoft Kinect SDK at MIX11. My prediction was wrong and no SDK was released. Instead, Microsoft re-stated their goal of releasing the SDK this Spring. That's old news folks. Every conference attendee received a Kinect sensor bar at the conference. Don't get me wrong, that was completely awesome, but what are all of us supposed to do with these Kinects? I'm afraid the momentum for Kinect development will be lost by the time the SDK is out. Think of how much momentum would have been gained if a beta SDK would have been available at the conference in conjunction with receiving the Kinects. I can understand the possible reasons for this bad timing though - Microsoft never imagined the demand for an SDK last November when the device was released and they haven't exactly had much time to get something together for the conference.</p> <p>What do you think of when you hear "HTML5"? For so many conference attendees they talk about it like it is a new platform that will transform how they do web development. While it may be a transforming standard, what percentage of HTML5 apps will actually need to provide the highly rich media features that HTML5 provides? Basic HTML layouts, CSS, Javascript, and Ajax are here to stay for a long, long time and my bet is that 90-95% of web sites and web apps will be able to rely on those tried and true tools and features for many years to come - even if they are using that HTML5 document type. There are some great layout features of HTML5 that I like - but I wouldn't say they will cause a sea change in web development. The HTML5 features that will deliver multimedia capabilities with animations, audio, and video may cause that sea change - but in my opinion the majority of web-based solutions in the future will not leverage these types of features. Maybe I'm not thinking forward enough here but the point is that HTML5 is a hammer and a lot of folks seem to think that all of their problems are nails. Let's keep it real and remember what HTML5's roots are: HTML.</p> <p>Last I'll touch on the Silverlight vs. HTML5 debate going on in the developer community. This debate came up a lot among conference attendees. Personally, I find it entertaining that folks are so wound up about this topic. Many attendees expressed concern over the lack of direction and guidance from Microsoft at the conference about these two technologies. I really think this is silly - will there ever really be a clear choice? Would you even trust any "official" guidance given to you by a vendor (who has a financial stake in these technologies) at a conference? The choice between HTML and Silverlight is dependent on an application's requirements and its users or audience - not on a strategic direction from a large software vendor.</p> <p>This week, someone asked me what kind of developer I was. I responded by saying I tend to develop a lot of web apps, and they then tried to clarify by asking if I was a Silverlight developer or ASP.NET developer. For me, the answer is neither. I think what really boggles my mind about the HTML5/Silverlight debate is why some folks put themselves in only one of these camps and therefore get concerned about this topic. As developers, shouldn't we be prepared to learn and use any technology? Isn't it dangerous to put all of your eggs in one basket? I considered that maybe this is easy for me to say since I'm a consultant who thrives on adapting to the latest shiny object, but even if you're working in-house on a product or team would you still invest everything you've got into a narrow technology stack?</p> <p>Ultimately I'm glad that Microsoft didn't provide clear guidance or a clear direction on where Silverlight is going. I don't think its for a vendor like Microsoft to decide - especially in cases where it appears to conflict with HTML5. The project's requirements decide. Besides, I believe there will be a need for both technologies for a very long time anyway: web browsers will all need HTML, and if web users don't adopt the Silverlight plugin in large numbers then there are still Windows Phone 7 apps and lightweight "out of browser" slate apps (remember that ARM processor demo at the day 1 MIX keynote?) that need to be developed with Silverlight tools.</p> <h3>Hope and Change for Next Year</h3> <p>The bottom line is that I wished there would have been more new technologies and tooling announced and made available to conference attendees. That's the bar that was set at MIX10 and MIX9 (WP7 and Silverlight 3/4, most notably). I walked away from MIX11 without feeling like I had anything new to play with. Sure, there are the Silverlight 5 beta tools, but that's it.</p> <p>If Microsoft can't keep up with releasing new technologies and tooling for each MIX conference then they need to get back to their roots with MIX and make it more about User Experience. Otherwise MIX just seems to compete with PDC each year. MIX felt like it started losing its identity this year. I think getting back to UX would strengthen the conference.</p> MIX11 Conference Next Week http://kindohm.com/2011/04/08/MIX11.html <p><img src="https://msteched.blob.core.windows.net/media/Default/BlogPost/news/MIX11_BB_SeeYouAt_1.gif" style="margin: 5px; float: right;" alt="MIX11" /> I'll be flying out to Las Vegas next week to attend Microsoft's MIX11 conference. This conference primarily focuses on user experience design and development for the web and also for Microsoft technologies such as WPF, Silverlight, Windows Phone 7, and Windows tablets/slates.</p> <p>I'll be interviewed at the conference (they will be recorded, not streamed) by Microsoft about some of the work we're doing at <a href="http://www.avtex.com">Avtex</a> on our innovation team with Windows Phone 7, the Kinect device, and Windows slates. In support of these interviews we'll be publishing a couple of Avtex blog posts about what we've been doing with the Kinect device. Specifically, we're writing about the content browsing app we've developed for use in our front lobby and at trade shows. I'll reference these posts and the recorded interview when they become available.</p> <p>I'm very excited to see what comes out at MIX this year. I predict something big is going to be announced about Silverlight 5 - something that Microsoft hasn't already announced about it. Another prediction of mine is that Microsoft will release their Kinect SDK. This is what I'm most excited about, but it's only a prediction. I'll be bringing along my Kinect device to the conference... and if I can stay awake late enough after all of the late-night events I'm hoping to do some coding right away with any newly-baked bits.</p> Bathroom Closed for Photo Shoot http://kindohm.com/2011/04/08/BathroomClosed.html <p>Srsly.</p> <p> <a href="http://www.flickr.com/photos/kindohm/5600801091/" title="Bathroom Closed for Photo Shoot by kindohm, on Flickr"><img src="http://farm6.static.flickr.com/5069/5600801091_cf39c8ab24_z.jpg" width="383" height="640" alt="Bathroom Closed for Photo Shoot"></a></p>